Class Constants
- java.lang.Object
-
- org.junit.jupiter.engine.Constants
-
@API(status=STABLE, since="5.0") public final class Constants extends Object
Collection of constants related to theJupiterTestEngine
.- Since:
- 5.0
- See Also:
ConfigurationParameters
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEACTIVATE_ALL_CONDITIONS_PATTERN
Wildcard pattern which signals that all conditions should be deactivated: "*"static String
DEACTIVATE_CONDITIONS_PATTERN_PROPERTY_NAME
Property name used to provide a pattern for deactivating conditions: "junit.jupiter.conditions.deactivate"static String
DEFAULT_TEST_INSTANCE_LIFECYCLE_PROPERTY_NAME
Property name used to set the default test instance lifecycle mode: "junit.jupiter.testinstance.lifecycle.default"static String
EXTENSIONS_AUTODETECTION_ENABLED_PROPERTY_NAME
Property name used to enable auto-detection and registration of extensions via Java'sServiceLoader
mechanism: "junit.jupiter.extensions.autodetection.enabled"static String
PARALLEL_CONFIG_CUSTOM_CLASS_PROPERTY_NAME
Property name used to specify the fully qualified class name of theParallelExecutionConfigurationStrategy
to be used for thecustom
configuration strategy: "junit.jupiter.execution.parallel.config.custom.class"static 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 thedynamic
configuration strategy: "junit.jupiter.execution.parallel.config.dynamic.factor"static String
PARALLEL_CONFIG_FIXED_PARALLELISM_PROPERTY_NAME
Property name used to set the desired parallelism for thefixed
configuration strategy: "junit.jupiter.execution.parallel.config.fixed.parallelism"static String
PARALLEL_CONFIG_STRATEGY_PROPERTY_NAME
Property name used to select theParallelExecutionConfigurationStrategy
: "junit.jupiter.execution.parallel.config.strategy"static String
PARALLEL_EXECUTION_ENABLED_PROPERTY_NAME
Property name used to enable parallel test execution: "junit.jupiter.execution.parallel.enabled"
-
-
-
Field Detail
-
DEACTIVATE_CONDITIONS_PATTERN_PROPERTY_NAME
public static final String DEACTIVATE_CONDITIONS_PATTERN_PROPERTY_NAME
Property name used to provide a pattern for deactivating conditions: "junit.jupiter.conditions.deactivate"Pattern Matching Syntax
If the pattern consists solely of an asterisk (
*
), all conditions will be deactivated. Otherwise, the pattern will be used to match against the fully qualified class name (FQCN) of each registered condition. Any dot (.
) in the pattern will match against a dot (.
) or a dollar sign ($
) in the FQCN. Any asterisk (*
) will match against one or more characters in the FQCN. All other characters in the pattern will be matched one-to-one against the FQCN.Examples
*
: deactivates all conditions.org.junit.*
: deactivates every condition under theorg.junit
base package and any of its subpackages.*.MyCondition
: deactivates every condition whose simple class name is exactlyMyCondition
.*System*
: deactivates every condition whose simple class name containsSystem
.org.example.MyCondition
: deactivates the condition whose FQCN is exactlyorg.example.MyCondition
.
-
DEACTIVATE_ALL_CONDITIONS_PATTERN
public static final String DEACTIVATE_ALL_CONDITIONS_PATTERN
Wildcard pattern which signals that all conditions should be deactivated: "*"
-
EXTENSIONS_AUTODETECTION_ENABLED_PROPERTY_NAME
public static final String EXTENSIONS_AUTODETECTION_ENABLED_PROPERTY_NAME
Property name used to enable auto-detection and registration of extensions via Java'sServiceLoader
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 String DEFAULT_TEST_INSTANCE_LIFECYCLE_PROPERTY_NAME
Property name used to set the default test instance lifecycle mode: "junit.jupiter.testinstance.lifecycle.default"Supported Values
Supported values include names of enum constants defined in
TestInstance.Lifecycle
, ignoring case.If not specified, the default is "per_method" which corresponds to
@TestInstance(Lifecycle.PER_METHOD)
.- See Also:
TestInstance
, Constant Field Values
-
PARALLEL_EXECUTION_ENABLED_PROPERTY_NAME
@API(status=EXPERIMENTAL, since="5.3") public static final 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
-
PARALLEL_CONFIG_STRATEGY_PROPERTY_NAME
@API(status=EXPERIMENTAL, since="5.3") public static final String PARALLEL_CONFIG_STRATEGY_PROPERTY_NAME
Property name used to select theParallelExecutionConfigurationStrategy
: "junit.jupiter.execution.parallel.config.strategy"Potential values:
dynamic
(default),fixed
, orcustom
.- Since:
- 5.3
- See Also:
- Constant Field Values
-
PARALLEL_CONFIG_FIXED_PARALLELISM_PROPERTY_NAME
@API(status=EXPERIMENTAL, since="5.3") public static final String PARALLEL_CONFIG_FIXED_PARALLELISM_PROPERTY_NAME
Property name used to set the desired parallelism for thefixed
configuration strategy: "junit.jupiter.execution.parallel.config.fixed.parallelism"No default value; must be an integer.
- Since:
- 5.3
- See Also:
- Constant Field Values
-
PARALLEL_CONFIG_DYNAMIC_FACTOR_PROPERTY_NAME
@API(status=EXPERIMENTAL, since="5.3") public static final 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 thedynamic
configuration strategy: "junit.jupiter.execution.parallel.config.dynamic.factor"Value must be a decimal number; defaults to
1
.- Since:
- 5.3
- See Also:
- Constant Field Values
-
PARALLEL_CONFIG_CUSTOM_CLASS_PROPERTY_NAME
@API(status=EXPERIMENTAL, since="5.3") public static final String PARALLEL_CONFIG_CUSTOM_CLASS_PROPERTY_NAME
Property name used to specify the fully qualified class name of theParallelExecutionConfigurationStrategy
to be used for thecustom
configuration strategy: "junit.jupiter.execution.parallel.config.custom.class"- Since:
- 5.3
- See Also:
- Constant Field Values
-
-