...

/

Generalizing Test Examples

Generalizing Test Examples

Learn how to generalize test examples to make them into properties.

We'll cover the following...

Generalizing test examples

Modeling tends to work well, as long as it is possible to write the same program multiple times, and as long as one of the implementations is so simple, it is obviously correct. This is not always practical, and sometimes not possible, so we need to find better properties. That’s significantly harder than finding any one property, which can already prove difficult and requires a solid understanding of the problem space.

Note: A good trick for finding a property is to start by writing a regular unit test and then abstract it away. We can take the common steps to come up with all ...