boxed/mutmut

Probabilistic (random) Mutation

benedikt-mangold opened this issue · 3 comments

I would like to have a setting, where each suitable mutation is only applied with a probability of x (e.g. 50%) for one mutation-run.

Then, being able to configure N mutation-runs (e.g. N=100), getting the stats on

  • average impact of a single mutation on the final score (independent of the others)
  • quality score per function
    • average impact scores of mutations within a function

This allows to break down the quality statistics on a lower level (e.g. functions, lines of code) to point towards subparts that are tested particularly well / week

boxed commented

That seems like just sometimes running some mutants multiple times unnecessarily and missing some, while taking more time.

From a statistical point of view, you can get insights on "how many mutants do you need to affect the results of a test". As an example - test is not failing, two mutants are present in the function. How do you know which one is actually responsible? By (randomly) eliminating one mutant (over the N runs), you can assign importances to mutants, depending on how many tests are affected solely due to a single mutant

boxed commented

two mutants are present in the function

That's never the case. Mutmut always tests exactly one mutant at a time.