public class LauncherSupport
extends java.lang.Object
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 the junitlauncher
was triggered or if it's running as part of a forked JVM. Instead it just relies
on the LaunchDefinition
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 and Description |
---|
LauncherSupport(LaunchDefinition definition,
TestExecutionContext testExecutionContext)
Create a
LauncherSupport for the passed LaunchDefinition |
Modifier and Type | Method and Description |
---|---|
void |
launch()
Launches the tests defined in the
LaunchDefinition |
public LauncherSupport(LaunchDefinition definition, TestExecutionContext testExecutionContext)
LauncherSupport
for the passed LaunchDefinition
definition
- The launch definition which will be used for launching the teststestExecutionContext
- The TestExecutionContext
to use for the testspublic void launch() throws BuildException
LaunchDefinition
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