Package org.junit.platform.launcher
Class EngineFilter
- java.lang.Object
-
- org.junit.platform.launcher.EngineFilter
-
- All Implemented Interfaces:
org.junit.platform.engine.Filter<org.junit.platform.engine.TestEngine>
@API(status=STABLE, since="1.0") public class EngineFilter extends java.lang.Object implements org.junit.platform.engine.Filter<org.junit.platform.engine.TestEngine>
AnEngineFilter
is applied to allTestEngines
before they are used.Warning: be cautious when registering multiple competing
include
EngineFilters
or multiple competingexclude
EngineFilters
for the same discovery request since doing so will likely lead to undesirable results (i.e., zero engines being active).- Since:
- 1.0
- See Also:
includeEngines(String...)
,excludeEngines(String...)
,LauncherDiscoveryRequest
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.platform.engine.FilterResult
apply(org.junit.platform.engine.TestEngine testEngine)
static EngineFilter
excludeEngines(java.lang.String... engineIds)
Create a new excludeEngineFilter
based on the supplied engine IDs.static EngineFilter
excludeEngines(java.util.List<java.lang.String> engineIds)
Create a new excludeEngineFilter
based on the supplied engine IDs.static EngineFilter
includeEngines(java.lang.String... engineIds)
Create a new includeEngineFilter
based on the supplied engine IDs.static EngineFilter
includeEngines(java.util.List<java.lang.String> engineIds)
Create a new includeEngineFilter
based on the supplied engine IDs.java.lang.String
toString()
-
-
-
Method Detail
-
includeEngines
public static EngineFilter includeEngines(java.lang.String... engineIds)
Create a new includeEngineFilter
based on the supplied engine IDs.Only
TestEngines
with matching engine IDs will be included within the test discovery and execution.- Parameters:
engineIds
- the list of engine IDs to match against; nevernull
or empty; individual IDs must also not be null or blank- See Also:
includeEngines(String...)
-
includeEngines
public static EngineFilter includeEngines(java.util.List<java.lang.String> engineIds)
Create a new includeEngineFilter
based on the supplied engine IDs.Only
TestEngines
with matching engine IDs will be included within the test discovery and execution.- Parameters:
engineIds
- the list of engine IDs to match against; nevernull
or empty; individual IDs must also not be null or blank- See Also:
includeEngines(String...)
-
excludeEngines
public static EngineFilter excludeEngines(java.lang.String... engineIds)
Create a new excludeEngineFilter
based on the supplied engine IDs.TestEngines
with matching engine IDs will be excluded from test discovery and execution.- Parameters:
engineIds
- the list of engine IDs to match against; nevernull
or empty; individual IDs must also not be null or blank- See Also:
excludeEngines(List)
-
excludeEngines
public static EngineFilter excludeEngines(java.util.List<java.lang.String> engineIds)
Create a new excludeEngineFilter
based on the supplied engine IDs.TestEngines
with matching engine IDs will be excluded from test discovery and execution.- Parameters:
engineIds
- the list of engine IDs to match against; nevernull
or empty; individual IDs must also not be null or blank- See Also:
includeEngines(String...)
-
apply
public org.junit.platform.engine.FilterResult apply(org.junit.platform.engine.TestEngine testEngine)
- Specified by:
apply
in interfaceorg.junit.platform.engine.Filter<org.junit.platform.engine.TestEngine>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-