Closed thewholelifetolearn closed 4 years ago
The text report is useless, IMO, and there is no point to have any meaningful discussion about data accuracy based on it.
Some application use this output to display the coverage percentage (for example badges in GitLab). Plus, this output summarizes well the information.
In any case, if the output is not reliable, the option shouldn't be available.
This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions.
This issue should not be closed! It is important to rely on such statistics to measure code coverage. It is even more important as both tools rely on PHP_CodeCoverage to gather the information and that both are maintained by the same organization.
As I said before, all outputs should give the same result and be reliable.
Thank you for your report.
Please provide a minimal, self-contained, reproducing test case that shows the problem you are reporting.
Without such a minimal, self-contained, reproducing test case I will not be able to investigate this issue.
I'm at the moment in holidays. I will try to submit a test case before end of May.
This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions.
I'm sorry i didn't propose a test case yet. I will propose one this month. I should have more spare time to do that.
No feedback, closing.
To speed-up my tests, I decided to give a try to phpcov merge.
Until now, I was doing a PHPUnit test coverage on the entire application and now I split the tests depending on the directories. It comes out that the result isn't the same. It happens to be that even the number of methods and lines aren't equal!
It seems that PHPUnit counts only named functions, against PHPCov that counts named and anonymous functions. Regarding the lines, I have no clue for the difference.
I'm using PHPUnit 7.3.5 (installed via Composer) and PHPCov 5.0.0 (installed via Phar).
Here are the outputs:
PHPUnit:
PHPCov: