Verification built in.
WHAT TESTS PROVIDE
Confidence that behaviour is correct The ability to change code safely Documentation of intended behaviour Protection against defects returning
WHY THAT SECOND POINT MATTERS MOST
Without tests, every change carries unknown risk, and people stop changing things.
WHAT LEVELS TO WRITE
Many fast unit tests Fewer integration tests Few end-to-end tests
WHAT TO TEST
Behaviour, not implementation.
WHY
Tests coupled to implementation break on every refactor, and prevent improvement.
WHAT TO TEST FIRST
What matters most, and everything that has broken before.
WHAT TEST-DRIVEN DEVELOPMENT IS
Writing a failing test, making it pass, then improving the code.
WHAT IT PROVIDES BEYOND TESTS
Design pressure toward testable, decoupled code.
WHAT IT COSTS
A change in habit that takes time.
WHAT TO AVOID
Tests depending on timing or ordering Tests requiring external services Tests nobody maintains
WHAT INTERMITTENT TESTS CAUSE
Failures being ignored, which defeats the entire purpose.