OpenCover - how to view test coverage?

On OpenCover Gigub page I see that OpenCover maintains coverage with a test ("Release 3 (test support coverage, debug symbols"). The problem is I don't know how to start OpenCover with this option. My workflow is is to run unit tests with OpenCover and nUnit and then use the ReportGenerator to generate a complete html report and view it - and I don't see "coverage" by criteria "anywhere.

Or maybe I misused the "test coverage" feature? As I imagine that this function is that I can get an answer to such a question as "what lines of code does my test TestXYZ () execute?".

Can anyone give me some advice on how to use this feature?

+3


source to share


2 answers


You will need to use the -coverbytest switch, which should be detailed in the Usage.rtf manual - it uses filters of the same type used to include / exclude coverage.

However, the ReportGenerator does not support the OpenCover Coverage By Test feature - you will need to write your own reporting for this - the XML from OpenCover is easy to understand.



Select a test method, and then find which lines of code write those test methods.

+4


source


I presented this as a question to Daniel Palma who is in charge of the reporter and he actually agreed to add support for this feature! What's more, he has already pushed it into the repository (http://reportgenerator.codeplex.com/SourceControl/changeset/70732).



What a great guy!

+5


source







All Articles