TestEngines
may use to
influence test discovery and execution.
For example, the JUnit Jupiter engine uses a configuration parameter to enable IDEs and build tools to deactivate conditional test execution.
As of JUnit Platform 1.8, configuration parameters are also made available to
implementations of the org.
API via the org.
.
TestEngine
, EngineDiscoveryRequest
, ExecutionRequest
Modifier and Type | Field and Description |
---|---|
public static final String | CONFIG_FILE_NAME
Name of the JUnit Platform configuration file: junit-platform.properties. |
Modifier and Type | Method and Description |
---|---|
public Optional | |
public default <T> Optional | Returns: anOptional containing the value; never null
but potentially emptythe key to look up; never key, Function<String, T> null or blankthe transformer to apply in case a value is found;
never transformer)null Get and transform the configuration parameter stored under the specified
|
public Optional | Returns: anOptional containing the value; never null
but potentially emptythe key to look up; never key)null or blankGet the boolean configuration parameter stored under the specified
|
public Set | Returns: the set of keys contained in thisConfigurationParameters Get the keys of all configuration parameters stored in this
|
public int |
CONFIG_FILE_NAME | back to summary |
---|---|
public static final String CONFIG_FILE_NAME Name of the JUnit Platform configuration file: junit-platform.properties. If a properties file with this name is present in the root of the classpath, it will be used as a source for configuration parameters. If multiple files are present, only the first one detected in the classpath will be used.
|
get | back to summary |
---|---|
public Optional Get the configuration parameter stored under the specified If no such key is present in this
|
get | back to summary |
---|---|
public default <T> Optional Get and transform the configuration parameter stored under the specified
If no such key is present in this In case the transformer throws an exception, it will be wrapped in a
|
getBoolean | back to summary |
---|---|
public Optional Get the boolean configuration parameter stored under the specified
If no such key is present in this
|
keySet | back to summary |
---|---|
public Set Get the keys of all configuration parameters stored in this
|
size | back to summary |
---|---|
public int size()
Deprecated as of JUnit Platform 1.9 in favor of Get the number of configuration parameters stored directly in this
|