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

feat: functionality to bound the execution #17

Open
yxliang01 opened this issue Oct 20, 2019 · 4 comments
Open

feat: functionality to bound the execution #17

yxliang01 opened this issue Oct 20, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@yxliang01
Copy link
Contributor

Current design of Vertigo will attempt to generate all possible mutants in the defined mutation space, only then report will be generated. However, it is likely that there is no enough budget to perform the evaluation of all possible mutants. For example, it can take ~20 mins to run the test suite of OpenZeppelin. So, it's impractical to wait for the testing task to complete for the report. As a result, a functionality to limit the execution boundary might be a good idea, and maybe also make Vertigo generate report at exit (potentially unexpected) as long as one mutant was generated and evaluated so that external tool like timeout can be used to bound the execution timeout.

Thanks

@JoranHonig
Copy link
Owner

You can use --sample-ratio to use the mutant sampling technique. In which case you take a random subset of the mutations to run analysis on. This improves runtime, and decreases the precision of the reported mutation score.

I also thought I merged a feature that allows you to use a non-random partition of the mutations.
This helps with determinism, or when you want to do the analysis in separate runs.
I will try to find this code and merge it.

and maybe also make Vertigo generate report at exit (potentially unexpected) as long as one mutant was generated and evaluated so that external tool like timeout can be used to bound the execution timeout.

I like this idea 👍

@yxliang01
Copy link
Contributor Author

@JoranHonig Indeed, I overlooked this option. However, it's not intuitive to set a wanted value though I think. Since the number of mutants Vertigo can generate various from one combination of versions of project under test and Vertigo and Vertigo doesn't support output the number of mutants possible currently (then, terminate) if I'm not mistaken. I feel normal user would prefer setting the number of mutants to be generated instead, since then the running time should then be predictable.

@JoranHonig JoranHonig added the enhancement New feature or request label Oct 24, 2019
@RickGriff
Copy link

It would be great if you could select 1) the contracts to mutate and 2) the test file(s) to run.

For systems that are fairly modular and loosely coupled, this could save a lot of time/resources.

@JoranHonig
Copy link
Owner

@RickGriff you can filter directories from execution . Example: --exclude contracts/mock

Let me think about better ways to do this. Technically incremental mutation testing could help a lot already.

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

No branches or pull requests

3 participants