Home » jdo2-tck-2.3-ea-src » org.apache.jdo.tck.util » [javadoc | source]
org.apache.jdo.tck.util
public class: BatchTestRunner [javadoc | source]
java.lang.Object
   junit.textui.TestRunner
      org.apache.jdo.tck.util.BatchTestRunner
TestRunner class for running a single test or a test suite in batch mode. The format of the test output is specified by the result printer class. The main method sets an exit code according to the test result:
Field Summary
public static final  String RESULTPRINTER_PROPERTY    Name of the system property to specify the result printer class. 
public static final  String RESULTPRINTER_DEFAULT    Default of the system property ResultPrinterClass. 
public static final  String LOG_DIRECTORY     
Constructor:
 public BatchTestRunner() 
 public BatchTestRunner(ResultPrinter resultPrinter) 
    Constructor. Uses the specified resultPrinter to format the test result.
Method from org.apache.jdo.tck.util.BatchTestRunner Summary:
changeFileName,   doRun,   getDefaultResultPrinter,   getFileName,   getResultPrinter,   getTestSuite,   main,   run,   run,   runAndWait,   start
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jdo.tck.util.BatchTestRunner Detail:
 public static String changeFileName(String fileName) 
    Returns a file name which is constructed by values of some system properties appended by the given file name. The system properties evaluated are:
    • jdo.tck.log.directory: Specifies the directory for the file.
    • jdo.tck.database, jdo.tck.cfg: The values of these properties prepend the given file name.
    • jdo.tck.identitytype: The value of this property is replaced by "app" if it equals "applicationidentity", else it is replaced by "dsid".
    The returned file name is constructed as follows:
    /-- Values of properties which do not exist default to "".
 public TestResult doRun(Test test) 
    Runs the specified test or test suite and closes the pmf.
 protected ResultPrinter getDefaultResultPrinter() 
    Returns an instance of the default result printer class BatchResultPrinter.
 public static String getFileName() 
 protected ResultPrinter getResultPrinter() 
    Returns a result printer instance. The system property ResultPrinterClass specifies the class of the returned instanec. The class must extend junit.textui.ResultPrinter.
 protected TestSuite getTestSuite(String[] classNames) 
    Returns a JUnit TestSuite instance for the classes of the specified list of class names.
 public static  void main(String[] args) 
    Runs in batch mode and sets an exit code. If the specified String array includes a single fully qualified class name, this test class is executed.
 public static  void run(Class clazz) 
    Runs all test methods from the specified class.
 public static TestResult run(Test test) 
    Runs the specified test or test suite
 public static  void runAndWait(Test suite) 
    Runs the specified test and waits until the user types RETURN.
 public TestResult start(String[] args)