本文介绍了ReSharper 单元测试运行程序:支持部署项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢 ReSharper 4.5 中的单元测试运行器,并希望将它与我的 MSTest 测试一起使用,但有一件事让我烦恼:

I like the Unit test runner in ReSharper 4.5, and would like to use it with my MSTest tests, but one thing annoys me:

在我们的一些解决方案中,我们在 .testrunco​​nfig 文件中设置了一些部署项.ReSharper 单元测试运行程序似乎不尊重这一点,因此在尝试从 ReSharper 运行单元测试时出现错误.

In some of our solutions, we have set up some Deployment Items in the .testrunconfig file. The ReSharper Unit Test runner does not seem to respect this, so I get errors when trying to run the unit tests from ReSharper.

有什么解决办法吗?

更新:

citizenmatt 的回答是正确的,ReSharper 的选项"对话框中存在将 .testrunco​​nfig 与 ReSharper 一起使用的选项.您必须在列表中选择单元测试提供程序,然后才会出现执行此操作的控件.(这并不明显或不可发现,至少对我来说不是;-)

citizenmatt's answer was correct, the option to use a .testrunconfig with ReSharper exists in the Options dialog of ReSharper. You have to select the unit test provider on the list, then the controls to do that appears. (That was not obvious or discoverable, at least not for me ;-)

推荐答案

您是否查看过单元测试选项页面?那里有一个设置允许您使用指定的测试运行配置或元数据文件中指定的测试运行配置.我不确定这意味着什么 - 我从未使用过它 - 但听起来它可能会有所帮助.

Have you had a look in the Unit Testing options page? There's a setting there to allow you to use a specified test run configuration, or a test run configuration specified in a metadata file. I'm not sure what it means - I've never used it - but it sounds like it might help.

这篇关于ReSharper 单元测试运行程序:支持部署项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 01:05