The Microsoft code coverage tool (vsinstr.exe) generates a binary file to be read in Visual Studio. Can it also generate an XML file?
Minor correction: vsinstr.exe is the tool used to instrument a binary for code coverage (or profiling). VSPerfMon.exe is the code coverage monitor that actually writes the binary .coverage file to disk.
Inside the IDE, in the "Code Coverage Results" tool window, you can click "Export Results" to export the coverage data in an XML format:
VS2010 does not have a command-line utility to dump .coverage files to XML, however, you can use the code coverage API to do this yourself. See this blog post (and Peter's blog in general) and the CoverageDS.ExportXml
function for doing so.
The coverage XML file has summary data that's similar to what you see in the VS UI. If you need more specific coverage details (e.g. per-block coverage information), you can use the code coverage API to get it.
You can also generate XML from command line using this:
http://blogs.msdn.com/b/ms_joc/archive/2005/04/08/406608.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With