问题描述
我一直使用MSTest进行单元测试。 在一个新项目中,我决定使用nunit。 但是,当我回到我的旧项目并单击在visual studio中运行所有测试时,nUnit适配器将被执行,并且不会获取MSTest单元测试。
有没有办法在解决方案级别配置使用nunit或mstest适配器?
google搜索后我发现可以放入每个类的代码片段允许单元测试在任一适配器下运行但是我无法弄清楚如何定义在visual studio中运行的适配器。
谢谢提前
I have always used MSTest for unit tests. In a new project I decided to use nunit. However when I go back to my old projects and click run all tests within visual studio the nUnit adapter is executed and does not pick up the MSTest unit tests.
Is there a way to configure at the solution level wether to use nunit or mstest adapters?
After googling I found code snippets that can be put into each class to allow a unit test to run under either adapter however I cannot figure out how to define the adapter that is run in visual studio.
Thanks in advance
这篇关于安装nUnit测试适配器后无法运行MSTest单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!