Published Sep 3, 2019

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

Jay Fields shares expert insights on navigating unit testing challenges, emphasizing the importance of maintaining valuable tests, evaluating testing ROI, and crafting effective strategies for enhancing software quality and productivity.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

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