Unselfish Testing
summary
Tests that are hard to read come from over‑DRYing: loops, setup fixtures and object‑mothers hide failures and force navigation. Recommendation is concrete: replace looped assertions with separate tests, inline expected string literals, use solitary unit tests (mock dependencies with Mockito or simple stubs) for speed and isolation, keep a few sociable integration tests for coverage, and prefer one assertion per test. Aim for suite runs under a few seconds, move shared builders to suite level, and delete flaky low‑ROI tests.
AI-written summary · about
chapters (10)
- 0:00Start
- 0:36When Do We Run Our Tests
- 12:49Applying Dry at the Suite Level
- 16:15Expect Literals
- 16:55Inline a Setup
- 20:30Customer Acceptance
- 24:47Solitary Unit Tests
- 25:25Cascading Failures
- 32:16How Else Can You Improve the Test Suite
- 38:15Stop Thinking about Your Test from the Individual Point of View








