Search⌘ K
AI Features

Writing Generators

Explore how to write and test custom generators for data such as titles authors and ISBNs within a stateful property-based testing framework in Erlang. Understand how these generators simulate valid inputs to validate a complex system accurately.

Getting started

Since we have a fairly large stateful system to validate, we should start by figuring out what data the system should accept, and what is valid and invalid. This is useful because it sets a baseline for expectations on which to build. It can also hint at useful paths or strategies moving forward. We’ve got a basic idea about the shape of data based on our database schema.

The generators

We’ll have a total of three generators for the initial testing ...