在MSBuild中指定MSTest参数
我试图阻止某些(MSTest)单元测试在构建服务器上运行。我只想添加一个TestCategory,然后指定:在MSBuild中指定MSTest参数,msbuild,mstest,Msbuild,Mstest,我试图阻止某些(MSTest)单元测试在构建服务器上运行。我只想添加一个TestCategory,然后指定: /category:"!RequiresLoginCredentials" 但我不确定如何在msbuild项目文件中指出这一点 生成文件的相关部分当前有: <ItemGroup> <!-- TEST ARGUMENTS If the RunTest property is set to true then the following test
/category:"!RequiresLoginCredentials"
但我不确定如何在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">
<TestList>BVT1;BVT2</TestList>
</MetaDataFile>
To run tests using test containers, add TestContainer items here:
<TestContainer Include="$(OutDir)\HelloWorldTests.dll" />
<TestContainer Include="$(SolutionRoot)\TestProject\WebTest1.webtest" />
<TestContainer Include="$(SolutionRoot)\TestProject\LoadTest1.loadtest" />
Use %2a instead of * and %3f instead of ? to prevent expansion before test assemblies are built
-->
<TestContainer Include="$(OutDir)\UnitTests.dll" />
</ItemGroup>
我猜这是一个简单的加法,但我对msbuild知之甚少
谢谢 我快速搜索了答案,我认为有两种可能的解决方案:
我快速搜索了答案,我认为有两种可能的解决方案:
您使用的构建服务器版本是什么?我相信我们使用的是MSBuild 4,使用的是TFS 2008。我还没有使用TFS,但这类事情通常不是用TestManager配置的吗?TestManager是TFS 2010中的一个功能:)在2010年,您可以通过build definition.Lolz来完成。然后我投票给exec任务。您使用的构建服务器的版本是什么?我相信我们使用的是MSBuild 4,使用的是TFS 2008。我没有使用TFS,但这类事情不是通常用TestManager配置的吗?TestManager是TFS 2010中的一个功能:)在2010年,您可以通过build definition.Lolz来完成。那么,我投票赞成执行任务。