<launchJunit>
Description
The launchJunit task is a specialized variant of launch
that is designed to run junit tests only. In addition to
launch, this task supports some of the nested elements
that can be used in conjunction with the original
junit-task such as formatters.
Arguments
| Argument | Description | Required |
|---|---|---|
| workspace | Path to workspace | yes |
| initialiseWorkspace | Set to 'true' if your workspace contains projects which have project names that differ from the names of their project folders and the workspace doesn't contain a .metadata directory. | no (default: false) |
| launchFile | The launch configuration file that will be launched | yes |
Limitations
The limitations listed in the description of launch
apply to launchJunit, too.
Supported settings from the junit task
For a complete description of the supported settings, please refer
to the reference of the JUnit
task. Currently the launchJunit task supports the
following arguments of the original junit task:
- reloading: If true, force ant to re-classload all classes for each JUnit TestCase
- filtertrace: If true, smartly filter the stack frames of JUnit errors and failures before reporting them.
- haltonerror: If true, stop the build process when there is an error in a test.
- errorProperty: Property to set to "true" if there is a error in a test.
- haltonfailure: If true, stop the build process if a test fails
- failureProperty: Property to set to "true" if there is a failure in a test.
- forkMode: Set the fork behavior. In contrast to ant's
default
JUnit-Task, thelaunchJunittask always forks junit test. Possible values are "once", "perTest" and "perBatch". - printSummary: If true, print one-line statistics for each test, or "withOutAndErr" to also show standard output and error.
- timeout: Set the timeout value (in milliseconds).
- showOutput: If true, send any output generated by tests to Ant's logging system as well as to the formatters.
- tempdir: Where Ant should place temporary files
The launchJunit task currently supports the following
nested elements of the original junit task:
- formatter: Determines how to format output of test cases
The following example shows how to use the launchjunit
task with a Formatter:
Examples
The following example shows how to launch a junit launch
configuration with the launchjunit task.