boxed / mutmut

Mutation testing system

Home Page:https://mutmut.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Random Sampling of Mutations

johnaugustflynn opened this issue · comments

Given how expensive mutation testing is, I think it would be valuable to have the option of only testing a random sample of mutations. This could still give you a decent idea of your test quality and some common themes of surviving mutants, without the lengthy runtime required for exhaustively testing thousands of mutants. Some other mutation testing packages already support this, but I like mutmut and would love to see it here.

I am imagining something like mutmut run --random-sample 0.4 --random-seed 42

I'd be open to contributing a PR if maintainer(s) are interested.

Another way to think about this would be shuffle. Since mutants are a fixed set, sampling is the same as shuffling before starting really.

Makes sense. So does that mean you are open to this?

Yes. For sure.