Reportgenerator: How to enable Branch Coverage

Created on 22 Jul 2016  路  10Comments  路  Source: danielpalme/ReportGenerator

Is there any option to enable Branch Coverage in report generator ?
See the snapshot we have blank in place of branch coverage.
capture

enhancement question

Most helpful comment

@danielpalme
Thank you so much for the quick response and helping me with the requirement. I appreciate that you fixed it so quickly.The report looks perfect now.

All 10 comments

Branch coverage is only supported for OpenCover.

See also in Wiki / FAQ

Hello Daniel,

I have recently started using reportgenerator with Visual Studio coverage files and the results generated are really very good. I understand that the Branch coverage is currently only supported for OpenCover but I would like to know is there some way I can all together just not display it as it doesn't quite look good in the report that its just blank. I don't actually require it anyway.
Also just a suggestion it would be great if it was possible to adjust the width of the columns in the report.
Any help would be appreciated.Thanks

@SiddhiKK:
I will see what I can do.
But I think these a minor issues. An empty column does not really affect the usefulness of the report.

Hey, add this css in your index file to hide "branch coverage". We have done the same. :)

th:nth-child(n + 8), td:nth-child(n + 8), col:nth-child(n + 8), thead th:nth-child(7)
{
display:none;
}

You can also add this to "report.css", if it doesn't affect other html pages.

@decentshakti:
Sorry but it's not that easy. I have to make that conditional, depending on whether branch coverage is available or not.

Yeah daniel its just a workaround to hide "branch coverage" column, if it is empty. The case when someone has generated coverage from VS.
For you a check is definitely required.

@danielpalme Thanks for replying back. yes its a minor issue otherwise the tool works beautifully, I just wanted to know whether there was some workaround that you can suggest.
Hey, any inputs on whether it's possible to make the columns widths adjustable, as my file names are quite long just wanted to know if something can be done? It isn't a problem just a question.

@decentshakti Thank you for the suggestion will try that tomorrow and let you know how it goes.

@all:
Please have a look at this beta release:
https://www.nuget.org/packages/ReportGenerator/2.4.6-beta9

Branch coverage should now only be visible for OpenCover.

@SiddhiKK:
Column widths are currently not adjustable.

@danielpalme
Thank you so much for the quick response and helping me with the requirement. I appreciate that you fixed it so quickly.The report looks perfect now.

Was this page helpful?
0 / 5 - 0 ratings