我们将TFS设置为在 checkin 时自动构建,这很好。
我们的问题是如何使单元测试在服务器上运行?
最佳答案
打开您的TeamBuildType文件(TFSBuild.proj)。
在其中,您会看到类似以下内容的评论...
<!-- 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
-->
关于tfs - 在TFS 2008上运行自动化测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/705616/