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 creatingLauncher
instances by invokingcreate()
.Test engines are discovered at runtime using the
ServiceLoader
facility. For that purpose, a text file namedMETA-INF/services/org.junit.platform.engine.TestEngine
has to be added to the engine's JAR file in which the fully qualified name of the implementation class of theTestEngine
interface is declared.TestExecutionListener
s discovered at runtime via theServiceLoader
facility are automatically registered with theLauncher
created 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 Launcher
create()
Factory method for creating a newLauncher
using dynamically detected test engines.
-
-
-
Method Detail
-
create
public static Launcher create() throws PreconditionViolationException
Factory method for creating a newLauncher
using dynamically detected test engines.All dynamically detected
TestExecutionListener
s are automatically registered in the createdLauncher
instance.- Throws:
PreconditionViolationException
- if no test engines are detected
-
-