Load Console Coverage into VS

Hi all,

I'm after some help with dotCover, which I am currently evaluating for the company I work for, for use with our MSBuild integration system.

Currently I have a partially working solution which involves an XmlRead task to read the XML report for coverage statistics, with some custom filters removing whatnot that is irrelevant to my testing, the usual stuff.

Apart from a decent XSLT for viewing the report (if anyone has anything good it would be appreciated!), because html generation takes a ridiculous amount of time on our solution (I stopped it running after an hour, for example), all I need is to be able to load something into Visual Studio to see coverage on a line by line basis.

The idea for this is if a build 'fails' based on coverage, a developer could click a link or visit a share or grab out of SVN the coverage snapshot and load it into VS to see what lines they hadn't added coverage for. Better to use the latest snapshot than have to run all the unit tests in VS again on each dev machine that wants to fix it I reckon.

So, at first I thought the intermediary file between coverage and report might be a snapshot file loadable as a DCVR file, but no go there. I can't seem to see anything about a snapshot in the dotcover console help, so I'm a bit confused.

Does anyone have any idea how to get a snapshot as part of a dotcover console run that can load into visual studio? Also, due to the nature of developers and build machines, the path of the solution source files may (will) differ per computer and would need to resolve as if opened from say the solution folder (or some common folder therein).

It seems like something everyone would want to do, so I assume I just missed something in the docs.

Any help would be cheerfully received.

Max

1 comment
Comment actions Permalink

Hi Max,
Answering your questions:
1) Filtering can be performed  with coverage filters, so there is no need in manual filtering unless  you need something really specific.
Additional info is available in the embedded console runner help.
2) Regarding HTML reports: it seems like you've worked with one of the  early versions, please try dotCover 1.2, several improvements were made  there for the report generation process.
3) Besides that since  dotCover 1.1 console runner produces snapshots as an output (instead of  the snapshot descriptors like it was in 1.0 version)
These snapshots can be opened right in the Visual Studio.
4) If  you're using TeamCity as the CI server, there is a smooth integration  with dotCover, which allows you to download latest snapshots from the  build server to the VS just with few clicks.
It also provides info for matching full paths to the source files as  these paths are obiviously different on the buildserver and on the  developer machine.
5) If you're using another CI system, it is still  possible to download snapshots manually and open them in VS. But in this  case source files mathcing will not work and as a result, some of the  features (for instance - highlighting) will be disabled.
There is a feature request in our tracker for implementing this: http://youtrack.jetbrains.net/issue/DCVR-3320
You're welcome to track its status.

0

Please sign in to leave a comment.