@API(status=STABLE,
since="5.10")
@Retention(value=RUNTIME)
@Target(value={TYPE,METHOD})
@Inherited
public @interface Execution
@Execution is used to configure the parallel execution
mode of a test class or test method.
Since JUnit Jupiter 5.4, 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.
Isolated,
ResourceLock| Modifier and Type | Fields and Description |
|---|---|
static 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"
|
static java.lang.String |
DEFAULT_EXECUTION_MODE_PROPERTY_NAME
Property name used to set the default test execution mode: "junit.jupiter.execution.parallel.mode.default"
|
| Modifier and Type | Required Element and Description |
|---|---|
ExecutionMode |
value
The required/preferred execution mode.
|
| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String |
reason
The reason for using the selected execution mode.
|
@API(status=EXPERIMENTAL,
since="5.9")
public static final java.lang.String DEFAULT_EXECUTION_MODE_PROPERTY_NAME
This setting is only effective if parallel execution is enabled.
Supported values include names of enum constants defined in
ExecutionMode, ignoring case.
If not specified, the default is "same_thread" which corresponds to
@Execution(ExecutionMode.SAME_THREAD).
@API(status=EXPERIMENTAL,
since="5.9")
public static final java.lang.String DEFAULT_CLASSES_EXECUTION_MODE_PROPERTY_NAME
This setting is only effective if parallel execution is enabled.
Supported values include names of enum constants defined in
ExecutionMode, ignoring case.
If not specified, it will be resolved into the same value as
DEFAULT_EXECUTION_MODE_PROPERTY_NAME.
public abstract ExecutionMode value
ExecutionMode