I'd like to be able to produce a HTML based report from the Results.trx
and data.coverage
files that MSTest creates. Ideally this would just list any failures, and show some basic coverage stats.
Does anyone know of a tool that does this?
I'd like to be able to produce a HTML based report from the Results.trx
and data.coverage
files that MSTest creates. Ideally this would just list any failures, and show some basic coverage stats.
Does anyone know of a tool that does this?
You can publish to the report server and then the reports will be available from a web interface.
( I did it in PowerShell)
You need this dll
Microsoft.VisualStudio.Coverage.Analysis.dll
then this line will turn .coverage into an xml file (which the .trx already is)
$dataStore = ([Microsoft.VisualStudio.CodeCoverage.CoverageInfoManager]::CreateInfoFromFile("$homeDir\tests.coverage")).BuildDataSet($null)
$dataStore.WriteXml("$homeDir\Coverage.xml")
Then you could use the MsTest xsl file from cruisecontrol.net to put the test results in a nice html format, and I have an XSL for the coverage. WHich won't fit here. I wish they had a way to upload files. Email me alex dot hutton at hotmail, and I can get you the xsl to display that coverage
Actually we did that using the open source tool Trx2Html
Its really simple - gets trx file and output html. There are specific versions for VS2005 trx and VS2008 trx.
The trx files are fairly simple xml documents that can easily be processed with XSLT to produce flexible and customized reports.
If you google trx and xslt you'le find a number of examples to get you started.
Here is how you can generate html report for your trx using XSLT http://www.mytechfinds.com/articles/software-testing/6-test-automation/27-trx-to-html-using-xslt
I have added a codeplex project for this, you can generate the html from trx as well as add code-coverage data to the same report. http://trxtohtml.codeplex.com/