Class Constants

    • Field Detail

      • DEACTIVATE_CONDITIONS_PATTERN_PROPERTY_NAME

        public static final java.lang.String DEACTIVATE_CONDITIONS_PATTERN_PROPERTY_NAME
        Property name used to provide patterns for deactivating conditions: "junit.jupiter.conditions.deactivate"

        Pattern Matching Syntax

        If the property value consists solely of an asterisk (*), all conditions will be deactivated. Otherwise, the property value will be treated as a comma-separated list of patterns where each individual pattern will be matched against the fully qualified class name (FQCN) of each registered condition. Any dot (.) in a pattern will match against a dot (.) or a dollar sign ($) in a FQCN. Any asterisk (*) will match against one or more characters in a FQCN. All other characters in a pattern will be matched one-to-one against a FQCN.

        Examples

        • *: deactivates all conditions.
        • org.junit.*: deactivates every condition under the org.junit base package and any of its subpackages.
        • *.MyCondition: deactivates every condition whose simple class name is exactly MyCondition.
        • *System*: deactivates every condition whose FQCN contains System.
        • *System*, *Dev*: deactivates every condition whose FQCN contains System or Dev.
        • org.example.MyCondition, org.example.TheirCondition: deactivates conditions whose FQCN is exactly org.example.MyCondition or org.example.TheirCondition.
        See Also:
        DEACTIVATE_ALL_CONDITIONS_PATTERN, ExecutionCondition, Constant Field Values
      • DEFAULT_DISPLAY_NAME_GENERATOR_PROPERTY_NAME

        public static final java.lang.String DEFAULT_DISPLAY_NAME_GENERATOR_PROPERTY_NAME
        Property name used to set the default display name generator class name: "junit.jupiter.displayname.generator.default"
        See Also:
        DisplayNameGenerator.DEFAULT_GENERATOR_PROPERTY_NAME, Constant Field Values
      • EXTENSIONS_AUTODETECTION_ENABLED_PROPERTY_NAME

        public static final java.lang.String EXTENSIONS_AUTODETECTION_ENABLED_PROPERTY_NAME
        Property name used to enable auto-detection and registration of extensions via Java's ServiceLoader mechanism: "junit.jupiter.extensions.autodetection.enabled"

        The default behavior is not to perform auto-detection.

        See Also:
        Constant Field Values
      • DEFAULT_TEST_INSTANCE_LIFECYCLE_PROPERTY_NAME

        public static final java.lang.String DEFAULT_TEST_INSTANCE_LIFECYCLE_PROPERTY_NAME
        Property name used to set the default test instance lifecycle mode: "junit.jupiter.testinstance.lifecycle.default"
        See Also:
        TestInstance.Lifecycle.DEFAULT_LIFECYCLE_PROPERTY_NAME, Constant Field Values
      • PARALLEL_EXECUTION_ENABLED_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String PARALLEL_EXECUTION_ENABLED_PROPERTY_NAME
        Property name used to enable parallel test execution: "junit.jupiter.execution.parallel.enabled"

        By default, tests are executed sequentially in a single thread.

        Since:
        5.3
        See Also:
        Constant Field Values
      • DEFAULT_PARALLEL_EXECUTION_MODE

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String DEFAULT_PARALLEL_EXECUTION_MODE
        Property name used to set the default test execution mode: "junit.jupiter.execution.parallel.mode.default"
        See Also:
        Execution.DEFAULT_EXECUTION_MODE_PROPERTY_NAME, Constant Field Values
      • DEFAULT_CLASSES_EXECUTION_MODE_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String DEFAULT_CLASSES_EXECUTION_MODE_PROPERTY_NAME
        Property name used to set the default test execution mode for top-level classes: "junit.jupiter.execution.parallel.mode.classes.default"
        See Also:
        Execution.DEFAULT_CLASSES_EXECUTION_MODE_PROPERTY_NAME, Constant Field Values
      • PARALLEL_CONFIG_PREFIX

        static final java.lang.String PARALLEL_CONFIG_PREFIX
        See Also:
        Constant Field Values
      • PARALLEL_CONFIG_STRATEGY_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String PARALLEL_CONFIG_STRATEGY_PROPERTY_NAME
        Property name used to select the ParallelExecutionConfigurationStrategy: "junit.jupiter.execution.parallel.config.strategy"

        Potential values: dynamic (default), fixed, or custom.

        Since:
        5.3
        See Also:
        Constant Field Values
      • PARALLEL_CONFIG_FIXED_PARALLELISM_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String PARALLEL_CONFIG_FIXED_PARALLELISM_PROPERTY_NAME
        Property name used to set the desired parallelism for the fixed configuration strategy: "junit.jupiter.execution.parallel.config.fixed.parallelism"

        No default value; must be a positive integer.

        Since:
        5.3
        See Also:
        Constant Field Values
      • PARALLEL_CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME

        @API(status=EXPERIMENTAL,
             since="5.10")
        public static final java.lang.String PARALLEL_CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME
        Property name used to configure the maximum pool size of the underlying fork-join pool for the fixed configuration strategy: "junit.jupiter.execution.parallel.config.fixed.max-pool-size"

        Value must be an integer and greater than or equal to "junit.jupiter.execution.parallel.config.fixed.parallelism"; defaults to 256 + fixed.parallelism.

        Note: This property only takes affect on Java 9+.

        Since:
        5.10
        See Also:
        Constant Field Values
      • PARALLEL_CONFIG_FIXED_SATURATE_PROPERTY_NAME

        @API(status=EXPERIMENTAL,
             since="5.10")
        public static final java.lang.String PARALLEL_CONFIG_FIXED_SATURATE_PROPERTY_NAME
        Property name used to disable saturation of the underlying fork-join pool for the fixed configuration strategy: "junit.jupiter.execution.parallel.config.fixed.saturate"

        When set to false the underlying fork-join pool will reject additional tasks if all available workers are busy and the maximum pool-size would be exceeded.

        Value must either true or false; defaults to true.

        Note: This property only takes affect on Java 9+.

        Since:
        5.10
        See Also:
        Constant Field Values
      • PARALLEL_CONFIG_DYNAMIC_FACTOR_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String PARALLEL_CONFIG_DYNAMIC_FACTOR_PROPERTY_NAME
        Property name used to set the factor to be multiplied with the number of available processors/cores to determine the desired parallelism for the dynamic configuration strategy: "junit.jupiter.execution.parallel.config.dynamic.factor"

        Value must be a positive decimal number; defaults to 1.

        Since:
        5.3
        See Also:
        Constant Field Values
      • PARALLEL_CONFIG_CUSTOM_CLASS_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String PARALLEL_CONFIG_CUSTOM_CLASS_PROPERTY_NAME
        Property name used to specify the fully qualified class name of the ParallelExecutionConfigurationStrategy to be used for the custom configuration strategy: "junit.jupiter.execution.parallel.config.custom.class"
        Since:
        5.3
        See Also:
        Constant Field Values
      • DEFAULT_TIMEOUT_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String DEFAULT_TIMEOUT_PROPERTY_NAME
        Property name used to set the default timeout for all testable and lifecycle methods: "junit.jupiter.execution.timeout.default".
        See Also:
        Timeout.DEFAULT_TIMEOUT_PROPERTY_NAME, Constant Field Values
      • DEFAULT_TESTABLE_METHOD_TIMEOUT_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String DEFAULT_TESTABLE_METHOD_TIMEOUT_PROPERTY_NAME
        Property name used to set the default timeout for all testable methods: "junit.jupiter.execution.timeout.testable.method.default".
        See Also:
        Timeout.DEFAULT_TESTABLE_METHOD_TIMEOUT_PROPERTY_NAME, Constant Field Values
      • DEFAULT_TEST_METHOD_TIMEOUT_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String DEFAULT_TEST_METHOD_TIMEOUT_PROPERTY_NAME
        Property name used to set the default timeout for all @Test methods: "junit.jupiter.execution.timeout.test.method.default".
        See Also:
        Timeout.DEFAULT_TEST_METHOD_TIMEOUT_PROPERTY_NAME, Constant Field Values
      • DEFAULT_TEST_TEMPLATE_METHOD_TIMEOUT_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String DEFAULT_TEST_TEMPLATE_METHOD_TIMEOUT_PROPERTY_NAME
        Property name used to set the default timeout for all @TestTemplate methods: "junit.jupiter.execution.timeout.testtemplate.method.default".
        See Also:
        Timeout.DEFAULT_TEST_TEMPLATE_METHOD_TIMEOUT_PROPERTY_NAME, Constant Field Values
      • DEFAULT_TEST_FACTORY_METHOD_TIMEOUT_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String DEFAULT_TEST_FACTORY_METHOD_TIMEOUT_PROPERTY_NAME
        Property name used to set the default timeout for all @TestFactory methods: "junit.jupiter.execution.timeout.testfactory.method.default".
        See Also:
        Timeout.DEFAULT_TEST_FACTORY_METHOD_TIMEOUT_PROPERTY_NAME, Constant Field Values
      • DEFAULT_LIFECYCLE_METHOD_TIMEOUT_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String DEFAULT_LIFECYCLE_METHOD_TIMEOUT_PROPERTY_NAME
        Property name used to set the default timeout for all lifecycle methods: "junit.jupiter.execution.timeout.lifecycle.method.default".
        See Also:
        Timeout.DEFAULT_LIFECYCLE_METHOD_TIMEOUT_PROPERTY_NAME, Constant Field Values
      • DEFAULT_BEFORE_ALL_METHOD_TIMEOUT_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String DEFAULT_BEFORE_ALL_METHOD_TIMEOUT_PROPERTY_NAME
        Property name used to set the default timeout for all @BeforeAll methods: "junit.jupiter.execution.timeout.beforeall.method.default".
        See Also:
        Timeout.DEFAULT_BEFORE_ALL_METHOD_TIMEOUT_PROPERTY_NAME, Constant Field Values
      • DEFAULT_BEFORE_EACH_METHOD_TIMEOUT_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String DEFAULT_BEFORE_EACH_METHOD_TIMEOUT_PROPERTY_NAME
        Property name used to set the default timeout for all @BeforeEach methods: "junit.jupiter.execution.timeout.beforeeach.method.default".
        See Also:
        Timeout.DEFAULT_BEFORE_EACH_METHOD_TIMEOUT_PROPERTY_NAME, Constant Field Values
      • DEFAULT_AFTER_EACH_METHOD_TIMEOUT_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String DEFAULT_AFTER_EACH_METHOD_TIMEOUT_PROPERTY_NAME
        Property name used to set the default timeout for all @AfterEach methods: "junit.jupiter.execution.timeout.aftereach.method.default".
        See Also:
        Timeout.DEFAULT_AFTER_EACH_METHOD_TIMEOUT_PROPERTY_NAME, Constant Field Values
      • DEFAULT_AFTER_ALL_METHOD_TIMEOUT_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String DEFAULT_AFTER_ALL_METHOD_TIMEOUT_PROPERTY_NAME
        Property name used to set the default timeout for all @AfterAll methods: "junit.jupiter.execution.timeout.afterall.method.default".
        See Also:
        Timeout.DEFAULT_AFTER_ALL_METHOD_TIMEOUT_PROPERTY_NAME, Constant Field Values
      • TIMEOUT_MODE_PROPERTY_NAME

        @API(status=STABLE,
             since="5.10")
        public static final java.lang.String TIMEOUT_MODE_PROPERTY_NAME
        Property name used to configure whether timeouts are applied to tests: "junit.jupiter.execution.timeout.mode".
        See Also:
        Timeout.TIMEOUT_MODE_PROPERTY_NAME, Constant Field Values
      • DEFAULT_TEST_METHOD_ORDER_PROPERTY_NAME

        @API(status=STABLE,
             since="5.9")
        public static final java.lang.String DEFAULT_TEST_METHOD_ORDER_PROPERTY_NAME
        Property name used to set the default method orderer class name: "junit.jupiter.testmethod.order.default"
        See Also:
        MethodOrderer.DEFAULT_ORDER_PROPERTY_NAME, Constant Field Values
      • DEFAULT_TEST_CLASS_ORDER_PROPERTY_NAME

        @API(status=STABLE,
             since="5.9")
        public static final java.lang.String DEFAULT_TEST_CLASS_ORDER_PROPERTY_NAME
        Property name used to set the default class orderer class name: "junit.jupiter.testclass.order.default"
        See Also:
        ClassOrderer.DEFAULT_ORDER_PROPERTY_NAME, Constant Field Values
      • TEMP_DIR_SCOPE_PROPERTY_NAME

        @Deprecated
        @API(status=DEPRECATED,
             since="5.8")
        public static final java.lang.String TEMP_DIR_SCOPE_PROPERTY_NAME
        Deprecated.
        Property name used to set the scope of temporary directories created via the @TempDir annotation: "junit.jupiter.tempdir.scope"
        See Also:
        TempDir.SCOPE_PROPERTY_NAME, Constant Field Values
      • DEFAULT_TIMEOUT_THREAD_MODE_PROPERTY_NAME

        @API(status=EXPERIMENTAL,
             since="5.9")
        public static final java.lang.String DEFAULT_TIMEOUT_THREAD_MODE_PROPERTY_NAME
        Property name used to set the default timeout thread mode.
        Since:
        5.9
        See Also:
        Timeout, Timeout.ThreadMode, Constant Field Values
      • DEFAULT_TEMP_DIR_FACTORY_PROPERTY_NAME

        @API(status=EXPERIMENTAL,
             since="5.10")
        public static final java.lang.String DEFAULT_TEMP_DIR_FACTORY_PROPERTY_NAME
        Property name used to set the default factory for temporary directories created via the @TempDir annotation: "junit.jupiter.tempdir.factory.default"
        Since:
        5.10
        See Also:
        TempDir.DEFAULT_FACTORY_PROPERTY_NAME, Constant Field Values
    • Constructor Detail

      • Constants

        private Constants()