SE-Radio Episode 256: Jay Fields on Working Effectively with Unit Tests

Topics covered
Popular Clips
Episode Highlights
Maintainability
Maintaining unit tests is crucial for long-term software quality. emphasizes the importance of writing tests that are approachable and easy to understand, even months after they were created. He suggests avoiding overly complex test setups and encourages clarity over brevity, noting that, "repeating yourself in ways that will enable someone that's never seen the test before to more quickly understand what's going on can be a good thing" 1. Fields also advises against using loops and reflection in test code, advocating for straightforward tests that are easy to navigate 2.
Excessive Testing
Excessive unit testing can become a burden if not managed properly. Fields discusses the debate around the productivity of unit tests, agreeing with that tests should be discarded if they don't enhance productivity 3. He argues that both too many and too few tests lead to inefficiency, as unnecessary tests waste time and resources 4. Fields believes that programmers can fall in love with testing due to the confidence and experimentation it allows, but warns against writing tests that don't provide value 5.
Related Episodes


Episode 167: The History of JUnit and the Future of Testing with Kent Beck
Answers 383 questions

SE-Radio Episode 283: Alexander Tarlinder on Developer Testing
Answers 383 questions
SE Radio 633: Itamar Friedman on Automated Testing with Generative AI
Answers 383 questions

SE Radio 637: Steve Smith on Software Quality
Answers 383 questions

SE-Radio Episode 295: Michael Feathers on Legacy Code
Answers 383 questions

SE Radio 572: Gregory Kapfhammer on Flaky Tests
Answers 383 questions

SE-Radio Episode 357: Adam Barr on Code Quality
Answers 383 questions

SE-Radio Episode 324: Marc Hoffmann on Code Test Coverage Analysis and Tools
Answers 383 questions

366: Test Automation
Answers 383 questions

Episode 155: Johannes Link & Lasse Koskela on TDD
Answers 383 questions
SE Radio 599: Jason C. McDonald on Quantified Tasks
Answers 383 questions
SE Radio 589: Zac Hatfield-Dodds on Property-Based Testing in Python
Answers 383 questions

SE-Radio Episode 262: Software Quality with Bill Curtis
Answers 383 questions

SE Radio 603: Rishi Singh on Using GenAI for Test Code Generation
Answers 383 questions













