Untangle your Tests
Rudi Svartveit
Lightning Talk — 12:05 - 12:15 — Kongesalen 4
When I write tests, I try to follow these seemingly obvious rules:
- Tests should break if you don’t follow the requirements
- Tests should pass if you (still) follow the requirements
So, having more tests is always good, right?
Maybe not always. More tests can give you 100% test coverage without a single end-to-end test. That means that all your endpoints may be broken without a single test case failing, going against rule 1.
Covering implementation details or too many specifics with more tests makes them fragile. Then the tests no longer function as a safety net when you make changes, breaking rule 2.
In my talk I’ll expand upon these points, and wish to leave you with the ability to write fewer tests with more value.