Property-based testing in Java with JUnit-Quickcheck – Part 2: Generators

In Part 1 of this tutorial we created a Property-based test (PBT) from a normal JUnit test with basic types. Now let us extend the domain object PostalParcel with a list of Products.

Continue reading “Property-based testing in Java with JUnit-Quickcheck – Part 2: Generators”

Property-based testing in Java with JUnit-Quickcheck – Part 1: The basics

To be able to show you what Property-based testing (PBT) is, let’s start by grasping the concept of a property in programming languages. Since this is a Java tutorial, I will start with Oracle and their definition of a property in their glossary:

Characteristics of an object that users can set, such as the color of a window.

Continue reading “Property-based testing in Java with JUnit-Quickcheck – Part 1: The basics”