Save This Page
Home » apache-ant-1.7.1-src » org.apache.tools » ant » taskdefs » optional » junit » [javadoc | source]
org.apache.tools.ant.taskdefs.optional.junit
public class: JUnitTest [javadoc | source]
java.lang.Object
   org.apache.tools.ant.taskdefs.optional.junit.BaseTest
      org.apache.tools.ant.taskdefs.optional.junit.JUnitTest

All Implemented Interfaces:
    Cloneable

Run a single JUnit test.

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

Fields inherited from org.apache.tools.ant.taskdefs.optional.junit.BaseTest:
haltOnError,  haltOnFail,  filtertrace,  fork,  ifProperty,  unlessProperty,  formatters,  destDir,  failureProperty,  errorProperty
Constructor:
 public JUnitTest() 
 public JUnitTest(String name) 
    Constructor with name.
    Parameters:
    name - the name of the test.
 public JUnitTest(String name,
    boolean haltOnError,
    boolean haltOnFailure,
    boolean filtertrace) 
    Constructor with options.
    Parameters:
    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 from org.apache.tools.ant.taskdefs.optional.junit.JUnitTest Summary:
addFormattersTo,   clone,   errorCount,   failureCount,   getFormatters,   getName,   getOutfile,   getProperties,   getRunTime,   runCount,   setCounts,   setName,   setOutfile,   setProperties,   setRunTime,   shouldRun
Methods from 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 from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tools.ant.taskdefs.optional.junit.JUnitTest Detail:
  void addFormattersTo(Vector v) 
    Convenient method to add formatters to a vector
 public Object clone() 
 public long errorCount() 
    Get the number of errors.
 public long failureCount() 
    Get the number of failures.
 public FormatterElement[] getFormatters() 
    Get the formatters set for this test.
 public String getName() 
    Get the name of the test class.
 public String getOutfile() 
    Get the name of the output file
 public Properties getProperties() 
    Get the properties used in the test.
 public long getRunTime() 
    Get the run time.
 public long runCount() 
    Get the number of runs.
 public  void setCounts(long runs,
    long failures,
    long errors) 
    Set the number of runs, failures and errors.
 public  void setName(String value) 
    Set the name of the test class.
 public  void setOutfile(String value) 
    Set the name of the output file.
 public  void setProperties(Hashtable p) 
    Set the properties to be used in the test.
 public  void setRunTime(long runTime) 
    Set the runtime.
 public boolean shouldRun(Project p) 
    Check if this test should run based on the if and unless attributes.