This project has moved. For the latest updates, please go here.

different coverage report from VS 2012

Jun 18, 2014 at 2:42 PM
VS
Not covered(Blocks) Not Covered(%) Covered(Block) Covered(%)
24436 74.71% 8272 25.29%

RG
Coverage: 23.70%
Covered lines: 4336
Uncovered lines: 13951
Coverable lines: 18287
Total lines: 61427

you can see there a different in report
and when I generator the report some error show up I don't know if it is the root case
just like
xxxx.Protected.Model\Fakes\ModelUpgraderFake.cs' does not exist (any more).

and I found that vs shows blocks' coverage and RG shows lines' coverage there are difference in these two ?
Coordinator
Jun 18, 2014 at 2:52 PM
VS uses blocks, see some explanation here: http://stackoverflow.com/questions/4958209/the-blocks-in-code-coverage-with-vs2010
ReportGenerator maps this to the lines of the source code and therefore shows "line coverage".

Since blocks and lines are not the same, the results may differ (23,70% <-> 25.29% coverage).

ReportGenerator parses all source files to generate the reports. If one file does not exist (any more), the corresponding warning is generated.
If you want an accurate report, all files should be available.
Jun 19, 2014 at 12:46 PM
Thanks I got it,

and an other question

there is any way to excluded one dll's all Assemblies?
Coordinator
Jun 19, 2014 at 12:53 PM
You can exclude assemblies by their name.
See Usage section on http://reportgenerator.codeplex.com
Jun 23, 2014 at 3:40 AM
Thank you !
and is there any way to show the blocks coverage like VS I can found blocks information in the class page . I want to show the blocks coverage . How can I do?
Coordinator
Jun 23, 2014 at 7:13 AM
If you take a look at a class report you will find a table located at the top. This table shows the covered blocks per method.
For the rest of the report, line coverage is used.