org.jwalk.out
Class StatisticalReport

java.lang.Object
  extended by org.jwalk.out.Report
      extended by org.jwalk.out.ProtocolReport
          extended by org.jwalk.out.StatisticalReport
Direct Known Subclasses:
CycleReport, SummaryReport

public abstract class StatisticalReport
extends ProtocolReport

StatisticalReport is an abstract report containing test statistics. Not intended to be published separately, StatisticalReport is a common superclass of CycleReport and SummaryReport. It accumulates various results after testing is completed, counting up statistics from each executed TestSequence.

The API of StatisticalReport allows client programs to access 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.

Version:
1.0
Author:
Anthony Simons

Field Summary
protected  int confirmed
           
protected  int failed
           
protected  int passed
           
protected  int rejected
           
protected  int succeeded
          Counters for various judgements upon tests.
protected  int terminated
           
 
Fields inherited from class org.jwalk.out.Report
edition, walker
 
Constructor Summary
protected StatisticalReport(Edition edition, ClassInspector inspector)
          Secret method to initialise the edition and inspector.
 
Method Summary
 int countConfirmed()
          Counts the number of tests confirmed manually by the tester.
 int countCorrect()
          Counts the number of tests passed automatically by the oracle.
 int countExecuted()
          Counts the number of tests that were executed.
 int countFailed()
          Counts the total number of tests failed in this test cycle.
 int countIncorrect()
          Counts the number of tests failed automatically by the oracle.
 int countPassed()
          Counts the total number of tests passed in this test cycle.
 int countRejected()
          Counts the number of tests rejected manually by the tester.
 int countSucceeded()
          Counts the number of tests that executed normally.
 int countTerminated()
          Counts the number of tests that terminated abnormally.
protected  void tallyResults(java.util.List<TestSequence> results)
          Secret function to tally the test results after testing is finished.
 
Methods inherited from class org.jwalk.out.ProtocolReport
banner, getConstants, getConstructors, getContent, 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
 

Field Detail

succeeded

protected int succeeded
Counters for various judgements upon tests. The first two counters succeeded and terminated are always valid. The last four counters confirmed, rejected, passed, failed are only valid if the tests were validated by an oracle; otherwise they are zero.


terminated

protected int terminated

confirmed

protected int confirmed

rejected

protected int rejected

passed

protected int passed

failed

protected int failed
Constructor Detail

StatisticalReport

protected StatisticalReport(Edition edition,
                            ClassInspector inspector)
Secret method to initialise the edition and inspector.

Parameters:
edition - an enumerated indicator of the type of Report.
inspector - the ClassInspector used to inspect the test class.
Method Detail

tallyResults

protected void tallyResults(java.util.List<TestSequence> results)
Secret function to tally the test results after testing is finished.

Parameters:
results - the list of results, whose statistics are to be tallied.

countExecuted

public int countExecuted()
Counts the number of tests that were executed. This is usually the same as the size of the result set, but may be less than this, if interactive testing was abandoned halfway through a test cycle.

Returns:
the number of tests that were executed in this cycle.

countSucceeded

public int countSucceeded()
Counts the number of tests that executed normally. This is the number of tests that were executed and returned a non-exceptional result.

Returns:
the number of tests that executed normally in this cycle.

countTerminated

public int countTerminated()
Counts the number of tests that terminated abnormally. This is the number of tests that were executed and raised an exception.

Returns:
the number of tests that terminated abnormally in this cycle.

countConfirmed

public int countConfirmed()
Counts the number of tests confirmed manually by the tester. This is the number of executed tests, whose results were validated by an oracle and were manually confirmed as correct by the tester.

Returns:
the number of manually confirmed tests in this cycle.

countRejected

public int countRejected()
Counts the number of tests rejected manually by the tester. This is the number of executed tests, whose results were validated by an oracle and were manually rejected as incorrect by the tester.

Returns:
the number of manually rejected tests in this cycle.

countCorrect

public int countCorrect()
Counts the number of tests passed automatically by the oracle. This is the number of executed tests, whose results were validated by an oracle and were automatically passed as correct.

Returns:
the number of automatically passed tests in this cycle.

countIncorrect

public int countIncorrect()
Counts the number of tests failed automatically by the oracle. This is the number of executed tests, whose results were validated by an oracle and were automatically failed as incorrect.

Returns:
the number of automatically failed tests in this cycle.

countPassed

public int countPassed()
Counts the total number of tests passed in this test cycle. This is the number of tests that were either passed automatically, or manually confirmed as correct by the tester.

Returns:
the total number of tests passed in this cycle.

countFailed

public int countFailed()
Counts the total number of tests failed in this test cycle. This is the number of tests that were either failed automatically, or manually rejected as incorrect by the tester.

Returns:
the total number of tests failed in this cycle.