Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional HTML report views for branch/path data #778

Merged

Conversation

dvdoug
Copy link
Contributor

@dvdoug dvdoug commented Jul 13, 2020

Hello @sebastianbergmann

This is a proposal to add some additional views to the HTML coverage report to better expose branch and path data (when enabled). The changes I'm suggesting are as follows:

  1. When branch/path data is available, the directory view is altered so that there are 3 links for each source code file - one for line-based coverage, one for branch coverage and one for path coverage.

image

  1. The line-based coverage view is unaltered, except for some minor HTML changes

  2. The branch view consists of 2 halves. The first portion is a new version of the familiar coverage view, with each line of source code highlighted in green/red/yellow to indicate coverage with the usual tooltips to show the tests that covered the line. The tooltip will also show the number of branches the line has, and how many have been covered

image

  1. Below that, is a second view which shows each individual branch in isolation for ease of identification. I feel this is important as branches and lines can have a many-many relationship, so mentally identifying them from the source view is not always easy.

image

  1. The path view works like the branch view does - a version of the traditional view, and then a per-path breakdown.

What do you think?

@codecov
Copy link

codecov bot commented Jul 13, 2020

Codecov Report

Merging #778 into master will increase coverage by 0.82%.
The diff coverage is 90.07%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #778      +/-   ##
============================================
+ Coverage     83.67%   84.49%   +0.82%     
- Complexity      978     1044      +66     
============================================
  Files            50       50              
  Lines          2909     3135     +226     
============================================
+ Hits           2434     2649     +215     
- Misses          475      486      +11     
Impacted Files Coverage Δ Complexity Δ
src/Report/Html/Renderer/File.php 92.13% <89.70%> (+1.10%) 177.00 <153.00> (+65.00)
src/Report/Html/Facade.php 95.08% <100.00%> (ø) 7.00 <0.00> (ø)
src/Report/Html/Renderer/Directory.php 89.65% <100.00%> (+3.11%) 9.00 <0.00> (+1.00)
src/Node/File.php 76.84% <0.00%> (+0.67%) 118.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f71d09...1e01ba6. Read the comment docs.

@sebastianbergmann sebastianbergmann merged commit 4861acc into sebastianbergmann:master Jul 14, 2020
@dvdoug
Copy link
Contributor Author

dvdoug commented Jul 14, 2020

🚀

@dvdoug dvdoug deleted the display_branch_path_by_file branch July 14, 2020 11:02
@dvdoug dvdoug mentioned this pull request Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants