|
TPTP 4.3.0 Testing Tools Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjunit.framework.TestSuite
org.eclipse.hyades.test.common.junit.HyadesTestSuite
This class extends the TestSuite class adding the
expected behavior defined in the
org.eclipse.hyades.test.java.junit.IHyadesTest interface.
By redefining addTest(Test) and addTestSuite(Class), instances of this class will be set as the parent of any instance of IHyadesTest passed as parameter. This is done transparently so the test developer won't need to add any additional code to provide the backward hierarchy navigability.
By redefining run(TestResult) the iteration information is also calculated in a transparent way.
| Nested Class Summary | |
|---|---|
static class |
HyadesTestSuite.AsynchronousThread
|
| Constructor Summary | |
|---|---|
HyadesTestSuite()
Constructor for HyadesTestSuite. |
|
HyadesTestSuite(java.lang.Class theClass)
Constructor for HyadesTestSuite. |
|
HyadesTestSuite(java.lang.String name)
Constructor for HyadesTestSuite. |
|
| Method Summary | |
|---|---|
void |
addTest(junit.framework.Test test)
Sets this test as the parent of the added Test if it implements IHyadesTest. |
void |
addTestSuite(java.lang.Class testClass)
|
protected void |
adjustIteration()
Calculates the current iteration comparing the number of executions with the number of tests of the suite. |
protected void |
doRun(junit.framework.TestResult result)
|
IHyadesTestArbiter |
getArbiter()
Gets the arbiter that evaluates this test suite. |
java.lang.String |
getId()
Returns the id of the test |
int |
getIteration()
Returns the current iteration of the test or -1 if the iteration cannot be calculated. |
static java.lang.String |
getIterationsString(IHyadesTest parentTest)
Deprecated. Use getIterationsString(String, IHyadesTest) instead. |
static java.lang.String |
getIterationsString(java.lang.String parentEventID,
IHyadesTest parentTest)
|
junit.framework.Test |
getParent()
Returns the parent of this test. |
protected static int |
getParentIteration(IHyadesTest parent)
|
protected int |
getPreviousParentIteration()
|
java.lang.String |
getTestInvocationId()
Gets the test invocation id. |
boolean |
isLoop()
Returns whether or not this test implements a loop. |
boolean |
isSynchronous()
Returns whether this test is synchronous or asynchronous. |
void |
run(junit.framework.TestResult result)
If the test result is an instance of HyadesTestResult
this method notifies the start and end events of this test suite to the
registered listeners of the test result. |
protected void |
runFinished(junit.framework.Test test)
|
void |
runTest(junit.framework.Test test,
junit.framework.TestResult result)
|
HyadesTestSuite |
setArbiter(IHyadesTestArbiter arbiter)
Sets the arbiter that evaluates this test suite. |
IHyadesTest |
setId(java.lang.String id)
Sets the test id |
IHyadesTest |
setLoop(boolean loop)
Sets whether this test implements a loop |
void |
setParent(junit.framework.Test parent)
Sets the parent of this test. |
protected void |
setPreviousParentIteration(int iteration)
|
IHyadesTest |
setSynchronous(boolean synchronous)
Sets wheter this test must be executed synchronously or asynchronously. |
IHyadesTest |
setTestInvocationId(java.lang.String testInvocationId)
Sets the test invocation id. |
java.lang.String |
toJUnitString()
Returns the default JUnit toString value. |
java.lang.String |
toString()
Returns this test's hierarchy. |
protected void |
waitUntilFinished()
|
| Methods inherited from class junit.framework.TestSuite |
|---|
countTestCases, createTest, getName, getTestConstructor, setName, testAt, testCount, tests |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.hyades.test.common.junit.IHyadesTest |
|---|
getName |
| Methods inherited from interface junit.framework.Test |
|---|
countTestCases |
| Constructor Detail |
public HyadesTestSuite()
public HyadesTestSuite(java.lang.Class theClass)
theClass - public HyadesTestSuite(java.lang.String name)
name - | Method Detail |
public java.lang.String getId()
IHyadesTest
getId in interface IHyadesTestIHyadesTest.getId()public IHyadesTest setId(java.lang.String id)
IHyadesTest
setId in interface IHyadesTestIHyadesTest.setId(String)public java.lang.String getTestInvocationId()
IHyadesTest
getTestInvocationId in interface IHyadesTestIHyadesTest.getTestInvocationId()public IHyadesTest setTestInvocationId(java.lang.String testInvocationId)
IHyadesTest
setTestInvocationId in interface IHyadesTesttestInvocationId -
IHyadesTest.setTestInvocationId(java.lang.String)public void setParent(junit.framework.Test parent)
IHyadesTest
setParent in interface IHyadesTestparent - IHyadesTest#setParent(TestSuite)public junit.framework.Test getParent()
IHyadesTest
getParent in interface IHyadesTestIHyadesTest.getParent()public int getIteration()
IHyadesTest
getIteration in interface IHyadesTestIHyadesTest.getIteration()public IHyadesTest setSynchronous(boolean synchronous)
IHyadesTest
setSynchronous in interface IHyadesTestsynchronous -
IHyadesTest.setSynchronous(boolean)public boolean isSynchronous()
IHyadesTest
isSynchronous in interface IHyadesTestIHyadesTest.isSynchronous()public boolean isLoop()
IHyadesTest
isLoop in interface IHyadesTestIHyadesTest.isLoop()public IHyadesTest setLoop(boolean loop)
IHyadesTest
setLoop in interface IHyadesTestloop -
IHyadesTest.setLoop(boolean)public HyadesTestSuite setArbiter(IHyadesTestArbiter arbiter)
arbiter -
public IHyadesTestArbiter getArbiter()
public void addTestSuite(java.lang.Class testClass)
TestSuite.addTestSuite(Class)public void addTest(junit.framework.Test test)
test - TestSuite.addTest(Test)public void run(junit.framework.TestResult result)
HyadesTestResult
this method notifies the start and end events of this test suite to the
registered listeners of the test result.
run in interface junit.framework.TestTest.run(junit.framework.TestResult)protected void doRun(junit.framework.TestResult result)
public void runTest(junit.framework.Test test,
junit.framework.TestResult result)
TestSuite.runTest(junit.framework.Test, junit.framework.TestResult)protected void adjustIteration()
protected int getPreviousParentIteration()
protected void setPreviousParentIteration(int iteration)
protected static int getParentIteration(IHyadesTest parent)
protected void waitUntilFinished()
protected void runFinished(junit.framework.Test test)
public java.lang.String toJUnitString()
IHyadesTest
toJUnitString in interface IHyadesTestIHyadesTest.toJUnitString()public java.lang.String toString()
Object.toString()public static java.lang.String getIterationsString(IHyadesTest parentTest)
getIterationsString(String, IHyadesTest) instead.
parentTest -
public static java.lang.String getIterationsString(java.lang.String parentEventID,
IHyadesTest parentTest)
|
TPTP 4.3.0 Testing Tools Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||