Skip to content


Switch branches/tags

Latest commit

Bumps [slf4j-api]( from 2.0.1 to 2.0.2.
- [Release notes](
- [Commits](qos-ch/slf4j@v_2.0.1...v_2.0.2)

- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch

Signed-off-by: dependabot[bot] <>

Signed-off-by: dependabot[bot] <>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]>

Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Maven Central Build Status Code Quality: Java Total Alerts

Software Quality Award 2016

junit-quickcheck: Property-based testing, JUnit-style

junit-quickcheck is a library that supports writing and running property-based tests in JUnit, inspired by QuickCheck for Haskell.

Property-based tests capture characteristics, or "properties", of the output of code that should be true given arbitrary inputs that meet certain criteria. For example, imagine a function that produces a list of the prime factors of a positive integer n greater than 1. Regardless of the specific value of n, the function must give a list whose members are all primes, must equal n when all multiplied together, and must be different from the factorization of a positive integer m greater than 1 and not equal to n.

Rather than testing such properties for all possible inputs, junit-quickcheck and other QuickCheck kin generate some number of random inputs, and verify that the properties hold at least for the generated inputs. This gives us some reasonable assurance upon repeated test runs that the properties hold true for any valid inputs.


Documentation for the current stable version

Basic example

    import com.pholser.junit.quickcheck.Property;
    import com.pholser.junit.quickcheck.runner.JUnitQuickcheck;
    import org.junit.runner.RunWith;

    import static org.junit.Assert.*;

    public class StringProperties {
        @Property public void concatenationLength(String s1, String s2) {
            assertEquals(s1.length() + s2.length(), (s1 + s2).length());

Other examples

After browsing the documentation, have a look at some examples in module junit-quickcheck-examples. These are built with junit-quickcheck.