Class LauncherSupport
- java.lang.Object
-
- org.apache.tools.ant.taskdefs.optional.junitlauncher.LauncherSupport
-
public class LauncherSupport extends java.lang.Object
Responsible for doing the real work involved in launching the JUnit platform and passing it the relevant tests that need to be executed by the JUnit platform.This class relies on a
LaunchDefinition
for setting up the launch of the JUnit platform.The
LauncherSupport
isn't concerned with whether or not it's being executed in the same JVM as the build in which thejunitlauncher
was triggered or if it's running as part of a forked JVM. Instead it just relies on theLaunchDefinition
to do whatever decisions need to be done before and after launching the tests.This class is not thread-safe and isn't expected to be used for launching from multiple different threads simultaneously.
This class is an internal implementation detail of the Ant project and although it's a public class, it isn't meant to be used outside of this project. This class can be changed, across releases, without any backward compatible guarantees and hence shouldn't be used or relied upon outside of this project.
-
-
Constructor Summary
Constructors Constructor Description LauncherSupport(LaunchDefinition definition, TestExecutionContext testExecutionContext)
Create aLauncherSupport
for the passedLaunchDefinition
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
launch()
Launches the tests defined in theLaunchDefinition
-
-
-
Constructor Detail
-
LauncherSupport
public LauncherSupport(LaunchDefinition definition, TestExecutionContext testExecutionContext)
Create aLauncherSupport
for the passedLaunchDefinition
- Parameters:
definition
- The launch definition which will be used for launching the teststestExecutionContext
- TheTestExecutionContext
to use for the tests
-
-
Method Detail
-
launch
public void launch() throws BuildException
Launches the tests defined in theLaunchDefinition
- Throws:
BuildException
- If any tests failed and the launch definition was configured to throw an exception, or if any other exception occurred before or after launching the tests
-
-