|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTask
net.sf.ant4eclipse.ant.task.launch.AbstractLaunchTask
net.sf.ant4eclipse.ant.task.launch.LaunchJUnitTask
public class LaunchJUnitTask
LaunchTask -- Specialized Launchtask for launching junit tests.
Constructor Summary | |
---|---|
LaunchJUnitTask()
|
Method Summary | |
---|---|
void |
addFormatter(FormatterElement fe)
Add a new formatter to all tests of this task. |
void |
execute()
|
void |
setErrorProperty(java.lang.String propertyName)
Property to set to "true" if there is a error in a test. |
void |
setFailureProperty(java.lang.String propertyName)
Property to set to "true" if there is a failure in a test. |
void |
setFiltertrace(boolean value)
If true, smartly filter the stack frames of JUnit errors and failures before reporting them. |
void |
setForkMode(ForkMode mode)
Set the fork behavior. |
void |
setHaltonerror(boolean value)
If true, stop the build process when there is an error in a test. |
void |
setHaltonfailure(boolean value)
If true, stop the build process if a test fails (errors are considered failures as well). |
void |
setPrintsummary(SummaryAttribute value)
If true, print one-line statistics for each test, or "withOutAndErr" to also show standard output and error. |
void |
setReloading(boolean value)
If true, force ant to re-classload all classes for each JUnit TestCase |
void |
setShowOutput(boolean showOutput)
If true, send any output generated by tests to Ant's logging system as well as to the formatters. |
void |
setTempdir(java.io.File tmpDir)
Where Ant should place temporary files. |
void |
setTimeout(java.lang.Integer value)
Set the timeout value (in milliseconds). |
protected java.lang.Class[] |
validTypes()
Returns a list of classes which are valid launch configuration types. |
Methods inherited from class net.sf.ant4eclipse.ant.task.launch.AbstractLaunchTask |
---|
getLaunchFile, getLaunchProject, getWorkspace, isLaunchConfigurationSet, isWorkspaceSet, readLaunchConfiguration, readLaunchProject, requireWorkspaceSet, setInitialiseWorkspace, setLaunchFile, setWorkspace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LaunchJUnitTask()
Method Detail |
---|
public void execute() throws BuildException
BuildException
public void setReloading(boolean value)
value
- force class reloading for each test casepublic void setFiltertrace(boolean value)
This property is applied on all BatchTest (batchtest) and JUnitTest (test) however it can possibly be overridden by their own properties.
value
- false if it should not filter, otherwise
truepublic void setHaltonerror(boolean value)
value
- true if it should halt, otherwise falsepublic void setErrorProperty(java.lang.String propertyName)
This property is applied on all BatchTest (batchtest) and JUnitTest (test), however, it can possibly be overriden by their own properties.
propertyName
- the name of the property to set in the event of an error.public void setHaltonfailure(boolean value)
value
- true if it should halt, otherwise falsepublic void setFailureProperty(java.lang.String propertyName)
This property is applied on all BatchTest (batchtest) and JUnitTest (test), however, it can possibly be overriden by their own properties.
propertyName
- the name of the property to set in the event of an failure.public void setForkMode(ForkMode mode)
Possible values are "once", "perTest" and "perBatch". If set to "once", only a single Java VM will be forked for all tests, with "perTest" (the default) each test will run in a fresh Java VM and "perBatch" will run all tests from the same <batchtest> in the same Java VM.
Only tests with the same configuration of haltonerror, haltonfailure, errorproperty, failureproperty and filtertrace can share a forked Java VM, so even if you set the value to "once", Ant may need to fork mutliple VMs.
public void setPrintsummary(SummaryAttribute value)
value
- true to print a summary, withOutAndErr
to include the test's output as well, false
otherwise.SummaryJUnitResultFormatter
public void setTimeout(java.lang.Integer value)
If the test is running for more than this value, the test will be canceled. (works only when in 'fork' mode).
value
- the maximum time (in milliseconds) allowed before declaring
the test as 'timed-out'setForkMode(ForkMode)
public void addFormatter(FormatterElement fe)
fe
- formatter elementpublic void setShowOutput(boolean showOutput)
Output will always be passed to the formatters and not by shown by default. This option should for example be set for tests that are interactive and prompt the user to do something.
showOutput
- if true, send output to Ant's logging system toopublic void setTempdir(java.io.File tmpDir)
tmpDir
- location where temporary files should go toprotected java.lang.Class[] validTypes()
validTypes
in class AbstractLaunchTask
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |