I have a website that I am trying to test and get coverage. I have 2 different runs: 1) Run IIS using opencover and then run selenium tests to hit the website. Also generate a report using ReportGenerator for only Selenium tests. 2) Nunit tests for some of the dlls used by the website. Also generate a report using ReportGenerator for only Nunit tests.
Then create a merged report using Report Generator. Here is the summary of my reports:
ONLY Selenium Tests report:
- Generated on: 8/24/2016 - 9:49:36 AM
- Parser: OpenCoverParser
- Assemblies: 7
- Classes: 145
- Files: 33
- Covered lines: 6928
- Uncovered lines: 20855
- Coverable lines: 27783
- Total lines: 583097
- Line coverage: 24.9%
- Branch coverage: 19.4%
ONLY Nunit Tests Report:
- Generated on: 8/19/2016 - 4:03:30 PM
- Parser: OpenCoverParser
- Assemblies: 7
- Classes: 145
- Files: 33
- Covered lines: 16597
- Uncovered lines: 14101
- Coverable lines: 30698
- Total lines: 583097
- Line coverage: 54%
- Branch coverage: 41.2%
Merged Report:
- Generated on: 8/24/2016 - 12:40:58 PM
- Parser: MultiReportParser (2x OpenCoverParser)
- Assemblies: 7
- Classes: 145
- Files: 33
- Covered lines: 19083
- Uncovered lines: 12584
- Coverable lines: 31667
- Total lines: 583097
- Line coverage: 60.2%
- Branch coverage: 40%
The Total lines remain same in all the three cases as expected as they are the same dlls. But the Coverable lines are changing for each case. My understanding is that the Coverable lines count should also remain same and only the covered and uncovered lines count should change.