我试图阻止某些(MSTest)单元测试在我们的构建服务器上运行.我真的只想添加一个TestCategory,然后指定:
/category:"!RequiresLoginCredentials"
Run Code Online (Sandbox Code Playgroud)
但我不确定如何在msbuild项目文件中指出.
构建文件的相关部分目前具有:
<ItemGroup>
<!-- TEST ARGUMENTS
If the RunTest property is set to true then the following test arguments will be used to run
tests. Tests can be run by specifying one or more test lists and/or one or more test containers.
To run tests using test lists, add MetaDataFile items and associated TestLists here. Paths can
be server paths or local paths, but server paths relative to the location of this file are highly
recommended:
<MetaDataFile Include="$(BuildProjectFolderPath)/HelloWorld/HelloWorld.vsmdi"> …Run Code Online (Sandbox Code Playgroud)