org.apache.tools.ant.taskdefs.optional.junit

Class JUnitTest

public class JUnitTest extends BaseTest implements Cloneable

Run a single JUnit test.

The JUnit test is actually run by {@link JUnitTestRunner}. So read the doc comments for that class :)

Since: Ant 1.2

See Also: JUnitTask JUnitTestRunner

Constructor Summary
JUnitTest()
JUnitTest(String name)
JUnitTest(String name, boolean haltOnError, boolean haltOnFailure, boolean filtertrace)
Method Summary
Objectclone()
longerrorCount()
longfailureCount()
FormatterElement[]getFormatters()
StringgetName()
Get the name of the test class.
StringgetOutfile()
Get the name of the output file
PropertiesgetProperties()
longgetRunTime()
longrunCount()
voidsetCounts(long runs, long failures, long errors)
voidsetName(String value)
Set the name of the test class.
voidsetOutfile(String value)
Set the name of the output file.
voidsetProperties(Hashtable p)
voidsetRunTime(long runTime)
booleanshouldRun(Project p)

Constructor Detail

JUnitTest

public JUnitTest()

JUnitTest

public JUnitTest(String name)

JUnitTest

public JUnitTest(String name, boolean haltOnError, boolean haltOnFailure, boolean filtertrace)

Method Detail

clone

public Object clone()

Since: Ant 1.5

errorCount

public long errorCount()

failureCount

public long failureCount()

getFormatters

public FormatterElement[] getFormatters()

getName

public String getName()
Get the name of the test class.

getOutfile

public String getOutfile()
Get the name of the output file

Returns: the name of the output file.

getProperties

public Properties getProperties()

getRunTime

public long getRunTime()

runCount

public long runCount()

setCounts

public void setCounts(long runs, long failures, long errors)

setName

public void setName(String value)
Set the name of the test class.

setOutfile

public void setOutfile(String value)
Set the name of the output file.

setProperties

public void setProperties(Hashtable p)

setRunTime

public void setRunTime(long runTime)

shouldRun

public boolean shouldRun(Project p)
Copyright