TAKES
When should we add tests?
Everyone writes tests. For a different bug.
- Alex: Before the code. That's the design.
- Jo: After the second time it breaks the same way.
- Riley: For the part that wakes me up at night.
- Taylor: The agent writes them. I read the ones that fail.
- Morgan: Start with the ones that check who's allowed to do what.
- Chris: Before we upstream it. Maintainers ask first.
- Pat: When the auditor asks for the coverage report.
- Maya: After we know anyone wants it.
- Nora: Watching five users try it is a test too.
- Hugo: Always. I'll write them tonight.
- Ruth: The tests are why it's worked since 2003.
- Greg: When we know which version we're keeping.
๐ฏ SUPER REASONABLE
Super Reasonable, the advisor who never takes a side
Tests are insurance, and the premium should follow the risk. Code that moves money, checks permissions or will outlive its team earns tests early. An experiment with a kill date earns them once it survives. A test is worth what its failure would cost, whatever the coverage report says.
- Leaks data or moves money โ test the access rules first
- Might be deleted next month โ test it once it survives
- Broke this way before โ pin it with a regression test
Related: โ Test Coverage