@Execution is used to configure the parallel execution
mode of a test class or test method.
This annotation is inherited within class hierarchies.
If this annotation is not present, ExecutionMode#SAME_THREAD is
used unless a default execution mode is defined via one of the following
configuration parameters:
junit.jupiter.execution.parallel.mode.classes.default overrides junit.jupiter.execution.parallel.mode.default for top-level classes.
The default execution mode is not applied to classes that use the
PER_CLASS lifecycle or a
MethodOrderer. In both cases, test methods in such test classes are
only executed concurrently if the @Execution(CONCURRENT) annotation
is present on the test class or method.
Isolated, ResourceLock
| Modifier and Type | Field and Description |
|---|---|
| public static final String | DEFAULT_CLASSES_EXECUTION_MODE_PROPERTY_NAME
Property name used to set the default test execution mode for top-level classes: This setting is only effective if parallel execution is enabled. |
| public static final String | DEFAULT_EXECUTION_MODE_PROPERTY_NAME
Property name used to set the default test execution mode: This setting is only effective if parallel execution is enabled. |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public ExecutionMode |
| DEFAULT_CLASSES_EXECUTION_MODE_PROPERTY_NAME | back to summary |
|---|---|
| public static final String DEFAULT_CLASSES_EXECUTION_MODE_PROPERTY_NAME Property name used to set the default test execution mode for top-level classes: This setting is only effective if parallel execution is enabled. Supported ValuesSupported values include names of enum constants defined in
If not specified, it will be resolved into the same value as
| |
| DEFAULT_EXECUTION_MODE_PROPERTY_NAME | back to summary |
|---|---|
| public static final String DEFAULT_EXECUTION_MODE_PROPERTY_NAME Property name used to set the default test execution mode: This setting is only effective if parallel execution is enabled. Supported ValuesSupported values include names of enum constants defined in
If not specified, the default is "same_thread" which corresponds to
| |
| reason | back to summary |
|---|---|
| public String reason() The reason for using the selected execution mode. This is for informational purposes only. | |
| value | back to summary |
|---|---|
| public ExecutionMode value() The required/preferred execution mode.
| |