Your tests are like a special type of documentation. Because they show exactly how things actually work.
They can show every API call, and every way to construct an object, and every exception that can occur.
And the tests are written in the language developers can read fluently: software code!
They are unambiguous, executable, and never drift out of sync with the application.
Good tests are small, independent units that describe behavior. Ideally they shouldn’t be tightly coupled and rely on each other. That independence turns them into a special type of living documentation.
Discussions for your team
- Are our tests written in a way so they can be code examples as a type of documentation?
- Which of our APIs lack tests that explain intended use?
- Are our tests independent of each other?