-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Paratest is unstable and coverage retrieve different percentages each time I rerun tests #651
Comments
Hi, I am aware of the bug, but need the time to investigate it |
Thank you, I think this is a great library :) |
I finally made it to create a self-contained small enough repo that shows the bug. @EARodriguez2021 @maks-rafalko can you confirm the issue you're having is similar to https://github.com/Slamdunk/phpunit_codecoverage_bug#readme ? |
Yes, @Slamdunk you're right, this is one of the main bugs that we experimented using different quantity of processes in the command executed because sometimes constants inside of an array are covered and suddenly same values are not covered without any logical reason. thank you for your valuable time you give us, we really appreciate it. |
Thread continues at sebastianbergmann/php-code-coverage#889 |
Perfect, thanks |
So, after for 4 days of digging the bug, there's a workaround: autoload the class with the constants in the test bootstrap. // tests_bootstrap.php
class_exists(AType::class); will get you to a consistent report of both tested and untested lines. I have an idea on how to avoid this manual step, but in the meantime that's what I have for you |
Excellent, thank you so much @Slamdunk that was a good solution |
Stay tuned: sebastianbergmann/php-code-coverage#892 will likely solve the issue altogether 💪 |
|
When I run tests, the percentage of the coverage is different
if I execute simple phpunit command, the percentage of my coverage is always the same. and after executing paratest, that percentage is different each time I rerun tests
The text was updated successfully, but these errors were encountered: