|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.utep.cs.jet.rat.TestCaseGenerator
public abstract class TestCaseGenerator
An abstract class to define the public interface for test case
generation and execution. This class also implements the
Observer design pattern to let the user observe test cases
and test results. For this, it provides an interface for a test
case generation listener (TestCaseGenerationListener) to
register itself.
| Constructor Summary | |
|---|---|
protected |
TestCaseGenerator()
Constructs an object for generating test cases. |
| Method Summary | |
|---|---|
void |
addTestCaseGenerationListener(TestCaseGenerationListener l)
Adds the given observer to the list of listeners. |
abstract void |
generate(Context ctx)
Generates test cases under the given testing context. |
static TestCaseGenerator |
getInstance(String strategy)
Returns a test case generator of the given strategy. |
protected void |
notifyFailure(TestCase tc,
String msg)
Notifies a failure test case generation to the listeners. |
protected void |
notifyMeaningless(TestCase tc)
Notifies a meaningless test case generation to the listeners. |
protected void |
notifyRedundant(TestCase tc)
Notifies a duplicate test case generation to the listeners. |
protected void |
notifySuccess(TestCase tc)
Notifies a success test case generation to the listeners. |
void |
removeTestCaseGenerationListener(TestCaseGenerationListener l)
Removes the given observer from the list of listeners. |
protected void |
reset(Context context)
Resets this object to generate test cases under the given testing context. |
abstract Iterable<TestCase> |
testcases()
Returns an iterator that iterates over the generated test cases. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected TestCaseGenerator()
| Method Detail |
|---|
public static TestCaseGenerator getInstance(String strategy)
random and
irandom (incremental random).
public abstract void generate(Context ctx)
testcases().
public abstract Iterable<TestCase> testcases()
protected void reset(Context context)
public void addTestCaseGenerationListener(TestCaseGenerationListener l)
public void removeTestCaseGenerationListener(TestCaseGenerationListener l)
protected void notifySuccess(TestCase tc)
protected void notifyFailure(TestCase tc,
String msg)
protected void notifyMeaningless(TestCase tc)
protected void notifyRedundant(TestCase tc)
|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||