Introduction to Properties-driven Development
Get introduced to Properties-driven Development, and the program that we'll be building throughout this chapter.
We'll cover the following...
Properties-driven development
There are plenty of tools available to help here, and for software developers, test-driven development (TDD) is one of the most frequently used approaches. TDD forces us to position ourselves first as a user of the program rather than an implementer. Before writing any new feature, we first need to write a failing test exercising the feature and then write the code to make it pass. All program improvements are a series of small iterations built on well-understood foundations.
This kind of approach can be interesting in the context of property-based testing. Before writing a program, we’ll want to think about what it should do. Unsurprisingly, we’ll want to encode these assumptions as rules for properties. Then, we’ll run our program against them as we go. What happens next is a series of increasing failures, where we have to ...