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

Probabilistic (random) Mutation #278

Open
benedikt-mangold opened this issue Apr 19, 2023 · 3 comments
Open

Probabilistic (random) Mutation #278

benedikt-mangold opened this issue Apr 19, 2023 · 3 comments

Comments

@benedikt-mangold
Copy link

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
Copy link
Owner

boxed commented Apr 19, 2023

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

@benedikt-mangold
Copy link
Author

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
Copy link
Owner

boxed commented Apr 25, 2023

two mutants are present in the function

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

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

No branches or pull requests

2 participants