Search⌘ K

The Purpose of Code Tests: Clarity of Thought

Learn how to use code testing strategically to build confidence and clarity in your development process. Understand the balance between knowns and unknowns and how good testing helps prevent bugs and supports effective refactoring.

We'll cover the following...

Approach to testing

In this chapter, an opinionated approach to testing is described, with the intent of focusing on building confidence in our code rather than checking boxes or tracking coverage metrics.

Good tests help us have confidence in the correctness of our code, but bad testing practice wastes time and makes it harder to refactor your code.

When testing our application, ...