-
Notifications
You must be signed in to change notification settings - Fork 21
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 Mutation Coverage based on Covered code to the HTML Report #3310
Add Mutation Coverage based on Covered code to the HTML Report #3310
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 4eee54a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 2 targetsSent with 💌 from NxCloud. |
Very nice. Since this is a "newer" optional metric, do you think it makes sense to hide this for reports that haven't added coverage? Or would that be the same score as the mutation score? In that case, it might make sense to hide it? On the website, we have a different description for this metric. It should probably be the same everywhere. I also think 'Test strength' implies the effectiveness of individual tests, which is something different to this metric |
Thanks for your suggestion, @hugo-vrijswijk
|
I mean where the mutation score and the mutation score based on coverage is the same. When there's no
Maybe "covered score"? The full name is too long to put in the table header, I think. Maybe @nicojs or @rouke-broersma has a good idea? |
Naming is hard. Covered Score sounds too much like it's code coverage. I think the definition should be changed as well because it mentions code coverage, but it has nothing to do with code coverage. It should probably rather say mutant coverage? |
How about "Covered Mutants Kill %"? This is not very short but not very long either. |
How about we subdivide the mutation score column horizontally and add a So it would be:
|
Something like this? |
@hugo-vrijswijk @rouke-broersma I have updated the columns as suggested here 👇
|
I like the horizontal approach. Good idea 👍🏻. However, I would like to see "total" to the right, "of covered" to the left. That way the focus remains on the total instead of covered. Maybe also name it "of total" instead of " total" 🤔 |
I get what you mean but if we put it to the right I think that signals that it's less important. It would no longer be the first number in the column so it won't be the first thing you see anymore. |
@nicojs @rouke-broersma - I managed to implement a combination of suggestions from both of you. This code is now in my branch. |
I have updated the screenshots both in windows and linux from my local machines. The tests are passing in my local machine. I am not sure how to debug why the screenshot comparisons are failing in the CI system. Any tips here will be helpful to get this to ready state. |
You can download the failing screenshots and update them manually. There's also an action that updates them. I'll run it now, but I'm not sure if it will work to push to your repository Edit: |
@hugo-vrijswijk Sorry for asking a newbie question. how do I download the screenshots? I am assuming it is from the link in the logs. Can you please confirm? |
I do feel like for most left-to-right readers the number on the right feels like the most important one. It's usually where the summation is. We also show the total number of mutants as the right-most value. If we want to push the "Total" as the more important metric, having it on the right side makes more sense to me |
I think that would work. Or at the workflow overview there is a link at the bottom: I've pushed the new images now though |
BundleMon (elements)Files updated (3)
Total files change +1.44KB +0.22% Final result: ✅ View report in BundleMon website ➡️ |
Yes but it's not on on the right, it's in second position. So it's neither the most left nor the most right. |
But it is the right-most of the scores. I don't have a super strong opinion on this. If other people prefer Total - Score that's fine by me |
So far, the total score is shown just after the file/directory name. For the users who would have mentally conditioned themselves to quickly scan the numbers immediately after the file name, having "total" in the left makes sense. This way, nothing is changed for them. Also, if they suddenly see a very less number in the visual space they expect, they may get confused also for sometime. There is a danger of them thinking that their team has significantly improved the numbers recently, which is not the case. |
This adds support for the Mutation Coverage based on covered code column. See stryker-mutator/mutation-testing-elements#3310 for more information. Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
The metric
mutationScoreBasedOnCoveredCode
is already calculated by Stryker and is present in the metrics object. This is a very useful metric because it says "Your tests have covered the mutated code. But they are not useful"I have see other mutation testing tools directly showing the same number as "Test Strength" in their HTML test report (refer PIT for Java).
Showing this number in our report tables will help the teams to improve their already existing tests, that seem to cover the mutation. This can be set as a goal by the teams and can be monitored over time.
This PR shows this additional metric in the HTML report.