Wrapping Up

Here's a summary of what we learned in this chapter.

We'll cover the following

Summary

When it comes to writing properties, we’re now in a pretty good place. We should feel better about balancing properties with regular example-based unit tests, as we’ve seen for regression cases. Using example tests as an anchoring mechanism to backstop our properties can help make them a lot more trustworthy. In some cases, just exhaustively enumerating the whole data set is a possibility, letting us cover more than what properties would in the first place.

What’s next

Our experience of writing properties against a well-specified program is sure to prove useful, but property-based testing has another side to it. We can use properties to explore the design of our program itself, rather than just for testing a well-specified one. In the next chapter, we’ll do just that, by using them in properties-driven development.

Get hands-on with 1200+ tech skills courses.