Class ClassOrderer.Random

  • All Implemented Interfaces:
    ClassOrderer
    Enclosing interface:
    ClassOrderer

    public static class ClassOrderer.Random
    extends Object
    implements ClassOrderer
    ClassOrderer that orders classes pseudo-randomly.

    Custom Seed

    By default, the random seed used for ordering classes is the value returned by System.nanoTime() during static initialization of this class. In order to support repeatable builds, the value of the default random seed is logged at CONFIG level. In addition, a custom seed (potentially the default seed from the previous test plan execution) 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:
    RANDOM_SEED_PROPERTY_NAME, Random