nz.ac.waikato.modeljunit
Class GreedyTester
java.lang.Object
nz.ac.waikato.modeljunit.Tester
nz.ac.waikato.modeljunit.RandomTester
nz.ac.waikato.modeljunit.GreedyTester
public class GreedyTester
- extends RandomTester
Test a system by making greedy walks through an EFSM model of the system.
A greedy random walk gives preference to transitions that have never
been taken before. Once all transitions out of a state have been taken,
it behaves the same as a random walk.
- Author:
- Pele Douangsavanh
Constructor Summary |
GreedyTester(FsmModel fsm)
A convenience constructor that puts a Model wrapper around an FsmModel. |
GreedyTester(Model model)
Creates a test generator that can generate random walks. |
Methods inherited from class nz.ac.waikato.modeljunit.Tester |
addCoverageMetric, addListener, addListener, addListener, buildGraph, buildGraph, buildGraph, buildGraphBreadthFirst, generate, getModel, getRandom, printCoverage, reset, setRandom |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
graph_
protected GraphListener graph_
GreedyTester
public GreedyTester(Model model)
- Creates a test generator that can generate random walks.
- Parameters:
model
- Must be non-null;
GreedyTester
public GreedyTester(FsmModel fsm)
- A convenience constructor that puts a Model wrapper around an FsmModel.
- Parameters:
fsm
- Must be non-null.
getName
public java.lang.String getName()
- Description copied from class:
Tester
- The name of this test generation algorithm.
- Overrides:
getName
in class RandomTester
getDescription
public java.lang.String getDescription()
- Description copied from class:
Tester
- A brief description of this test generation algorithm.
- Overrides:
getDescription
in class RandomTester
doGreedyRandomAction
protected int doGreedyRandomAction()
doGreedyRandomActionOrReset
public int doGreedyRandomActionOrReset()
generate
public int generate()
- Description copied from class:
RandomTester
- Generates one step of a random walk through the model.
This calls
RandomTester.doRandomActionOrReset()
.
- Overrides:
generate
in class RandomTester
- Returns:
- the number of the action taken, or -1 if a reset was done.
Copyright © 2009 ModelJUnit Project. All Rights Reserved.