JUnit repeat rule

A simple JUnit repetition rule with built-in concurrency support.

License

License

Categories

Categories

JUnit Unit Testing
GroupId

GroupId

com.github.cbismuth
ArtifactId

ArtifactId

junit-repeat-rule
Last Version

Last Version

1.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

JUnit repeat rule
A simple JUnit repetition rule with built-in concurrency support.
Project URL

Project URL

https://github.com/cbismuth/junit-repeat-rule
Source Code Management

Source Code Management

https://github.com/cbismuth/junit-repeat-rule

Download junit-repeat-rule

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.cbismuth/junit-repeat-rule/ -->
<dependency>
    <groupId>com.github.cbismuth</groupId>
    <artifactId>junit-repeat-rule</artifactId>
    <version>1.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.cbismuth/junit-repeat-rule/
implementation 'com.github.cbismuth:junit-repeat-rule:1.1.2'
// https://jarcasting.com/artifacts/com.github.cbismuth/junit-repeat-rule/
implementation ("com.github.cbismuth:junit-repeat-rule:1.1.2")
'com.github.cbismuth:junit-repeat-rule:jar:1.1.2'
<dependency org="com.github.cbismuth" name="junit-repeat-rule" rev="1.1.2">
  <artifact name="junit-repeat-rule" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.cbismuth', module='junit-repeat-rule', version='1.1.2')
)
libraryDependencies += "com.github.cbismuth" % "junit-repeat-rule" % "1.1.2"
[com.github.cbismuth/junit-repeat-rule "1.1.2"]

Dependencies

compile (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

JUnit repeat rule

build coverage javadoc repository issues licence

Description

A simple JUnit repeat rule written in Java 5+ along with concurrency support.

Usage

For Maven, add the following dependency:

<dependency>
    <groupId>com.github.cbismuth</groupId>
    <artifactId>junit-repeat-rule</artifactId>
    <version>1.1.2</version>
</dependency>

For Gradle, use:

compile 'com.github.cbismuth:junit-repeat-rule:1.1.2'

Add the RepeatRule to your test class and annotate your test case with @Repeat as shown below.

/** A test class containing a repeated test case. */
public class RepeatedTest {
    /** The rule to enable test repetition. */
    @Rule
    public RepeatRule rule = new RepeatRule();
    
    /** A repeated test case. */
    @Test
    @Repeat(times = 3, threads = 4)
    public void testRepetition() {
        // do something
    }
}

Credits

Written by Christophe Bismuth, licensed under the The MIT License (MIT). Original design by Frank Appel. Thanks to Kisty for its contributions.

Versions

Version
1.1.2
1.1.1
1.1.0
1.1.0-RC4
1.1.0-RC3
1.1.0-RC2
1.1.0-RC1