When: September 29th, 2018
Where: HighTech Campus, Eindhoven
A suite of traditional unit tests will only be as strong as the possible arguments or parameters tested against your code. Quoting Romeu Moura: If you take a String as an argument, then the works of Shakespeare in Japanese & Korean are ONE valid input. Obviously, this can be achieved with parameterized testing. However, this makes the unit tests so big that it is harder to understand which behaviour it is validating. We want our unit tests to also serve as living documentation so they should be comprehensible and to the point.
Enter Property-Based Testing. In Property-Based Testing, we randomly generate data points within the boundary of a property to verify the property's behaviour. This not only lets us test edge cases that could expose unwanted and unexpected errors in the code but also enables us to make small tests that are readable and clear. Making these tests will also force you to think harder about the problem at hand and improve your design and code quality.
In this technical session, Kenny & João demonstrates and explains what property-based testing is, and how to implement it in C# with FsCheck and Java with JUnit-Quickcheck. If you are interested in improving your unit testing, so you don't have to worry much about test data anymore, but more about the problem your code is solving, this talk is for you!
Session Level: Beginner
Kenny Baas-Schwegler - Software Engineer Consultant
Kenny Baas-Schwegler is a Software Engineer and Consultant focusing on software quality at Xebia. He mentors teams by using practices and techniques from Domain Driven Design, Behaviour Driven Development, Test Driven Development and Continuous Delivery.
João Rosa - Software Consultant
João Rosa is a Software Developer, focused on delivering quality software that matters. Believes in the software crafts to provide software in sustainable peace; he is a DDD, BDD and TDD practitioner. Can't live without his CI/CD pipeline
During his career he always pushed the teams and himself to improve the communication, reducing the gap between developers and the business.