When you run tests in a TFS build with MSTest a .trx-file is created. This file contains all the testresults for that run. However you can't view it unless you have Visual Studio...
(Appearently you could publish the result to the Team Foundation Server and then do a report but this is much simpler...)
Here is a tool, trx2html, that converts that .trx-file into a nice HTML-report. And that report could then easily be published on the Team Portal.
And here are, based on this article, some steps on how to include the functionality in your build script:
- Download the tool
- Include the RidoTask.dll in your solution or reachable on the server where the tests are run. I've included the dll in a solution folder in my solution, called SolutionItems\Tools
- Reference the msbuild task in your build file (.proj)
<usingtask assemblyfile="$(SolutionRoot)\SolutionItems\Tools\RidoTasks.dll" taskname="RidoTasks.trx2html">
- Convert the trx into html after TFS has dropped the results
<output itemname="trxfiles" taskparameter="Include">
- Inform your project where to find your latest reports, which is the same directory as the testresult itself
<Exec Command="xcopy "$(DropLocation)\$(BuildNumber)\TestResults\*.htm" "$(TestResultReportPath)" /Q /H /R /Y" />
That's an easy way to keep everyone informed
Published byon Last updated