Running Automated Tests on TFS 2008

We installed TFS to automatically build when we register, this works fine.

Our problem is how to get unit tests to run on the server?

  • How do we run tests on the build server?
  • How do we automatically run SQL scripts on the server to create a test database?
  • Do I need to install Visual Studio on the build server?
  • Do we need Visual Studio Test Edition on the client?
+3
source share
2 answers

Open the TeamBuildType file (TFSBuild.proj). There you will see a comment similar below ...

<!--  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
-->
+1
source

NUnit-Tests, MSBuild-Task, Build-.proj. VS-Integrated Tests, Build- Script . () Build-.proj.

, , . MSBuild script, . MSBuild , . , - MSBuild.

Build-Machine. NUnit NUnit-, VS Test Edition Loadtests Webtests ..

, , Build-Server.

0

Source: https://habr.com/ru/post/1705718/


All Articles