visual-studio-2008unit-testing

How do I format Visual Studio Test results file (.trx) into a more readable format?


Have just started using Visual Studio Professional's built-in unit testing features, which as I understand, uses MS Test to run the tests.

The .trx file that the tests produce is xml, but was wondering if there was an easy way to convert this file into a more "manager-friendly" format?

My ultimate goal is to be able to automate the unit-testing and be able to produce a nice looking document that shows the tests run and how 100% of them passed :)


Solution

  • Since this file is XML you could and should use xsl to transform it to another format. The IAmUnkown - blog has an entry about decoding/transforming the trx file into html.

    You can also use .NetSpecExporter from Bekk to create nice reports. Their product also uses XSL, so you could probably steal it from the downloaded file and apply it with whatever xsl-application you want.