|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.runner.BaseTestRunner
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:
0
: success
1
: failure, the test shows an unexpected behavior
2
: exception, the test throws an unhandled excption
Field Summary | |
static java.lang.String |
LOG_DIRECTORY
|
static java.lang.String |
RESULTPRINTER_DEFAULT
Default of the system property ResultPrinterClass. |
static java.lang.String |
RESULTPRINTER_PROPERTY
Name of the system property to specify the result printer class. |
Fields inherited from class junit.textui.TestRunner |
EXCEPTION_EXIT, FAILURE_EXIT, SUCCESS_EXIT |
Fields inherited from class junit.runner.BaseTestRunner |
SUITE_METHODNAME |
Constructor Summary | |
BatchTestRunner()
Constructor. |
|
BatchTestRunner(junit.textui.ResultPrinter resultPrinter)
Constructor. |
Method Summary | |
static java.lang.String |
changeFileName(java.lang.String fileName)
Returns a file name which is constructed by values of some system properties appended by the given file name. |
junit.framework.TestResult |
doRun(junit.framework.Test test)
Runs the specified test or test suite and closes the pmf. |
protected junit.textui.ResultPrinter |
getDefaultResultPrinter()
Returns an instance of the default result printer class BatchResultPrinter. |
static java.lang.String |
getFileName()
Returns a file name which is determined by method changeFileName(String) . |
protected junit.textui.ResultPrinter |
getResultPrinter()
Returns a result printer instance. |
protected junit.framework.TestSuite |
getTestSuite(java.lang.String[] classNames)
Returns a JUnit TestSuite instance for the classes of the specified list of class names. |
static void |
main(java.lang.String[] args)
Runs in batch mode and sets an exit code. |
static void |
run(java.lang.Class clazz)
Runs all test methods from the specified class. |
static junit.framework.TestResult |
run(junit.framework.Test test)
Runs the specified test or test suite |
static void |
runAndWait(junit.framework.Test suite)
Runs the specified test and waits until the user types RETURN. |
junit.framework.TestResult |
start(java.lang.String[] args)
|
Methods inherited from class junit.textui.TestRunner |
createTestResult, doRun, getLoader, pause, runFailed, runSingleMethod, setPrinter, testEnded, testFailed, testStarted |
Methods inherited from class junit.runner.BaseTestRunner |
addError, addFailure, clearStatus, elapsedTimeAsString, endTest, extractClassName, getFilteredTrace, getFilteredTrace, getPreference, getPreference, getPreferences, getTest, inMac, inVAJava, loadSuiteClass, processArguments, savePreferences, setLoading, setPreference, setPreferences, showStackRaw, startTest, truncate, useReloadingTestSuiteLoader |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String RESULTPRINTER_PROPERTY
public static final java.lang.String RESULTPRINTER_DEFAULT
public static final java.lang.String LOG_DIRECTORY
Constructor Detail |
public BatchTestRunner()
public BatchTestRunner(junit.textui.ResultPrinter resultPrinter)
Method Detail |
public static void run(java.lang.Class clazz)
public static junit.framework.TestResult run(junit.framework.Test test)
public static void runAndWait(junit.framework.Test suite)
public junit.framework.TestResult doRun(junit.framework.Test test)
public static void main(java.lang.String[] args)
public junit.framework.TestResult start(java.lang.String[] args)
protected junit.framework.TestSuite getTestSuite(java.lang.String[] classNames)
protected junit.textui.ResultPrinter getResultPrinter()
protected junit.textui.ResultPrinter getDefaultResultPrinter()
public static java.lang.String getFileName()
changeFileName(String)
.
The file name has suffix .txt
.
java.io.IOException
public static java.lang.String changeFileName(java.lang.String fileName)
"app"
if it equals "applicationidentity"
,
else it is replaced by "dsid"
.""
.
fileName
- the file name
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |