|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkorat.testing.impl.AbstractTestCaseGenerator
korat.testing.impl.TestCradle
public class TestCradle
Given the Finitization, conducts tests for all regular candidates in domain state space
Field Summary | |
---|---|
protected IIntList |
accessedFields
|
protected ClassLoader |
classLoader
|
protected ConfigManager |
config
|
private ICVFactory |
cvFactory
|
private DataOutputStream |
dos
|
private String |
finName
|
private static TestCradle |
instance
|
protected boolean |
predicateOK
|
protected StateSpace |
stateSpace
|
protected IKoratSearchStrategy |
stateSpaceExplorer
|
protected long |
totalExplored
|
private boolean |
traceStarted
|
protected long |
validCasesGenerated
|
Fields inherited from class korat.testing.impl.AbstractTestCaseGenerator |
---|
interrupted, out |
Constructor Summary | |
---|---|
protected |
TestCradle()
|
Method Summary | |
---|---|
protected boolean |
checkPredicate(Object testCase,
Method predicate)
|
void |
continueFieldTrace()
Notifies continuation of a stopped field trace |
IIntList |
getAccessedFields()
|
int[] |
getCandidateVector()
|
ClassLoader |
getClassLoader()
|
private Method |
getFinMethod(Class cls,
String finName,
String[] finArgs)
|
static TestCradle |
getInstance()
|
protected Method |
getPredicateMethod(Class<?> testClass,
String predicateName)
|
StateSpace |
getStateSpace()
|
long |
getTotalExplored()
|
long |
getValidCasesGenerated()
|
protected void |
initStartAndEndCVs(IKoratSearchStrategy ssExplorer)
|
private IFinitization |
invokeFinMethod(Class cls,
Method finitize,
String[] finArgs)
|
boolean |
isPredicateOK()
|
void |
notifyFieldAccess(int accessedFieldIndex)
Notifies that particular field has been accessed |
void |
notifyFieldAccess(Object obj,
String field)
Notifies that particular field has be accessed |
private void |
printCV(IKoratSearchStrategy sse,
boolean predicateOK)
|
protected void |
printStatus(IKoratSearchStrategy sse,
boolean predicateOK)
|
private void |
start(Class clazz,
String[] finArgs)
|
void |
start(String className,
String[] finArgs)
|
void |
startFieldTrace()
Notifies the beginning of field trace |
protected void |
startTestGeneration(IFinitization fin)
|
void |
stopFieldTrace()
Notifies the end of field trace |
Methods inherited from class korat.testing.impl.AbstractTestCaseGenerator |
---|
attachClient, attachSpecialClient, detachClient, interrupt, isInterrupted, log, log, log, notifyClients, notifyTestFinished, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static TestCradle instance
private ICVFactory cvFactory
protected ClassLoader classLoader
private boolean traceStarted
protected long validCasesGenerated
protected long totalExplored
protected ConfigManager config
private String finName
protected StateSpace stateSpace
protected IIntList accessedFields
protected IKoratSearchStrategy stateSpaceExplorer
protected boolean predicateOK
private DataOutputStream dos
Constructor Detail |
---|
protected TestCradle()
Method Detail |
---|
public static TestCradle getInstance()
public ClassLoader getClassLoader()
public void startFieldTrace()
ITester
startFieldTrace
in interface ITester
public void continueFieldTrace()
ITester
continueFieldTrace
in interface ITester
public void stopFieldTrace()
ITester
stopFieldTrace
in interface ITester
public void notifyFieldAccess(Object obj, String field)
ITester
notifyFieldAccess
in interface ITester
obj
- -
object the field of which is accessedfield
- -
field that is accessedpublic void notifyFieldAccess(int accessedFieldIndex)
ITester
notifyFieldAccess
in interface ITester
accessedFieldIndex
- -
index of field in candidate vectorpublic long getValidCasesGenerated()
public long getTotalExplored()
public int[] getCandidateVector()
public boolean isPredicateOK()
public IIntList getAccessedFields()
public StateSpace getStateSpace()
public void start(String className, String[] finArgs) throws KoratTestException
KoratTestException
private void start(Class clazz, String[] finArgs) throws KoratTestException
KoratTestException
private Method getFinMethod(Class cls, String finName, String[] finArgs) throws CannotFindFinitizationException
CannotFindFinitizationException
private IFinitization invokeFinMethod(Class cls, Method finitize, String[] finArgs) throws CannotInvokeFinitizationException
CannotInvokeFinitizationException
protected void startTestGeneration(IFinitization fin) throws CannotInvokePredicateException, CannotFindPredicateException
CannotInvokePredicateException
CannotFindPredicateException
protected Method getPredicateMethod(Class<?> testClass, String predicateName) throws CannotFindPredicateException
CannotFindPredicateException
protected boolean checkPredicate(Object testCase, Method predicate) throws CannotInvokePredicateException
CannotInvokePredicateException
protected void initStartAndEndCVs(IKoratSearchStrategy ssExplorer)
protected void printStatus(IKoratSearchStrategy sse, boolean predicateOK)
private void printCV(IKoratSearchStrategy sse, boolean predicateOK)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |