Search⌘ K
AI Features

Writing the First Property

Explore writing your first property in PropEr to test Erlang code. Understand how to build generators for items, prices, and expected values. Learn to create straightforward properties, implement the tested functions, and validate the test coverage effectively. This lesson sets the foundation for property-driven development with practical examples.

Getting started

The first property doesn’t have to be advanced. In fact, it’s better if it’s simple. Start with something trivial-looking that represents how we want to use the program. Then, our job as developers is to make sure we can write code that matches or changes our expectations. ...