Published Sep 3, 2019

SE-Radio Episode 322: Bill Venners on Property Based Tests

Matthew Farwell and Bill Venners dive into the power of property-based testing, revealing how effective test shrinking and data generation techniques can streamline software development by identifying edge conditions and clarifying debugging processes.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Shrinker Algorithms

    Shrinker algorithms play a crucial role in simplifying failing test cases by reducing their size for better clarity. explains that these algorithms operate by assuming a failure will occur again, thus focusing on the inputs that previously caused the failure 1. This approach allows developers to redefine shrinker algorithms based on specific data types, such as integers or strings, to streamline the debugging process 2.

    You can write a shrinker of your type or shrinker event and use that instead if you want to.

    ---

    The flexibility of these algorithms enables developers to tailor them to their specific needs, enhancing the efficiency of test case analysis.

       

    Practical Shrinking

    Practical applications of shrinker algorithms demonstrate their effectiveness in test development. discusses how shrinkers can be applied to structured data types, like a person's age or name, by using existing shrinkers for integers and strings 3. This method generates a stream of simpler test cases, making it easier to identify the root cause of a failure.

    Shrinking does work and it does make it, the output a little nicer.

    ---

    By progressively reducing the complexity of inputs, shrinkers help developers pinpoint bugs more efficiently, especially when dealing with complex data structures or large datasets 4.

Related Episodes