Back To Schedule
Wednesday, October 3 • 10:00 - 11:00
Improving design and code quality with Property-based testing

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
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!

avatar for Kenny Baas

Kenny Baas

Kenny Baas 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.He is an advocate for collaborating in... Read More →
avatar for João Rosa

João Rosa

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 pipelineDuring his career he always pushed the teams... Read More →

Wednesday October 3, 2018 10:00 - 11:00 CEST
Room 3