Class EngineTestKit.Builder
- Enclosing class:
- EngineTestKit
TestEngine
execution builder.
See EngineTestKit.engine(String)
and
EngineTestKit.engine(TestEngine)
for example usage.
-
Method Summary
Modifier and TypeMethodDescriptionconfigurationParameter(String key, String value)
Add the supplied configuration parameter.configurationParameters(Map<String,String> configurationParameters)
Add all of the supplied configuration parameters.enableImplicitConfigurationParameters(boolean enabled)
Configure whether implicit configuration parameters should be considered.execute()
Execute tests for the configuredTestEngine
, discovery selectors, discovery filters, and configuration parameters.filters(DiscoveryFilter<?>... filters)
Deprecated.Add all of the supplied filters.selectors(DiscoverySelector... selectors)
Add all of the supplied discovery selectors.
-
Method Details
-
selectors
Add all of the supplied discovery selectors.Built-in discovery selectors can be created via the static factory methods in
DiscoverySelectors
.- Parameters:
selectors
- the discovery selectors to add; nevernull
- Returns:
- this builder for method chaining
- See Also:
filters(Filter...)
,configurationParameter(String, String)
,configurationParameters(Map)
,execute()
-
filters
@Deprecated @API(status=DEPRECATED, since="1.7") public EngineTestKit.Builder filters(DiscoveryFilter<?>... filters)Deprecated.Please usefilters(Filter...)
instead.Add all of the supplied discovery filters.Built-in discovery filters can be created via the static factory methods in
ClassNameFilter
andPackageNameFilter
.- Parameters:
filters
- the discovery filters to add; nevernull
- Returns:
- this builder for method chaining
- See Also:
filters(Filter...)
,selectors(DiscoverySelector...)
,configurationParameter(String, String)
,configurationParameters(Map)
,execute()
-
filters
Add all of the supplied filters.Built-in discovery filters can be created via the static factory methods in
ClassNameFilter
andPackageNameFilter
.Built-in post-discovery filters can be created via the static factory methods in
TagFilter
.- Parameters:
filters
- the filters to add; nevernull
- Returns:
- this builder for method chaining
- Since:
- 1.7
- See Also:
selectors(DiscoverySelector...)
,configurationParameter(String, String)
,configurationParameters(Map)
,execute()
-
configurationParameter
Add the supplied configuration parameter.- Parameters:
key
- the configuration parameter key under which to store the value; nevernull
or blankvalue
- the value to store- Returns:
- this builder for method chaining
- See Also:
selectors(DiscoverySelector...)
,filters(Filter...)
,configurationParameters(Map)
,execute()
,ConfigurationParameters
-
configurationParameters
Add all of the supplied configuration parameters.- Parameters:
configurationParameters
- the map of configuration parameters to add; nevernull
- Returns:
- this builder for method chaining
- See Also:
selectors(DiscoverySelector...)
,filters(Filter...)
,configurationParameter(String, String)
,execute()
,ConfigurationParameters
-
enableImplicitConfigurationParameters
@API(status=EXPERIMENTAL, since="1.7") public EngineTestKit.Builder enableImplicitConfigurationParameters(boolean enabled)Configure whether implicit configuration parameters should be considered.By default, only configuration parameters that are passed explicitly to this builder are taken into account. Passing
true
to this method, enables additionally reading configuration parameters from implicit sources, i.e. system properties and thejunit-platform.properties
classpath resource. -
execute
Execute tests for the configuredTestEngine
, discovery selectors, discovery filters, and configuration parameters.- Returns:
- the recorded
EngineExecutionResults
- See Also:
selectors(DiscoverySelector...)
,filters(Filter...)
,configurationParameter(String, String)
,configurationParameters(Map)
-
filters(Filter...)
instead.