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
Infection does not run any tests if --filter
is too big
#1545
Comments
Additional ideas how to improve this: from sanmai:
from theofidry:
|
Alternative idea: see if it's possible to have this setting within PHPUnit config, which although for the regular user does not make much sense, it would fix our issue perfectly. Another idea would be to split the PHPUnit, i.e. instead of doing:
We could do:
However this would likely result in side-effects on how we process/report things afterwards |
In #1539, we've added
--only-covering-test-cases
option that adds--filter='/very_long|regular_expression_for_all_covering_tests/'
.If the mutated line covered by enormous number of tests, the
--filter
option becomes too large and as a result, we haveWhy
No tests executed!
? Because herehttps://github.com/sebastianbergmann/phpunit/blob/d599f6e25cc939f13c6dcfe00028b6e8d275ad55/src/Runner/Filter/NameFilterIterator.php#L70
in PHPUnit's code, we have a
@preg_match
with silencing errors via@
, that in reality produces the following warning:Example:
instead of
App\\Tests\\SomeTest\:\:test_case with data set "#1"|App\\Tests\\SomeTest\:\:test_case with data set "#2""
we can just addApp\\Tests\\SomeTest\:\:test_case
. In the worst case, we will run not covering data sets from the big dataprovider, but this is a working tradeoffNo tests executed!
as a killing mutant (will do in a separate PR)The text was updated successfully, but these errors were encountered: