FREEDOM251

Freedom251 › Property-Based Testing Tools

QuickTheories

Free plan APISelf-hosted

Visit QuickTheories Alternatives Pricing

QuickTheories's own site

What QuickTheories is

QuickTheories is a free, open-source property-based testing library for Java 8. It checks general properties and invariants by generating random valid inputs, helping Java developers exercise a range of cases without writing each input as a separate example. Its generator DSL can create common Java types, constrain generated values, and combine or convert generators for custom types. When a property fails, QuickTheories searches for smaller or simpler values that still show the failure, without requiring custom shrinking code for each type. It reports the seed for a failing property, and tests can use a fixed seed for repeatable runs.

QuickTheories can run with JUnit, TestNG, or another test framework. Its `checkAssert` method lets tests use assertion libraries such as AssertJ and Hamcrest. The `forAll` API supports theories involving one to four generated values. Developers can configure seeds, example counts, and shrink attempts with system properties, and named profiles can share configurations across properties. An experimental coverage feature can guide the search toward examples that exercise new code paths, though it may reduce performance by about 10% and interfere with JaCoCo or other coverage systems. The project was produced at NCR Edinburgh as part of its graduate training program.

Who it suits

QuickTheories suits Java developers who want to check general properties and invariants across generated inputs. It is a fit for projects using JUnit, TestNG, or another test framework that can use its Java library.

What it does well

  • Generates random samples of valid inputs.
  • Shrinks failing cases without custom code for each type.
  • Reports seeds so failing properties can be repeated.
  • Works with JUnit, TestNG, and other test frameworks.
  • Generator DSL supports constraints and custom types.
  • Apache-2.0 licensed and free.

What to know first

  • The `forAll` API supports one to four generated values.
  • Experimental coverage guidance may reduce performance by about 10%.
  • Coverage guidance may interfere with JaCoCo and other coverage systems.

Limits

The free library's `forAll` API covers theories over one to four generated values. Its experimental coverage feature may reduce performance by about 10% and interfere with JaCoCo or other coverage systems.

Plans

PlanBilled and limitsPrice
QuickTheoriesOpen source Java library · Apache-2.0 licenseFree

As github.com lists them, read 7 Oct 2026. The maker's own page has the final word.

Getting started

  1. Open the QuickTheories repository on GitHub.
  2. Use it as a Java library in a Java 8 project.
  3. Run its tests with JUnit, TestNG, or another test framework.
  4. Optionally configure seeds, example counts, and shrink attempts with system properties, or select a named profile.

Verdict

Choose QuickTheories if you want a free Java 8 library for checking properties with generated inputs, repeatable failures, and automatic shrinking. Look elsewhere if your theories need more than four generated values or if experimental coverage guidance conflicts with your coverage setup.

Questions

How much does QuickTheories cost?

The listed free plan costs nothing. It is an open-source library under the Apache-2.0 license.

Which language does it support?

QuickTheories is a property-based testing library for Java 8.

Which test frameworks can use it?

It can run with JUnit, TestNG, or another test framework.

Can it reproduce a failing property?

Yes. It reports the seed when a property fails, and tests can use a fixed seed for deterministic runs.

Does it shrink failing inputs?

Yes. It automatically tries smaller or simpler values that still falsify a property.

Who made QuickTheories?

The project was produced at NCR Edinburgh as part of its graduate training program.

Facts from QuickTheories's own pages

Assertions
The checkAssert method lets tests use assertion libraries such as AssertJ and Hamcrest. · github.com, 7 Oct 2026
Audience
The README describes the library for Java developers who want to test general properties and invariants of their code. · github.com, 7 Oct 2026
Configuration
The QT_SEED, QT_EXAMPLES, and QT_SHRINKS system properties configure the random seed, examples per theory, and shrink attempts. · github.com, 7 Oct 2026
Coverage guidance
An experimental coverage feature can focus search on examples exercising new code paths; the README says it may reduce performance by about 10% and interfere with JaCoCo or other coverage systems. · github.com, 7 Oct 2026
Coverage limitation
Coverage guidance attaches an agent to the JVM, can reduce performance by about 10%, and may interfere with JaCoCo or other coverage systems. · github.com, 7 Oct 2026
Generators
Its generator DSL can create common Java types, constrain generated values, and combine or convert generators for custom types. · github.com, 7 Oct 2026
How it tests
It checks properties by automatically generating random samples of valid inputs. · github.com, 7 Oct 2026
Input generation
It automatically generates random samples of valid inputs to check whether properties hold. · github.com, 7 Oct 2026
License
The repository identifies its license as Apache-2.0. · github.com, 7 Oct 2026
Maker
The README says QuickTheories was produced at NCR Edinburgh as part of its graduate training program. · github.com, 7 Oct 2026
Origin
The project was produced at NCR Edinburgh as part of its graduate training program. · github.com, 7 Oct 2026
Profiles
Named profiles can reuse configurations across properties and can be selected with the QT_PROFILE system property. · github.com, 7 Oct 2026
Purpose
QuickTheories is a property based testing library for Java 8, described as a Java version of QuickCheck. · github.com, 7 Oct 2026
Repeatability
Tests can use a fixed seed for deterministic runs, and QuickTheories reports the seed when a property is falsified. · github.com, 7 Oct 2026
Shrinking
It automatically tries to find smaller or simpler values that still falsify a property, without requiring custom shrinking code for each type. · github.com, 7 Oct 2026
Test frameworks
QuickTheories can run with JUnit, TestNG, or another test framework. · github.com, 7 Oct 2026
Usage limit
The forAll API supports theories over between one and four generated values. · github.com, 7 Oct 2026

Where QuickTheories stands on Freedom251

Look at these too