Skip to content
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

Set failOnRisky, failOnWarning to true if parameters are not already set #1280

Merged
merged 1 commit into from Jul 7, 2020

Conversation

maks-rafalko
Copy link
Member

Fixes #1274

Since PHPUnit won't treat new risky tests as failures by default, and since this behavior causes an unnecessary confusion even for experienced users (see #1273), we add failOnRisky="true" and failOnWarning="true" by default unless a conflicting directive is present, just like we do with executionOrder="random".

That is, if there's already failOnRisky="false" then it should not be changed.

…ready set

Fixes #1274

Since PHPUnit won't treat new risky tests as failures by default, and since this behavior causes an unnecessary confusion even for experienced users (see #1273), we add failOnRisky="true" and failOnWarning="true" by default unless a conflicting directive is present, just like we do with executionOrder="random".

That is, if there's already failOnRisky="false" then it should not be changed.
@maks-rafalko maks-rafalko added this to the 0.17.0 milestone Jul 6, 2020
@maks-rafalko
Copy link
Member Author

Thank you, @sanmai.

@maks-rafalko maks-rafalko merged commit ddbcf37 into master Jul 7, 2020
@maks-rafalko maks-rafalko deleted the feature/fail-on-risky branch July 7, 2020 06:10
@maks-rafalko
Copy link
Member Author

maks-rafalko commented Dec 21, 2021

@sanmai it looks like I've implemented this feature for the initial tests run, while from what I understand we wanted this for the mutant phpunit execution, so that if Infection changes the code and tests become risky/with warning, then Mutant becomes killed.

What do you think about if I add the same to phpunit.xml for Mutant process? (MutationConfigBuilder).

Related to #1620. For me it makes sense and it would fix this bug report atuomatically

@sanmai
Copy link
Member

sanmai commented Dec 22, 2021

Yeah, looks like this is going to make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update phpunit.xml to fail on risky tests by default
2 participants