3 ms·
It's great when combined with random test input generators.
by pfdietz 2y ago
It's great when combined with random test input generators.
- eru 2y agoYes, most property based testing libraries do this.
- pfdietz 2y agoHypothesis in particular has a very clever way to do test reduction. The key problem is that if your test generator is enforcing some constraint on the input, it's not necessarily the case that naive pruning will preserve the constraint. Hypothesis has a fairly general way of enforcing that the generated test input continues to satisfy constraints.
- eru 2y agoYes, Hypothesis is great. And 'shrinkray' mentioned elsewhere in the comments here seems to be by the same author.