scrutinizer-ci / scrutinizer

Legacy repository - archives past feature requests/bug reports
https://scrutinizer-ci.com/docs
140 stars 36 forks source link

Code coverage overview #106

Open stof opened 10 years ago

stof commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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

stof commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

https://scrutinizer-ci.com/g/Behat/Mink/code-structure/hot-spots

stof commented 10 years ago

well, not it is working. This looks weird

schmittjoh commented 10 years ago

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

stof commented 10 years ago

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 commented 10 years ago

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