org.tigris.mbt
Class ModelBasedTesting

java.lang.Object
  extended by org.tigris.mbt.ModelBasedTesting

public class ModelBasedTesting
extends Object

The object handles the test case generation, both online and offline.

Author:
krikar

Constructor Summary
ModelBasedTesting()
           
 
Method Summary
 void addAlternativeCondition(int conditionType, String conditionValue)
           
 void addCondition(int conditionType, String conditionValue)
           
 void backtrack(boolean popEdge)
           
 void enableBacktrack(boolean backtracking)
           
 void enableExtended(boolean extended)
           
 void executePath(Class clsClass)
           
 void executePath(Class clsClass, Object objInstance)
           
 void executePath(Object objInstance)
           
 void executePath(String strClassName)
           
 String getCurrentState()
           
 String getDataValue(String data)
          Returns the value of an data object within the data space of the model.
 SparseGraph getGraph()
          Return the instance of the graph
 String[] getNextStep()
           
 String getStartupScript()
           
 String getStatisticsCompact()
           
 String getStatisticsString()
           
 String getStatisticsVerbose()
           
 boolean hasCurrentEdgeBackTracking()
           
 boolean hasCurrentVertexBackTracking()
           
 boolean hasNextStep()
           
 void interractivePath()
           
 void interractivePath(InputStream in)
           
 void readGraph(String graphmlFileName)
           
 void setCondition(StopCondition condition)
           
 void setGenerator(int generatorType)
           
 void setGenerator(PathGenerator generator)
           
 void setGraph(SparseGraph graph)
           
 void setStartupScript(String script)
           
 void setTemplate(String templateFile)
           
 void setTemplate(String[] template)
           
 String toString()
           
 void writeModel(PrintStream ps)
           
 void writePath()
           
 void writePath(PrintStream out)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelBasedTesting

public ModelBasedTesting()
Method Detail

addAlternativeCondition

public void addAlternativeCondition(int conditionType,
                                    String conditionValue)

addCondition

public void addCondition(int conditionType,
                         String conditionValue)

setCondition

public void setCondition(StopCondition condition)

getGraph

public SparseGraph getGraph()
Return the instance of the graph


setGraph

public void setGraph(SparseGraph graph)

getDataValue

public String getDataValue(String data)
                    throws InvalidDataException
Returns the value of an data object within the data space of the model.

Parameters:
data - The name of the data object, which value is to be retrieved.
Returns:
The value of the data object. The value is always returned a s string. It is the calling parties task to parse the string and convert it to correct type.
Throws:
InvalidDataException - If the retrieval of the data fails, the InvalidDataException is thrown. For example if a FiniteStateMachine is used, which has no data space, the exception is thrown.

enableExtended

public void enableExtended(boolean extended)

setGenerator

public void setGenerator(PathGenerator generator)

setGenerator

public void setGenerator(int generatorType)

hasNextStep

public boolean hasNextStep()

getNextStep

public String[] getNextStep()

getCurrentState

public String getCurrentState()

backtrack

public void backtrack(boolean popEdge)

readGraph

public void readGraph(String graphmlFileName)

writeModel

public void writeModel(PrintStream ps)

hasCurrentEdgeBackTracking

public boolean hasCurrentEdgeBackTracking()

hasCurrentVertexBackTracking

public boolean hasCurrentVertexBackTracking()

enableBacktrack

public void enableBacktrack(boolean backtracking)

getStatisticsString

public String getStatisticsString()

getStatisticsCompact

public String getStatisticsCompact()

getStatisticsVerbose

public String getStatisticsVerbose()

setTemplate

public void setTemplate(String[] template)

setTemplate

public void setTemplate(String templateFile)

interractivePath

public void interractivePath()

interractivePath

public void interractivePath(InputStream in)

executePath

public void executePath(String strClassName)

executePath

public void executePath(Class clsClass)

executePath

public void executePath(Object objInstance)

executePath

public void executePath(Class clsClass,
                        Object objInstance)

writePath

public void writePath()

writePath

public void writePath(PrintStream out)

setStartupScript

public void setStartupScript(String script)
Parameters:
childText -

getStartupScript

public String getStartupScript()
Returns:
the startupScript

toString

public String toString()
Overrides:
toString in class Object