|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jwalk.out.Report org.jwalk.out.ProtocolReport org.jwalk.out.StatisticalReport org.jwalk.out.CycleReport
public class CycleReport
CycleReport is a test report generated after executing one test cycle.
A CycleReport is responsible for formatting the test result data
after one test cycle is complete. A test cycle contains TestSequences
of a given length (and optionally for a specified starting state). The
TestSequences may be accessed and displayed in various ways. This
CycleReport also offers direct access to the test cycle number, the
optional starting state and the list of TestSequences that were exercised.
By default, each TestSequence in the cycle is listed, followed by a
judgement whether the result was NORMAL or an EXCEPTION. If an Oracle
was used to validate the test result, the judgement is whether the test
PASSED or FAILED. Further notes may appear, depending on what the
JWalker was able to discover. A note may be added to show that the
test object's state was found to be unchanged, or reentrant (returning to a
previously visited state). A note may be added to validated test results
to highlight if they were manually confirmed or rejected.
Client programs may take control of how test results are displayed. A
CycleReport grants direct access to the list of TestSequence results, and
offers the option to format a sequence with, or without the judgement of
the outcome appended as text. This allows client programs to choose to
highlight a normal, terminating, passing or failing TestSequence in a
different way, for example by using colour highlighting, or graphical
symbols. If this is desired, then the client program should query the
TestSequence directly to discover the outcome of the test.
The API of CycleReport also allows client programs to count the
number of test sequences which executed, which terminated normally,
which terminated with an exception, which were manually confirmed or
rejected and which were automatically passed or failed. It also allows
client programs to count the number of pruned test sequences, which were
deemed redundant, and also the number of abandoned sequences that were not
eventually tested, if the tester chose to quit interactive validation.
Field Summary |
---|
Fields inherited from class org.jwalk.out.StatisticalReport |
---|
confirmed, failed, passed, rejected, succeeded, terminated |
Fields inherited from class org.jwalk.out.Report |
---|
edition, walker |
Constructor Summary | |
---|---|
CycleReport(ClassInspector inspector,
java.util.List<TestSequence> results,
int cycle)
Creates a CycleReport for the current test cycle. |
|
CycleReport(ClassInspector inspector,
java.util.List<TestSequence> results,
java.lang.String state,
int cycle)
Creates a CycleReport for a given state and test cycle. |
Method Summary | |
---|---|
java.lang.String |
banner()
Returns a suitable one-line banner for the current test cycle. |
int |
countAbandoned()
Counts the number of tests that were abandoned. |
int |
countPruned()
Counts the number of tests that were pruned in this test cycle. |
java.lang.String |
getContent()
Returns the content of this CycleReport as formatted text. |
java.lang.String |
getStartingState()
Returns the name of the starting state, or null. |
int |
getTestCycle()
Returns the number of the current test cycle. |
java.util.List<TestSequence> |
getTestResults()
Returns the list of test results for the current cycle. |
java.lang.String |
toString(TestSequence sequence,
boolean outcome)
Returns a formatted version of a TestSequence and its outcome. |
Methods inherited from class org.jwalk.out.StatisticalReport |
---|
countConfirmed, countCorrect, countExecuted, countFailed, countIncorrect, countPassed, countRejected, countSucceeded, countTerminated, tallyResults |
Methods inherited from class org.jwalk.out.ProtocolReport |
---|
getConstants, getConstructors, getJWalker, getMethods, getTestClass, isAbstract, toString, toString, toString |
Methods inherited from class org.jwalk.out.Report |
---|
getEdition, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CycleReport(ClassInspector inspector, java.util.List<TestSequence> results, int cycle)
inspector
- the ClassInspector that inspected the test class.results
- the set of results for the current test cycle.cycle
- the current test cycle number.public CycleReport(ClassInspector inspector, java.util.List<TestSequence> results, java.lang.String state, int cycle)
inspector
- the ClassInspector that inspected the test class.results
- the set of results for the current test cycle.state
- the name of the tested object's starting state.cycle
- the current test cycle number.Method Detail |
---|
public int getTestCycle()
public java.lang.String getStartingState()
public java.util.List<TestSequence> getTestResults()
public java.lang.String getContent()
getContent
in class ProtocolReport
public java.lang.String banner()
banner
in class ProtocolReport
public java.lang.String toString(TestSequence sequence, boolean outcome)
sequence
- the TestSequence to format.outcome
- true, to display the outcome judgement.
public int countAbandoned()
public int countPruned()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |