Currently Hypothesis is intended for being run as part of a small test suite of reasonably fast tests. This is great and all, but particularly given the coverage based discovery features what you really want is to be able to part Hypothesis on a server somewhere and just have it sitting there 24/7 looking for bugs in your code, then run only the corpus of examples that it built up there every time you do a CI run.
This is almost exactly my use case. Is there a "next step" that I can contribute, please?
This isn't really a feature I'm up for someone else taking the lead on I'm afraid. It's big, touches on a lot of issues, and is pretty central to my long-term plans for the project.
The only real next step that someone who isn't me can take on for this is finding a way to pay me to work on it it so I can move it up my priority queue, and I'm overcommitted enough right now that even that will have a fairly long lead time.
:broken_heart:
馃挃
The suggestion of funding it is a serious offer. If this is really something that you need, Google isn't exactly short on cash...
I'm attempting a hypothesis project that would justify such a thing, but I can't before it's successful. Given that I really want such a feature, what should I do?
There was a short student project at Imperial College to implement a fuzzing mode for Hypothesis. This did not result in production-ready code, but did suggest the following approach:
It's still not the proverbial "simple matter of code", but we at least have some idea what to do.
Before writing our own fuzzing engine, we should start by exposing a way to treat Hypothesis tests as fuzz targets - i.e. a wrapper which takes bytes and invokes the test function once - which can be executed by any engine. This is much easier to support, a better match for the scope of our project, and allows both us and users to experiement with a variety of different approaches and tools.
python-afl would only need a small shim, and pythonfuzz or services like fuzzbuzz wouldn't even need that, so IMO we should keep such an interface even if we do end up developing our own engine.
Post-MVP we'll want to think about e.g whether we need a new Phase (or similar) for this, how it integrates with settings such as timeouts and healthchecks, and especially how the example database should work. Definitely good to get an MVP first though...
Most helpful comment
The suggestion of funding it is a serious offer. If this is really something that you need, Google isn't exactly short on cash...