-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Add notice to console output if actual msi is higher than required msi #811
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing to Infection. We noticed you didn't add any tests. Could you please add them to make sure everything works as expected?
I just added some unit tests for the newly added methods. I don't really get, why Travis fails now for some configurations. |
Tests fail because the infection command got changed. Unfortunately we dont'have good (enough) tests for that in place, so the minimum MSI isn't hit when that class is changed. This is a known issue though, and not considered blocking for this PR |
Hm, now AppVeyor fails, too. This should also not be caused by this pr. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just checked it with my test projects, and, unfortunately, it does not work.
I run
infection --min-msi=10
Results are:
Metrics:
Mutation Score Indicator (MSI): 100%
Mutation Code Coverage: 100%
Covered Code MSI: 100%
and I got the following notice
:
! [NOTE] The MSI is 100% percent points over the required MSI. Consider increasing the required MSI percentage the next
! time you run infection.
which is not true. It should be 90% over..
but not 100%
.
This method returns 0
while it should return 10
:
infection/src/Process/Runner/TestRunConstraintChecker.php
Lines 112 to 115 in d146b35
public function getMinRequiredValue(): float | |
{ | |
return $this->failureType === self::MSI_FAILURE ? $this->minMsi : $this->minCoveredMsi; | |
} |
because $this->failureType
is ""
.
Ah, I see my fault. Will fix it soon. |
This works now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get the builds green and will be ready to merge. Tested - works as expected.
Replaced by #877 |
Oh, nice. Thank you. |
Fixes #810