foundry-rs / foundry-rs/foundry
`max_test_reject_rate`: set a maximum test rejection rate per test function
- Dominant language
- Rust
- Stars
- 10.6k
- Forks
- 2.6k
- Avg merge
- 18h 20m
- Merged PRs (30d)
- 510
Description
### Component
Forge
### Describe the feature you would like
I never found using `max_test_rejects` and `vm.assume` helpful, because changing the number of fuzz runs to a different value requires re-calibrating `max_test_rejects` to a sensible value. What's more is that this value will likely depend on the amount of tests you have that are making use of `vm.assume`.
It would be useful to be able to set a maximum reject rate that is applied per test function. Say, if I want the rejection rate to be a maximum of `10%`, then this should only apply to the rejection count of each function and not globally discard the whole fuzz campaign.
Perhaps adding this information as natspec could be useful (#4085).
Edit: I see the max test rejects actually apply per function already, still it would be great to specify this in a percentage.
Contributor guide
Assessment
This issue has not been assessed yet.