domohuhn / mutation-test

Automated mutation testing for any programming language
BSD 3-Clause "New" or "Revised" License
20 stars 3 forks source link

Reporting Mechanism for the kill Matrix #23

Closed NassimMaluli closed 1 year ago

NassimMaluli commented 1 year ago

I am currently working on a Flutter testing project to implement effective mutation testing techniques. However, these techniques require a kill matrix that can illustrate which test kills which mutant. I was wondering if there is any way to detect this using built-in mechanisms of the tool

domohuhn commented 1 year ago

Currently, no. The generated report will only show the mutations, not the test case. The stats are also only gathered per test command and the mutations are not tracked, just an overall count. I think you can only increase the level of detail in the report to test cases in the following scenarios:

I am not sure what you actually want to gain by using this information? Do you want to thin out the test cases for future runs? I don't think that this is something you should aim for. You may be able to detect "bad" tests that do not detect any mutation/do not contain asserts, but that should be covered via code review (at least if you care about testing and the correctness of your code...). Removing mutations also runs into problems - if you modify the code that was tested by these mutations, you may miss problems that were introduced by the new commits.

I think the best way to increase the efficiency is to run the mutation tests only on the diff between commits: https://github.com/domohuhn/mutation-test#running-an-incremental-analysis-ci

NassimMaluli commented 1 year ago

Interesting !, Thank you !