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

[Feature Request] Random Sampling of Mutations #306

Closed
johnaugustflynn opened this issue Feb 19, 2024 · 5 comments
Closed

[Feature Request] Random Sampling of Mutations #306

johnaugustflynn opened this issue Feb 19, 2024 · 5 comments

Comments

@johnaugustflynn
Copy link

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.

@boxed
Copy link
Owner

boxed commented Feb 19, 2024

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

@johnaugustflynn
Copy link
Author

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

@boxed
Copy link
Owner

boxed commented Feb 20, 2024

Yes. For sure.

@boxed
Copy link
Owner

boxed commented Oct 20, 2024

Duplicate of #278

@boxed boxed marked this as a duplicate of #278 Oct 20, 2024
@boxed boxed closed this as completed Oct 20, 2024
@boxed
Copy link
Owner

boxed commented Oct 20, 2024

Also, I released mutmut 3 which WAY faster, so this issue isn't as critical anymore I think.

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