-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.in
40 lines (29 loc) · 1.13 KB
/
README.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# percentpass
A minimal [Junit 5](https://junit.org/junit5/) 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](https://www.osgi.org/) ready
* [JPMS](https://en.wikipedia.org/wiki/Java_Platform_Module_System) 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.
}
```