Package org.junit.platform.launcher.core
Class LauncherFactory
- java.lang.Object
-
- org.junit.platform.launcher.core.LauncherFactory
-
@API(status=STABLE, since="1.0") public class LauncherFactory extends Object
Factory for creatingLauncherinstances by invokingcreate().Test engines are discovered at runtime using the
ServiceLoaderfacility. For that purpose, a text file namedMETA-INF/services/org.junit.platform.engine.TestEnginehas to be added to the engine's JAR file in which the fully qualified name of the implementation class of theTestEngineinterface is declared.TestExecutionListeners discovered at runtime via theServiceLoaderfacility are automatically registered with theLaunchercreated by the factory. Users may register additional listeners using theLauncher.registerTestExecutionListeners(TestExecutionListener...)method on the created launcher instance.- Since:
- 1.0
- See Also:
Launcher
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Launchercreate()Factory method for creating a newLauncherusing dynamically detected test engines.
-
-
-
Method Detail
-
create
public static Launcher create() throws PreconditionViolationException
Factory method for creating a newLauncherusing dynamically detected test engines.All dynamically detected
TestExecutionListeners are automatically registered in the createdLauncherinstance.- Throws:
PreconditionViolationException- if no test engines are detected
-
-