Class MethodOrderer.Random

  • All Implemented Interfaces:
    MethodOrderer
    Enclosing interface:
    MethodOrderer

    public static class MethodOrderer.Random
    extends Object
    implements MethodOrderer
    MethodOrderer that orders methods pseudo-randomly and allows for concurrent execution by default.

    Custom Seed

    By default, the random seed used for ordering methods is the value returned by System.nanoTime(). In order to produce repeatable builds, a custom seed may be specified via the junit.jupiter.execution.order.random.seed configuration parameter which can be supplied via the Launcher API, build tools (e.g., Gradle and Maven), a JVM system property, or the JUnit Platform configuration file (i.e., a file named junit-platform.properties in the root of the class path). Consult the User Guide for further information.

    See Also:
    getDefaultExecutionMode(), RANDOM_SEED_PROPERTY_NAME, Random