Property-Based Testing - Lucy Mair - NDC London 2023
This talk aims to introduce property-based testing, why you may want to use it, and real-life use cases for including it in code bases. How do you unit test a function? Typically, one might identify different sets of inputs (for example, for an integer you may have have sets for positive, negative, and zero) and write a single unit test using a single example from each set. Can you be sure your code is correct for the whole set? Maybe it only works for that particular example? Property-based testing is an approach to testing that involves specifying statements that should always be true (for example, reversing a list twice will give the original result) rather than relying on specific examples. In this talk, I will be giving an introduction to property-based testing, why you would want to use it, and how you might apply it in the real world. Check out our new channel: NDC Clips: @ndcclips Check out more of our featured speakers and talks at https://ndcconferences.com/ https://ndclondon.com/