Zac-HD / hypofuzz

Adaptive fuzzing of Hypothesis tests
https://hypofuzz.com/docs
GNU Affero General Public License v3.0
82 stars 3 forks source link

Split the HypoFuzz engine into a Hypothesis `backend` and an executor #36

Open Zac-HD opened 6 months ago

Zac-HD commented 6 months ago

Hypothesis has recently grown a notion of alternative backends, which use the new IR layer (https://github.com/HypothesisWorks/hypothesis/issues/3921) to support e.g. symbolic execution (https://github.com/HypothesisWorks/hypothesis/issues/3914).

Supporting @settings(backend="hypofuzz") would be quite useful - for example, as an easy way to work with Pytest fixtures, or to support fuzzing in environments where Pytest is not available at all (CPython alphas?).

The implementation isn't trivial, since we have to rearrange a lot of code to both fit with the IR-oriented, context-manager-scoped interface for backends - while also having a hook to allow for interleaving execution of multiple tests - but I don't think there are any fundamental difficulties.

This change is independent of #3, but strongly complimentary in practice.