Watch
2
0
Fork
You've already forked percentpass
0
Percentage-passing extension for JUnit 5
  • Java 99.7%
  • CSS 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Mark Raynsford bcf662357d
Some checks are pending
main-RHEL10-x86_64-jdk25 / Build (push) Waiting to run
main-RHEL10-x86_64-jdk26 / Build (push) Waiting to run
main-RHEL9-x86_64-jdk25 / Build (push) Waiting to run
main-RHEL9-x86_64-jdk26 / Build (push) Waiting to run
Update workflows.
2026-07-31 18:42:59 +01:00
.forgejo Update workflows. 2026-07-31 18:42:59 +01:00
com.io7m.percentpass.extension Begin next development iteration. 2024-05-12 21:26:45 +00:00
com.io7m.percentpass.tests Use junit BOM. 2024-09-29 20:52:00 +00:00
src/site/resources Update site metadata. 2025-08-09 15:07:13 +00:00
.gitignore Update .gitignore. 2024-05-07 16:01:46 +00:00
.gitmodules Move to new organization. 2024-05-01 20:38:27 +00:00
doc7m-books.json Add doc7m-books.json 2026-07-31 18:36:49 +01:00
pom.xml Migrate project. 2026-06-27 10:13:05 +01:00
README-CHANGES.xml Mark release 1.0.1 2024-05-12 21:26:37 +00:00
README-LICENSE.txt Add LICENSE 2023-08-13 21:03:57 +00:00
README.in Migrate project. 2026-06-27 10:13:05 +01:00
README.md Migrate project. 2026-06-27 10:13:05 +01:00

percentpass

Maven Central Maven Central (snapshot) Java Version

com.io7m.percentpass

percentpass

A minimal Junit 5 extension that allows for executing tests multiple times, and requiring a minimum number of successful executions.

This can be useful when a particular test in a test suite is timing sensitive and cannot be reliably corrected for some reason. Perhaps you decide that working correctly 98% of the time is acceptable.

Features

  • Percentage passing; specify that a percentage of the iterations of a test must succeed.
  • Minimum passing: specify that an integral number of the iterations of a test must succeed.
  • Written in pure Java 17.
  • OSGi ready
  • JPMS ready
  • ISC license
  • High-coverage automated test suite

Usage

Annotate tests with @MinimumPassing or @PercentPassing:

  @PercentPassing(executionCount = 1000, passPercent = 98.0)
  public void testPercentOK()
  {
    // Do something that fails 1% of the time.
  }

  @MinimumPassing(executionCount = 1000, passMinimum = 980)
  public void testMinimumOK()
  {
    // Do something that fails 1% of the time.
  }