Skip to Main Content
Property-Based Testing with PropEr, Erlang, and Elixir
book

Property-Based Testing with PropEr, Erlang, and Elixir

by Fred Hebert
January 2019
Intermediate to advanced content levelIntermediate to advanced
376 pages
8h 49m
English
Pragmatic Bookshelf
Content preview from Property-Based Testing with PropEr, Erlang, and Elixir

Wrapping Up

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, you can let it know how to retarget shrinking toward more meaningful neutral values for a given generator. You’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.

With shrinking under your belt, you now have pretty much all of the tools you’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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Erlang and OTP in Action

Erlang and OTP in Action

Eric Merritt, Richard Carlsson, Martin Logan
Testing Elixir

Testing Elixir

Andrea Leopardi, Jeffrey Matthias

Publisher Resources

ISBN: 9781680506556Errata Page