Wrapping Up

Here's a summary of what we learned in this chapter.

We'll cover the following

Summary

We’ve covered what is pretty much an optimization when we have large counterexamples that PropEr doesn’t necessarily know how to handle. By using the ?SHRINK macro, we can let it know how to retarget shrinking toward more meaningful neutral values for a given generator. We’ve also seen that with ?LETSHRINK, we can give PropEr tips on how to divide up a data structure to find problems with more ease.

What’s next

Now that we’ve gone over shrinking, we now have pretty much all of the tools we’ll need to handle stateless property tests. In fact, we’re almost done with stateless properties. Right now, the only thing left to see is a brand new PropEr feature called targeted property-based testing, which at this point will just be a bonus for some amazing flexibility in property testing.

Get hands-on with 1200+ tech skills courses.