1
MSTest的參數,我想阻止某些(MSTest的)單元測試被我們構建服務器上運行。我真的很想只需添加一個TestCategory,然後指定:指定的MSBuild
/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。
謝謝!
你用什麼版本構建服務器呢? – 2011-05-19 16:13:05
我相信我們是對的MSBuild 4,與2008年TFS – 2011-05-19 16:15:47
我沒有使用TFS,但並不是這樣的事情通常與TestManager的配置? – 2011-05-20 01:35:48