org.jwalk.out
Class SummaryReport

java.lang.Object
  extended by org.jwalk.out.Report
      extended by org.jwalk.out.ProtocolReport
          extended by org.jwalk.out.StatisticalReport
              extended by org.jwalk.out.SummaryReport

public class SummaryReport
extends StatisticalReport

SummaryReport is a summary of test statistics once testing is finished. A SummaryReport is dispatched at the very end of a test series. It aggregates the statistics of several CycleReports. Depending on the chosen test Modality from {INSPECT, EXPLORE, VALIDATE}, the SummaryReport will report the test class, the test strategy and modality and the depth to which testing was carried out; then may also report on numbers of test sequences which were executed normally, or which terminated with an exception, or which were pruned from the test set because they were deemed redundant; then may also report on numbers of test sequences which were passed or failed, either manually or automatically. The API of SummaryReport 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, and which were pruned from the overall test set. Pruned test sequences are those which would return a result equivalent to a shorter test sequence that has already been tested.

Version:
1.0
Author:
Anthony Simons

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
SummaryReport(ClassInspector inspector)
          Creates a SummaryReport once all testing is finished.
 
Method Summary
 java.lang.String banner()
          Returns a banner announcing the test summary.
 long countPruned()
          Counts the number of tests that were pruned altogether.
 java.lang.String explorationSummary()
          Returns a summary of the results of exploration.
 java.lang.String getContent()
          Returns the content this SummaryReport as formatted text.
 void tallyResults(CycleReport report)
          Tallies the results of several TestCycleReports.
 java.lang.String validationSummary()
          Returns a summary of the results of validation.
 
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

SummaryReport

public SummaryReport(ClassInspector inspector)
Creates a SummaryReport once all testing is finished.

Parameters:
inspector - the ClassInspector that inspected the test class.
Method Detail

tallyResults

public void tallyResults(CycleReport report)
Tallies the results of several TestCycleReports. Each time the method is called, it aggregates the results from a CycleReport into this SummaryReport.

Parameters:
report - a CycleReport.

getContent

public java.lang.String getContent()
Returns the content this SummaryReport as formatted text. The returned text lists the number of tests that succeeded or terminated, and that were confirmed, rejected, passed and failed. This method implements toString() for SummaryReport.

Overrides:
getContent in class ProtocolReport
Returns:
a formatted textual report.

banner

public java.lang.String banner()
Returns a banner announcing the test summary. This is a multi-line text with a title, a blank line, and on separate lines the test class, the test strategy and mode, and the depth of exploration. The banner ends with a newline.

Overrides:
banner in class ProtocolReport
Returns:
a banner announcing the test summary.

explorationSummary

public java.lang.String explorationSummary()
Returns a summary of the results of exploration. This is a multi-line text reporting how many test sequences executed normally, terminated in an exception, or were discarded due to pruning.

Returns:
a summary of the exploration results.

validationSummary

public java.lang.String validationSummary()
Returns a summary of the results of validation. This is a multi-line text reporting how many test outcomes were passed or failed, either manually by the tester, or automatically by the Oracle.

Returns:
a summary of the validation results.

countPruned

public long countPruned()
Counts the number of tests that were pruned altogether. This is the difference between the expected number of tests over all test cycles, minus the actual number executed. Pruning measures how effective the test strategy was in removing redundant tests. Note: if the tester aborts partway through testing, this will appear to inflate the number of pruned tests.

Returns:
the number of tests that were pruned altogether.