|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.runner.BaseTestRunner | +--org.ozoneDB.test.OzoneTestRunner
OzoneTestRunner is the JUnit test runner for Ozone environment.
Field Summary | |
private org.ozoneDB.ExternalDatabase |
fDatabase
The database |
private java.lang.String |
fDBHost
database server hostname |
private int |
fDBPort
database server port |
private boolean |
fDebug
whether to do debugging print out. |
private boolean |
fIsLocal
whether to use local database |
private boolean |
fIsRemote
whether to use remote database |
private java.io.File |
fLocalTestDir
default dir to create test database |
private static org.apache.log4j.Category |
fLog
log4j logger |
private java.lang.String |
fTestSuite
name of the test suite to run |
private static junit.runner.TestSuiteLoader |
fTestSuiteLoader
The test class loader for the runner. |
Fields inherited from class junit.runner.BaseTestRunner |
SUITE_METHODNAME |
Constructor Summary | |
private |
OzoneTestRunner(java.lang.String[] args)
Constructor |
Method Summary | |
void |
addError(junit.framework.Test test,
java.lang.Throwable t)
|
void |
addFailure(junit.framework.Test test,
junit.framework.AssertionFailedError t)
|
private junit.framework.TestResult |
doRun()
run the test suite |
void |
endTest(junit.framework.Test test)
|
junit.runner.TestSuiteLoader |
getLoader()
overrideing this method from BaseTestRunner is necessary because of the default behavior of getLoader creates new classloader everytime it's called. |
private void |
initDB(java.lang.String dbURL)
initialize the database |
private void |
initLocalDB()
initialize a local database if one doesn't exists, create it. |
private void |
initRemoteDB(java.lang.String host,
int port)
Initialize a remote database. |
static void |
main(java.lang.String[] args)
main |
private static void |
printUsage()
Print the usage of the program |
protected void |
runFailed(java.lang.String message)
|
private void |
setUpDatabase()
set up the database |
void |
startTest(junit.framework.Test test)
|
Methods inherited from class junit.runner.BaseTestRunner |
clearStatus, elapsedTimeAsString, extractClassName, filterStack, getFilteredTrace, getPreference, getPreference, getTest, inVAJava, loadSuiteClass, processArguments, setLoading, truncate, useReloadingTestSuiteLoader |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static org.apache.log4j.Category fLog
private org.ozoneDB.ExternalDatabase fDatabase
private boolean fIsRemote
private boolean fIsLocal
private boolean fDebug
private java.lang.String fDBHost
private int fDBPort
private java.io.File fLocalTestDir
private java.lang.String fTestSuite
private static junit.runner.TestSuiteLoader fTestSuiteLoader
Constructor Detail |
private OzoneTestRunner(java.lang.String[] args)
Method Detail |
private static void printUsage()
private void initDB(java.lang.String dbURL) throws java.lang.Exception
dbURL
- the database url
java.lang.Exception
private void initRemoteDB(java.lang.String host, int port) throws java.lang.Exception
host
- hostname of the database machineport
- port number of the db server
java.lang.Exception
public junit.runner.TestSuiteLoader getLoader()
getLoader
in class junit.runner.BaseTestRunner
private void initLocalDB() throws java.lang.Exception
java.lang.Exception
private void setUpDatabase() throws java.lang.Exception
java.lang.Exception
private junit.framework.TestResult doRun() throws java.lang.Exception
java.lang.Exception
public static void main(java.lang.String[] args)
protected void runFailed(java.lang.String message)
runFailed
in class junit.runner.BaseTestRunner
public void addError(junit.framework.Test test, java.lang.Throwable t)
addError
in interface junit.framework.TestListener
addError
in class junit.runner.BaseTestRunner
public void addFailure(junit.framework.Test test, junit.framework.AssertionFailedError t)
addFailure
in interface junit.framework.TestListener
addFailure
in class junit.runner.BaseTestRunner
public void endTest(junit.framework.Test test)
endTest
in interface junit.framework.TestListener
endTest
in class junit.runner.BaseTestRunner
public void startTest(junit.framework.Test test)
startTest
in interface junit.framework.TestListener
startTest
in class junit.runner.BaseTestRunner
|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |