Zee Spencer

The Rationale Behind Testing

Tests are use cases.

They illustrate how to use the code they're testing.

They provide examples of how the code works in a given context.

They are a describe in detail the code's behavior.

They highlight pain in how to use the code.

They expose complexity in our model of the business domain.

When they notify us the code no longer behaves as specified? That's a bonus. Not the goal.

When we test, we get critical design feedback.

When we use tests to explore and refine our code's design, we create nuanced, educational conversations.

Well-designed code lets us take advantage of opportunities that would otherwise be out of reach.

When we take advantage of unexpected opportunities, we create value.

This is why I test. There may be other reasons, but these are mine.

Why do you test? Care to

I help teams learn effective testing practices in Java, Ruby, JavaScript, and Clojure. If this sounds like something you're interested in, drop me a line.

Browse posts about:

Want to get notified when I publish new articles or update old ones? Subscribe to my newsletter. It's a weekly-ish set of interesting links with a short essay on programming, design, technical leadership, or anything else that strikes my fancy.

Not sure? Read the archive.