Run silverlight code coverage by commandline or msbuild task

Is it  (or will it be) possible to run code coverage by dotcover commandline utility or by msbuild task ?

4 comments

Hello Ralf,
In dotCover 1.0 this is not possible, but we're going to get closer to silverlight tests in the next versions.
Here are the issues for AgUnit & White frameworks support:
http://youtrack.jetbrains.net/issue/DCVR-1395
http://youtrack.jetbrains.net/issue/DCVR-1347
And I've filed a new one for silverlight coverage from command line:
http://youtrack.jetbrains.net/issue/DCVR-2290
Please feel free to comment/vote/add new issues to our tracker.

0

Hi,

I've successfully covered a Silverlight application from within Visual Studio 2010. I saved a snapshot file (.dcvr extension). This seems to be a binary file. Can I somehow convert this .dcvr file into a XML file, allowing me to process it further?

Regards,
Andreas

0

Hi Andreas,
Next minor release of dotCover will contain option to generate reports from VS.
Currently you can use console runner for this purpose, but it is a bit tricky.

First you need to create "coverage result" xml (let's say c:\temp\coverage-result.xml) with the following content:

<?xml version="1.0" encoding="utf-8"?>
<CoverageResult>
  <IndexFiles>
    <string>c:\temp\snapshot.dcvr</string>
  </IndexFiles>
</CoverageResult>


Next you'll need a report configuration xml (e.g. c:\temp\report-configuration.xml)

<?xml version="1.0" encoding="utf-8"?>
<ReportParams>
  <Source>c:\temp\coverage-result.xml</Source>
  <Output>c:\temp\report.xml</Output>
</ReportParams>


Finally execute console runner with the following command line:

dotCover report c:\temp\report-configuration.xml

0

Please sign in to leave a comment.