Tuesday, September 26, 2006

Integrating MStests with Nant

Intgrating MSTests with Nant

MSTest.exe is command line utility which can be executed using Exec Task of Nant

MSTest Command Line Options

BeginTag exec
program ="C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\MSTest.exe" commandline="/testcontainer:C:\Projects\ProjectName\Build\WebTests\Matrix.WebApplication.Tests.dll /resultsfile:C:\Projects\ProjectName\Build\WebTests\a.trx" basedir="C:\Projects\ProjectName\Build\WebTests" >
EndTag exec

testcontainer: Load a file that contains tests
runconfig: Load a file that contains tests
resultsfile: Save the test run results to the specified file

CruiseControl and MSTests


Running Unit Test on Build Server
In order to run tests during build, Team Edition for Testers must be installed on the build computer. In order to run unit testing, code coverage or code analysis, Team Edition for Developers must be installed on the build computer.


No comments: