Wednesday, 25 June 2008

MSTest.exe on the command line

Heres a little batch file to run your tests locally (neatly) from test containers (courtesy of Paul)

rmdir TestResults /S /Q
for %%f in ("..\bin\debug\*UnitTest*.dll") do del "%%~nf".trx & mstest /testcontainer:%%~ff /noisolation /resultsfile:"%%~nf".trx
for /f "Tokens=*" %%f in ('dir *.trx /b') do @nxslt2.exe "%%f" trxsummary.xsl


Works for me!!!

No comments: