This plugin converts MSTest TRX test reports into JUnit XML reports so it can be integrated with Jenkin's JUnit features.
Internally, the MSTest plugin uses code coverage information in the Emma XML file format, but it will automatically convert data in the Microsoft CoverageDS XML format to the Emma format. When using the Microsoft CoverageDS XML format, the coverage file must be named vstest.coveragexml and must be located in the same directory as the test results (.TRX) file. This is usually %workspace%\TestResults
In the unlikely case that you are somehow generating files in the Emma XML format, the coverage file must be named emma\coverage.xml and may be present anywhere in the workspace (in a directory named emma, as shown here)
The VSTestRunner Plugin allows you to specify a build step that includes code coverage generation. This plugin is usually configured to use the Microsoft VSTest.Console.exe application, which generates coverage information in a binary format must be converted to XML format before it can be used by the MSTest Plugin. This conversion is described below.
To convert the binary VSTest.Console output to the Microsoft CoverageDS XML format, you may use one of the prebuilt applications referenced in the V0.14 release notes below, or you can build the following converter application:
The following Powershell build step will find one binary coverage data file in your workspace and convert it to XML format, assuming you use the default TestResults directory. (Modify as necessary to handle multiple coverage files)
Note: If you would like to convert the CoverageDS XML file to the Emma XML format, the procedure below is effective. This is not necessary for use of the MSTest Plugin, as it automates the generation of Emma XML data. This is provided for reference only:
This process requires the following tools:
The following powershell build step will perform the EMMA conversion:
Microsoft supplies C:\Program Files (x86)\Microsoft Visual Studio 1X.0\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe with Visual Studio. This does not produce the CoverageDS XML format, and is not compatible with the MSTest plugin. If you are interested in this topic, and you've some experience with XSL, there are a couple of transforms to convert back and forth in the github repository.
Skip to end of metadata Go to start of metadata