Closed bgyu closed 1 week ago
I'm not sure if I understand your request correctly. I have never used the "Visual Studio Enterprise".
Currently ReportGenerator generates an overview/summary page which list all assemblies and classes. Then you can select a class and get the full coverage information for that class including all the source lines. Here's a sample report: https://reportgenerator.io/resources/reports/Html/index.html
What are you missing? Can you provide a screenshot?
This is the example I want to show you between the report of VS Enterprise and ReportGenerator
:
It shows a tree structure similar to ReportGenerator
:
Summary is similar.
When I click "MyHello.BasicTests.cpp":
I only see the coverage of global function GlobalGreet
, no coverage showed for class Hello
:
When I click class MyHello.Hello
:
It only shows me the coverage of member function Greet
, no global function GlobalGreet
showed here.
What I want to see coverage for both in the same source file, both of them should have a green
background indicates both are covered, like the following "Source View" in VS Enterprise.
As you can see, the coverage of file BasicTests.cpp
has global function GlobalGreet
and a member function Greet
of Hello
class, both are showing in the same view. The coverage of BasicTests.cpp
is for both global functions and member functions.
ReportGenerator works on a class by class basis. What you suggest is more a file by file basis. The current approach works fine for languages like C# or Java. In those languages most files contain exactly one class.
I see, that this does not work well in your case. But I probably won't change the behavior since this would be a breaking change for all other users and would also mean to rewrite the complete tool. I'm sorry.
This is not bug report, more like a feature request. In Visual Studio Enterprise, we can view the report in "Source View" or "Project View". From current observation, it looks like
ReportGenerator
only supports "Project View". The view tree is based onassembly
,namespace
,class
,functions
.When I click a source file, I can only see the coverage report for global functions, no class member functions. If I want to see class member functions, I have to click a specific type.
Is it possible that to show the coverage report in a source tree view? When I expand sources in a tree, it shows me what the coverages of a source file, which includes both global functions and member functions.