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

  • Test Value

    Evaluating the utility of unit tests is crucial for maintaining an efficient codebase. emphasizes that not all tests are equally valuable, and some may not be worth maintaining if they don't contribute to long-term success 1. He suggests assessing the return on investment (ROI) of each test, considering whether it truly aids in system functionality or merely adds maintenance overhead 1. Fields argues that test code should be approached differently from production code, focusing on readability and value rather than perfection 2.

    A perfect test suite would guarantee that the code base was perfect, which is really not true.

    ---

    This perspective encourages developers to prioritize tests that enhance productivity and system reliability.

       

    Removing Ineffective Tests

    Deciding when to delete tests is a critical aspect of maintaining a productive development environment. supports the idea that tests should be removed if they don't enhance productivity, echoing sentiments from industry debates on the value of unit tests 3. He advises developers to eliminate tests that don't provide value, as they can hinder rather than help 3. Fields also highlights specific improvements for test quality, such as removing unnecessary loops and setup methods to simplify test code 4.

    If they're not making you more productive, you shouldn't do it.

    ---

    This approach ensures that the remaining tests are effective and contribute positively to the development process.

Related Episodes