org.apache.maven.surefire.report
Class AbstractReporter

java.lang.Object
  extended by org.apache.maven.surefire.report.AbstractReporter
All Implemented Interfaces:
Reporter
Direct Known Subclasses:
AbstractTextReporter, XMLReporter

public abstract class AbstractReporter
extends java.lang.Object
implements Reporter

Version:
$Id: AbstractReporter.java 954002 2010-06-12 13:30:35Z krosenvold $
Author:
Jason van Zyl

Field Summary
protected  int completedCount
           
protected  long endTime
           
protected  int errors
           
protected  int failures
           
protected static java.lang.String NL
           
protected  int skipped
           
protected  long startTime
           
protected  long testSetStartTime
           
 
Constructor Summary
protected AbstractReporter(java.lang.Boolean trimStackTrace)
           
 
Method Summary
protected  java.lang.String elapsedTimeAsString(long runTime)
           
 int getNumErrors()
           
 int getNumFailures()
           
 int getNumSkipped()
           
 int getNumTests()
           
protected  java.lang.String getStackTrace(ReportEntry report)
          Returns stacktrace as String.
 void reset()
           
 void runCompleted()
           
 void runStarting()
           
 void testError(ReportEntry report, java.lang.String stdOut, java.lang.String stdErr)
          Event fired when a test ended with an error (non anticipated problem)
 void testFailed(ReportEntry report, java.lang.String stdOut, java.lang.String stdErr)
          Event fired when a test ended with a failure (anticipated problem)
 void testSetCompleted(ReportEntry report)
           
 void testSetStarting(ReportEntry report)
           
 void testSkipped(ReportEntry report)
           
 void testStarting(ReportEntry report)
          Event fired when a test is about to start
 void testSucceeded(ReportEntry report)
          Event fired when a test ended successfully
 void writeFooter(java.lang.String footer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.surefire.report.Reporter
writeMessage
 

Field Detail

completedCount

protected int completedCount

errors

protected int errors

failures

protected int failures

startTime

protected long startTime

endTime

protected long endTime

NL

protected static final java.lang.String NL

testSetStartTime

protected long testSetStartTime

skipped

protected int skipped
Constructor Detail

AbstractReporter

protected AbstractReporter(java.lang.Boolean trimStackTrace)
Method Detail

writeFooter

public void writeFooter(java.lang.String footer)
Specified by:
writeFooter in interface Reporter

runStarting

public void runStarting()
Specified by:
runStarting in interface Reporter

runCompleted

public void runCompleted()
Specified by:
runCompleted in interface Reporter

testSetStarting

public void testSetStarting(ReportEntry report)
                     throws ReporterException
Specified by:
testSetStarting in interface Reporter
Throws:
ReporterException

testSetCompleted

public void testSetCompleted(ReportEntry report)
                      throws ReporterException
Specified by:
testSetCompleted in interface Reporter
Throws:
ReporterException

testStarting

public void testStarting(ReportEntry report)
Description copied from interface: Reporter
Event fired when a test is about to start

Specified by:
testStarting in interface Reporter
Parameters:
report - The report entry to log for

testSucceeded

public void testSucceeded(ReportEntry report)
Description copied from interface: Reporter
Event fired when a test ended successfully

Specified by:
testSucceeded in interface Reporter
Parameters:
report - The report entry to log for

testSkipped

public void testSkipped(ReportEntry report)
Specified by:
testSkipped in interface Reporter

testError

public void testError(ReportEntry report,
                      java.lang.String stdOut,
                      java.lang.String stdErr)
Description copied from interface: Reporter
Event fired when a test ended with an error (non anticipated problem)

Specified by:
testError in interface Reporter
Parameters:
report - The report entry to log for
stdOut - standard output from the test case
stdErr - error output from the test case

testFailed

public void testFailed(ReportEntry report,
                       java.lang.String stdOut,
                       java.lang.String stdErr)
Description copied from interface: Reporter
Event fired when a test ended with a failure (anticipated problem)

Specified by:
testFailed in interface Reporter
Parameters:
report - The report entry to log for
stdOut - standard output from the test case
stdErr - error output from the test case

getNumErrors

public int getNumErrors()

getNumSkipped

public int getNumSkipped()

getNumFailures

public int getNumFailures()

getNumTests

public int getNumTests()

reset

public void reset()
Specified by:
reset in interface Reporter

elapsedTimeAsString

protected java.lang.String elapsedTimeAsString(long runTime)

getStackTrace

protected java.lang.String getStackTrace(ReportEntry report)
Returns stacktrace as String.

Parameters:
report - ReportEntry object.
Returns:
stacktrace as string.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.