High Cost Tests and High Value Tests
summary
Built a small Ruby on Rails inventory app with capybara end-to-end tests and measured costs: 22 system tests versus 119 unit tests, system tests take ~13s total while unit tests run under 2s, and system tests are ~12% of tests but ~75% of run time. Larger projects hit ~1,800 tests and ~12 minute suites; CI medians around 12–16 minutes per build. Recommendation: prefer focused fast tests and reserve slow end-to-end tests.
AI-written summary · about
chapters (41)
- 0:00Start
- 3:46I could Outside-In TDD
- 5:15I'm making a decision
- 5:35What does worth it mean?
- 6:40How can you measure cost and value?
- 8:09How do tests cost time?
- 8:36The test runs , A lot
- 9:47fixed
- 10:12Writing the test improves code design
- 11:18Bugs
- 13:18Strategy Tactics
- 15:58System tests are 12% of the tests and 75% of the run time
- 16:10The slowest 4 tests are 40% of the run time
- 16:57Another project
- 17:55Balance 1 time spent
- 18:48As you write similar tests, costs go down
- 19:28Short term cost is not related to test type
- 19:50Long term savings come from focus
- 20:11Big payoff in avoiding the slowest tests
- 21:19No individual test causes a slow suite
- 22:32Is a slow test suite inevitable?
- 25:06Test suites get longer as the code gets more complicated.
- 25:48Testing is great
- 26:10Testing is slow
- 26:45That's hard. Let's throw CI at it.
- 27:11Giving up causes you to lose the value of tests in improving code
- 29:47System Test Workflow Test Unit test
- 30:16Unit test A partial test of the workflow Or a model test Or a logic object
- 31:12What if you don't like unit tests?
- 31:30TDD is Dead
- 31:44Argument against unit tests: Unit tests cos too much to write
- 32:07True if framework doesn't handle tests
- 33:05bad unit tests
- 34:02A lot of unrelated assertions
- 34:59Lack of unit tests
- 35:13diagnose
- 35:32fail?
- 36:18Create the minimum amount of objects needed to trigger the failure
- 36:33Use multiple test failures as an opportunity
- 36:50Sometimes you can delete tests
- 37:20Use integration tests to save development time








