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
Line CodeCoverage is not a reliable source of truth #1750
Comments
|
There was a similar issue with arrays, fixed by #1027. |
I'm likely talking more to myself than anything but I really wish CS would not change what is covered, i.e. that the coverage would be bound to the statement, not how the statement is presented. |
That would be ideal, but I think that ship sailed a long time ago for PHP |
With the land of sebastianbergmann/php-code-coverage#964 in And so Infection is now happy: Processing source code files: 1/1
.: killed, M: escaped, U: uncovered, E: fatal error, X: syntax error, T: timed out, S: skipped, I: ignored
. (1 / 1)
1 mutations were generated:
1 mutants were killed
0 mutants were configured to be ignored
0 mutants were not covered by tests
0 covered mutants were not detected
0 errors were encountered
0 syntax errors were encountered
0 time outs were encountered
0 mutants required more time than configured
Metrics:
Mutation Score Indicator (MSI): 100%
Mutation Code Coverage: 100%
Covered Code MSI: 100%
Note: to see escaped mutants run Infection with "--show-mutations" or configure file loggers.
Please note that some mutants will inevitably be harmless (i.e. false positives).
Escaped mutants:
================
Timed Out mutants:
==================
Skipped mutants:
================
Not Covered mutants:
====================
Time: 0s. Memory: 16.00MB 🚀 |
Thank you for your work @Slamdunk! |
Hi, the line code coverage is not a reliable source of truth for asserting the final MSI score.
Source
Test
Code Coverage
WARNING: this is the correct code-coverage according to xDebug and PCOV drivers, NO bugs of
phpunit/php-code-coverage
are involvedSettings
phpunit.xml
infection.json
Output
$ vendor/bin/phpunit
$ vendor/bin/infection
The text was updated successfully, but these errors were encountered: