Class LauncherConfig.Builder

java.lang.Object
org.junit.platform.launcher.core.LauncherConfig.Builder
Enclosing interface:
LauncherConfig

public static class LauncherConfig.Builder extends Object
Builder API for LauncherConfig.
  • Method Details

    • enableLauncherSessionListenerAutoRegistration

      @API(status=STABLE, since="1.10") public LauncherConfig.Builder enableLauncherSessionListenerAutoRegistration(boolean enabled)
      Configure the auto-registration flag for launcher session listeners.

      Defaults to true.

      Parameters:
      enabled - true if launcher session listeners should be automatically registered
      Returns:
      this builder for method chaining
      Since:
      1.8
    • enableLauncherDiscoveryListenerAutoRegistration

      @API(status=STABLE, since="1.10") public LauncherConfig.Builder enableLauncherDiscoveryListenerAutoRegistration(boolean enabled)
      Configure the auto-registration flag for launcher discovery listeners.

      Defaults to true.

      Parameters:
      enabled - true if launcher discovery listeners should be automatically registered
      Returns:
      this builder for method chaining
      Since:
      1.8
    • enableTestExecutionListenerAutoRegistration

      public LauncherConfig.Builder enableTestExecutionListenerAutoRegistration(boolean enabled)
      Configure the auto-registration flag for test execution listeners.

      Defaults to true.

      Parameters:
      enabled - true if test execution listeners should be automatically registered
      Returns:
      this builder for method chaining
    • enableTestEngineAutoRegistration

      public LauncherConfig.Builder enableTestEngineAutoRegistration(boolean enabled)
      Configure the auto-registration flag for test engines.

      Defaults to true.

      Parameters:
      enabled - true if test engines should be automatically registered
      Returns:
      this builder for method chaining
    • enablePostDiscoveryFilterAutoRegistration

      @API(status=STABLE, since="1.10") public LauncherConfig.Builder enablePostDiscoveryFilterAutoRegistration(boolean enabled)
      Configure the auto-registration flag for post discovery filters.

      Defaults to true.

      Parameters:
      enabled - true if post discovery filters should be automatically registered
      Returns:
      this builder for method chaining
      Since:
      1.7
    • addTestEngines

      public LauncherConfig.Builder addTestEngines(TestEngine... engines)
      Add all of the supplied test engines to the configuration.
      Parameters:
      engines - additional test engines to register; never null or containing null
      Returns:
      this builder for method chaining
    • addLauncherSessionListeners

      public LauncherConfig.Builder addLauncherSessionListeners(LauncherSessionListener... listeners)
      Add all of the supplied launcher session listeners to the configuration.
      Parameters:
      listeners - additional launcher session listeners to register; never null or containing null
      Returns:
      this builder for method chaining
    • addLauncherDiscoveryListeners

      public LauncherConfig.Builder addLauncherDiscoveryListeners(LauncherDiscoveryListener... listeners)
      Add all of the supplied launcher discovery listeners to the configuration.
      Parameters:
      listeners - additional launcher discovery listeners to register; never null or containing null
      Returns:
      this builder for method chaining
    • addTestExecutionListeners

      public LauncherConfig.Builder addTestExecutionListeners(TestExecutionListener... listeners)
      Add all of the supplied test execution listeners to the configuration.
      Parameters:
      listeners - additional test execution listeners to register; never null or containing null
      Returns:
      this builder for method chaining
    • addPostDiscoveryFilters

      @API(status=STABLE, since="1.10") public LauncherConfig.Builder addPostDiscoveryFilters(PostDiscoveryFilter... filters)
      Add all of the supplied filters to the configuration.
      Parameters:
      filters - additional post discovery filters to register; never null or containing null
      Returns:
      this builder for method chaining
      Since:
      1.7
    • build

      public LauncherConfig build()
      Build the LauncherConfig that has been configured via this builder.