More about Property-Based Testing
There is a lot of noise (and hype) about Property-Based Testing (PBT) out there. However, most of the stuff is in the context of functional programming languages.
- A series of blog entries about PBT in Java from the developer of jqwik.
- Here is an overview article on Wikipedia.
- Quickcheck is the original tool for writing property tests.
- A nice video from a presentation by Noel Markham in which he motivates and introduces ScalaCheck.
- PropEr Testing: An online-book about Property-Based Testing. The examples use Erlang but most of the contents is generic.
Patterns for PBT
Some of the common patterns used in PBT are described here.
Alternative Tools for the JVM
There are a few alternatives to jqwik if you want to do PBT on the JVM:
- JUnit-Quickcheck: Tightly integrated with JUnit 4, also annotations to configure generators.
- QuickTheories: Unlike other systems QuickTheories supports both shrinking and targeted search using coverage data.
- Vavr: The functional library also comes with a property-based testing module.
- ScalaCheck: A mature property based testing system with shrinking and all, iff you prefer Scala over Java.
- test.check for Clojure: Inspired by QuickCheck. Since Clojure does not have static types generators must always be declared explicitly.
- KotlinTest: Has some basic support for PBT. Currently no shrinking yet.
- Frege, a Haskell for the JVM, comes with a classical QuickCheck implementation. This section from Dierk König’s Frege book provides a short introduction.
Please let me know if you learn about any other maintained library or tool.