0
我有一个包含一些MSTest单元测试的项目,但是,当我尝试运行它们时,测试运行器没有注意到它们。Visual Studio 2010无法识别MSTests
我在.proj
文件,因此ProjectTypeGuids
:
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
测试是否正确和公共归属,像这样:使用Microsoft.VisualStudio.TestTools.UnitTesting
;
namespace WebService.UnitTest
{
[TestClass]
public class MyTests
{
[TestMethod]
public void MyTest()
{
Assert.Fail("At least the test is running!");
}
}
}
但是当我运行(在溶液中的所有测试),我看到消息No tests were run because no tests are loaded or the selected tests are disabled
。
我还需要改变什么才能让测试跑步者将这个项目作为测试项目来进行测试?