Class LauncherFactory



  • @API(status=STABLE,
         since="1.0")
    public class LauncherFactory
    extends java.lang.Object
    Factory for creating Launcher instances by invoking create().

    Test engines are discovered at runtime using the ServiceLoader facility. For that purpose, a text file named META-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 the TestEngine interface is declared.

    TestExecutionListeners discovered at runtime via the ServiceLoader facility are automatically registered with the Launcher created by the factory. Users may register additional listeners using the Launcher.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 new Launcher using dynamically detected test engines.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait