Property-based Testing with Java

More thorough tests with less code

PBT is not only suitable for functional languages but also works in traditional OOP.

Test-driven Development in OO languages —as mostly taught today — focuses on example-based test cases, which can easily be written with JUnit or similar tools. However, when looking on functional languages like Haskell or F# you often stumble open something different: property tests.

Property tests are based on the idea to specify intended properties of our code, and to let the testing library create and execute test cases that try to falsify those properties. In this workshop I will both explain the theory behind Property-Based Testing and show how to implement it with Java. Participants will be given the opportunity to make hands-on experiments using Jqwik, a PBT library implemented as JUnit 5 test engine.

If you like the Agile Testing Days Conference you might also like: