![]() |
Synthia
Generic and flexible data structure generator
|
Performs monkey testing by interacting with a component.
The monkey works as follows:
Picker<Action> as a source of actions to be performed on the component. Actions provided by this picker are executed one by one. What the "component" can be is totally abstract. All the monkey expects is that it implements the Resettable interface. A typical component is a graphical user interface (such as a JFrame),
Definition at line 54 of file Monkey.java.
Public Member Functions | |
| Monkey (Resettable object, Picker< Action > actions, Picker< Float > decision, PrintStream ps) | |
| Creates a new instance of the monkey. More... | |
| Monkey (Resettable object, Picker< Action > actions, Picker< Float > decision) | |
| Creates a new instance of the monkey. More... | |
| boolean | check () |
| Exception | getException () |
| List< Action > | getShrunk () |
Protected Member Functions | |
| void | print (Object message) |
| Prints a message to the print stream. More... | |
| void | println (Object message) |
| Prints a message to the print stream. More... | |
Protected Attributes | |
| Picker< Action > | m_actionPicker |
| The picker producing the actions to be applied. More... | |
| Resettable | m_object |
| The object on which the actions are applied. More... | |
| List< Action > | m_bestSequence |
| The "best" sequence of actions found by the monkey so far. More... | |
| Exception | m_lastException |
| The exception thrown at the end of the "best" sequence of actions found by the monkey so far. More... | |
| Picker< Float > | m_decision |
| A picker passed to the action picker for the shrinking process. More... | |
| PrintStream | m_out |
| A print stream where the monkey outputs status messages during its execution. More... | |
| int | m_bestThreshold |
| The length of the sequence under which the monkey is allowed to stop searching. More... | |
Static Protected Attributes | |
| static final int | s_maxShrinkingPhases = 5 |
| The maximum number of shrinking phases the monkey will attempt. More... | |
| static final int | s_maxTries = 5 |
| The maximum number of attempts at producing a sequence in each shrinking phase. More... | |
| ca.uqac.lif.synthia.test.Monkey.Monkey | ( | Resettable | object, |
| Picker< Action > | actions, | ||
| Picker< Float > | decision, | ||
| PrintStream | ps | ||
| ) |
Creates a new instance of the monkey.
| object | The object on which the actions are applied |
| actions | The picker producing the actions to be applied |
| decision | A picker passed to the action picker for the shrinking process |
| ps | A print stream where the monkey outputs status messages during its execution. Set it to null to disable messages. |
Definition at line 114 of file Monkey.java.
| ca.uqac.lif.synthia.test.Monkey.Monkey | ( | Resettable | object, |
| Picker< Action > | actions, | ||
| Picker< Float > | decision | ||
| ) |
Creates a new instance of the monkey.
| object | The object on which the actions are applied |
| actions | The picker producing the actions to be applied |
| decision | A picker passed to the action picker for the shrinking process |
Definition at line 133 of file Monkey.java.
| boolean ca.uqac.lif.synthia.test.Monkey.check | ( | ) |
Definition at line 138 of file Monkey.java.
| Exception ca.uqac.lif.synthia.test.Monkey.getException | ( | ) |
Definition at line 216 of file Monkey.java.
| List<Action> ca.uqac.lif.synthia.test.Monkey.getShrunk | ( | ) |
Definition at line 221 of file Monkey.java.
|
protected |
Prints a message to the print stream.
| message | The message |
Definition at line 230 of file Monkey.java.
|
protected |
Prints a message to the print stream.
| message | The message |
Definition at line 242 of file Monkey.java.
The picker producing the actions to be applied.
Definition at line 70 of file Monkey.java.
|
protected |
The "best" sequence of actions found by the monkey so far.
Definition at line 80 of file Monkey.java.
|
protected |
The length of the sequence under which the monkey is allowed to stop searching.
Definition at line 103 of file Monkey.java.
|
protected |
A picker passed to the action picker for the shrinking process.
Definition at line 91 of file Monkey.java.
|
protected |
The exception thrown at the end of the "best" sequence of actions found by the monkey so far.
Definition at line 86 of file Monkey.java.
|
protected |
The object on which the actions are applied.
Definition at line 75 of file Monkey.java.
|
protected |
A print stream where the monkey outputs status messages during its execution.
Definition at line 97 of file Monkey.java.
|
staticprotected |
The maximum number of shrinking phases the monkey will attempt.
Definition at line 59 of file Monkey.java.
|
staticprotected |
The maximum number of attempts at producing a sequence in each shrinking phase.
Definition at line 65 of file Monkey.java.