Menu

Home

Andres Gomez Casanova

Welcome to Random jUnit

This Maven plugin executes the jUnit tests in a random order. This does not help to reproduce errors, but it could help to detect other errors when having a lot of tests.

In order to execute you only need two things: The Maven dependency:

  <dependencies>
    <dependency>
      <groupId>net.sf.randomjunit</groupId>
      <artifactId>random-junit</artifactId>
      <version>1.0.3</version>
    </dependency>
  </dependencies>

and the test defintion: 1) For Suites

@RunWith(RandomSuite.class)
@SuiteClasses({ Suite1.class , Suite2.class })
public final class AceptationTests {
}

2) For tests

@RunWith(RandomTestRunner.class)
public final class Suite1 {

 @Test
 public void test1(){
 }

}