|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jbenchmark.TestFeature
net.sf.jbenchmark.Test
net.sf.jbenchmark.TestGroup
A test that runs a sequence of tests.
Constructor Summary | |
TestGroup()
|
Method Summary | |
void |
addListener(TestListener listener)
Adds a listener. |
void |
addTest(Test test)
Adds a test. |
protected TestResult |
doRun()
Executes the test. |
java.lang.String |
getAttribute(java.lang.String name)
Returns the value of a test attribute. |
java.io.InputStream |
getExternalResource(java.lang.String nameOfResource)
Delegate back to the context here. |
protected TestContext |
getFeatureContext()
Returns the context to use for features of this test. |
TestListener |
getListener()
Returns the listener to use to notify the container of test execution. |
protected java.util.List |
getTests()
Returns the tests in this group. |
int |
getThreadCount()
By default, a TestGroup has as many threads as it's containing context. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets the value of a test attribute. |
void |
setContext(TestContext context)
Sets the context for this test. |
void |
testFailed(Test test,
java.lang.Throwable throwable)
Called when a test fails. |
void |
testFinished(TestResult result)
Called when a test finishes. |
void |
testStart(Test test)
Called when a test starts. |
Methods inherited from class net.sf.jbenchmark.Test |
addAssertion, addFeature, addResource, doCleanup, doInitialise, finish, getResource, run |
Methods inherited from class net.sf.jbenchmark.TestFeature |
getContext, getName, setName, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.jbenchmark.TestContext |
getResource |
Constructor Detail |
public TestGroup()
Method Detail |
public void setContext(TestContext context)
setContext
in class Test
public java.io.InputStream getExternalResource(java.lang.String nameOfResource) throws java.lang.Exception
getExternalResource
in interface TestContext
java.lang.Exception
public int getThreadCount()
getThreadCount
in interface TestContext
public void addTest(Test test)
public void addListener(TestListener listener)
protected TestContext getFeatureContext()
getFeatureContext
in class Test
protected java.util.List getTests()
public TestListener getListener()
getListener
in interface TestContext
public java.lang.String getAttribute(java.lang.String name)
getAttribute
in interface TestContext
public void setAttribute(java.lang.String name, java.lang.String value)
setAttribute
in interface TestContext
protected TestResult doRun() throws java.lang.Exception
doRun
in class Test
java.lang.Exception
public void testStart(Test test)
testStart
in interface TestListener
public void testFailed(Test test, java.lang.Throwable throwable)
testFailed
in interface TestListener
public void testFinished(TestResult result)
testFinished
in interface TestListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |