|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.taskdefs.optional.junit.BaseTest org.apache.tools.ant.taskdefs.optional.junit.JUnitTest
public class JUnitTest
Run a single JUnit test.
The JUnit test is actually run by JUnitTestRunner
.
So read the doc comments for that class :)
JUnitTask
,
JUnitTestRunner
Field Summary |
---|
Fields inherited from class org.apache.tools.ant.taskdefs.optional.junit.BaseTest |
---|
destDir, errorProperty, failureProperty, filtertrace, fork, formatters, haltOnError, haltOnFail, ifProperty, unlessProperty |
Constructor Summary | |
---|---|
JUnitTest()
No arg constructor. |
|
JUnitTest(java.lang.String name)
Constructor with name. |
|
JUnitTest(java.lang.String name,
boolean haltOnError,
boolean haltOnFailure,
boolean filtertrace)
Constructor with options. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
long |
errorCount()
Get the number of errors. |
long |
failureCount()
Get the number of failures. |
FormatterElement[] |
getFormatters()
Get the formatters set for this test. |
java.lang.String |
getName()
Get the name of the test class. |
java.lang.String |
getOutfile()
Get the name of the output file |
java.util.Properties |
getProperties()
Get the properties used in the test. |
long |
getRunTime()
Get the run time. |
long |
runCount()
Get the number of runs. |
void |
setCounts(long runs,
long failures,
long errors)
Set the number of runs, failures and errors. |
void |
setName(java.lang.String value)
Set the name of the test class. |
void |
setOutfile(java.lang.String value)
Set the name of the output file. |
void |
setProperties(java.util.Hashtable p)
Set the properties to be used in the test. |
void |
setRunTime(long runTime)
Set the runtime. |
boolean |
shouldRun(Project p)
Check if this test should run based on the if and unless attributes. |
Methods inherited from class org.apache.tools.ant.taskdefs.optional.junit.BaseTest |
---|
addFormatter, getErrorProperty, getFailureProperty, getFiltertrace, getFork, getHaltonerror, getHaltonfailure, getTodir, setErrorProperty, setFailureProperty, setFiltertrace, setFork, setHaltonerror, setHaltonfailure, setIf, setTodir, setUnless |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JUnitTest()
public JUnitTest(java.lang.String name)
name
- the name of the test.public JUnitTest(java.lang.String name, boolean haltOnError, boolean haltOnFailure, boolean filtertrace)
name
- the name of the test.haltOnError
- if true halt the tests if there is an error.haltOnFailure
- if true halt the tests if there is a failure.filtertrace
- if true filter stack traces.Method Detail |
---|
public void setName(java.lang.String value)
value
- the name to use.public void setOutfile(java.lang.String value)
value
- the name of the output file to use.public java.lang.String getName()
public java.lang.String getOutfile()
public void setCounts(long runs, long failures, long errors)
runs
- the number of runs.failures
- the number of failures.errors
- the number of errors.public void setRunTime(long runTime)
runTime
- the time in milliseconds.public long runCount()
public long failureCount()
public long errorCount()
public long getRunTime()
public java.util.Properties getProperties()
public void setProperties(java.util.Hashtable p)
p
- the properties.
This is a copy of the projects ant properties.public boolean shouldRun(Project p)
p
- the project to use to check if the if and unless
properties exist in.
public FormatterElement[] getFormatters()
public java.lang.Object clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |