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

Refining the Tests

We’ve got a complete rather deterministic model, with a complete piece of code to test. What we have to do now is just run tests until they fail—if they don’t, that’s a bit scary, so we should feel free to cause a failure ourselves—and then fix the problems as they come up. That step could save us from this kind of release cycle:

  1. Write code.
  2. Test code as usual.
  3. Deploy or release the code.
  4. A customer opens a ticket.
  5. After scratching your head to figure out how in hell they get the problem, you finally reproduce it.
  6. Fix the problem.
  7. Go to 1.

Instead, we’re now more likely to have this release cycle:

  1. Write code.
  2. Stateful property test the code.
  3. Find a problem that the framework easily reproduces for you.
  4. Deploy or release the code.
  5. Wait ...
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