Property-Based Testing with PropEr, Erlang, and Elixir (PragProg)

image

By @MononcQc

edited by Jacquelyn Carter

Property-based testing helps you create better, more solid tests with little code. Use the PropEr framework in both Erlang and Elixir, to automatically generate test cases, test stateful programs, and change your software designs for more reliable approaches. Explore the problem space better, validate your assumptions about program behavior, and expose unexpected weaknesses in your design.

Write stateless properties, and use default generators to generate test cases automatically. Write custom data generators and discover what your code can or cannot do. Learn when to use property tests and when to stick with example tests. Shrink failing test cases to their simpler expression, and generate relevant data through targeted properties. Uncover bugs with nearly no code at all with properties based on state transitions and finite state machines.

Write Erlang and Elixir properties that generate the most effective tests you’ll see, whether tests or complex integration and system tests.


“Property-based testing through PropEr and QuickCheck is one of the most powerful, yet underutilized, testing approaches of the Erlang Ecosystem. Fred has reduced the barrier to entry, making property-based testing accessible to everyone. This book is unarguably a must-have if you are serious about Erlang and Elixir. A long time coming!”

–Francesco Cesarini, Director, Erlang Solutions Ltd.


Don’t forget you can get 35% off with our Devtalk discount - just use the coupon code “devtalk.com" at checkout :023:

4 Likes