Skip to content
This repository has been archived by the owner on Apr 12, 2018. It is now read-only.

Code coverage overview #106

Open
stof opened this issue Jan 15, 2014 · 14 comments
Open

Code coverage overview #106

stof opened this issue Jan 15, 2014 · 14 comments

Comments

@stof
Copy link
Contributor

stof commented Jan 15, 2014

When the code coverage is enabled, it would be useful to have a page displaying the code coverage of the project (similar to the HTML report of PHP_CodeCoverage).

@schmittjoh
Copy link
Member

There is an extra "Test Coverage" column on the "Code" page where you can order by the percentage (classes) or the CRAP score (methods). Did you see this?

@stof
Copy link
Contributor Author

stof commented Jan 15, 2014

yeah, this is good when you want to know the coverage of a particular class. But it does not help to have an overview of the coverage on your project (checking each class one by one is not fun). I think addign a view similar to the PHP_CodeCoverage report could still be helpful (avoiding to rerun the code coverage locally just to get the overview, as scrutinizer already stores all needed data)

@schmittjoh
Copy link
Member

Could you attach a screenshot of that view by any chance?

@stof
Copy link
Contributor Author

stof commented Jan 15, 2014

see https://github.com/Behat/Mink/issues/406 for instance, which contains such a screenshot for the package view.
There is also a file view, which shows a summary of the coverage inside a file (similar display, but it lists functions, classes and methods defined in the file rather than subfolder and files in the folder) and also the highlighted code inside the file. This highlighted code is already available on Scrutinizer in the code view

@stof
Copy link
Contributor Author

stof commented Jan 15, 2014

to be exact, the report also include a dashboard view with some graphs (but I generally don't use it, and the code rating on Scrutinizer is more useful than these graphs based only on the CRAP score)

@aik099
Copy link

aik099 commented Jan 15, 2014

On screenshot, that @stof mentioned is the standard code coverage report in HTML format, that PHPUnit produces.

I know, that recently the "dashboard view" was introduced in Scrutinizer where (in contrast to "pull request view") you can see current project state.

The detailed code coverage dashboard surely would have been a great help there.

@schmittjoh
Copy link
Member

There is now an extra row on the hot spots page. See here for an example:
https://scrutinizer-ci.com/g/schmittjoh/metadata/code-structure/hot-spots

It's not exactly the same like in the code coverage report, but let me know what you think.

@stof
Copy link
Contributor Author

stof commented Jan 19, 2014

the table "Least tested Methods/Operations compared to Complexity" is confusing: it orders the CRAP code in ascending order, so it is actually displaying the most tested classes (only a class with 100% code coverage can have a CRAP of 1 as long as it has some code in it)

@schmittjoh
Copy link
Member

That's weird for me it shows the highest number (the worst) first (see link above)

Do you have a link which shows the wrong ordering?

@stof
Copy link
Contributor Author

stof commented Jan 19, 2014

@stof
Copy link
Contributor Author

stof commented Jan 19, 2014

well, not it is working. This looks weird

@schmittjoh
Copy link
Member

Maybe you had already switched to the next page, I didn't change anything :)

@stof
Copy link
Contributor Author

stof commented Jan 19, 2014

Actually, the issue is the pagination: the initial loading is indeed DESC. but when you click "next page", it sorts them in ASC order (try to do next page and then previous page)

@ddeboer
Copy link

ddeboer commented Jul 31, 2014

Sorting and pagination seem to work fine now, so I guess this can be closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants