Tests as a Form of Documentation
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. ...