org.apache.maven.surefire.report
Class AbstractConsoleReporter

java.lang.Object
  extended by org.apache.maven.surefire.report.AbstractReporter
      extended by org.apache.maven.surefire.report.AbstractTextReporter
          extended by org.apache.maven.surefire.report.AbstractConsoleReporter
All Implemented Interfaces:
Reporter, RunReporter
Direct Known Subclasses:
BriefConsoleReporter, ConsoleReporter, DetailedConsoleReporter

public abstract class AbstractConsoleReporter
extends AbstractTextReporter
implements RunReporter

Base class for console reporters.

Author:
Brett Porter

Field Summary
 
Fields inherited from class org.apache.maven.surefire.report.AbstractTextReporter
BRIEF, PLAIN, SUMMARY, writer
 
Method Summary
static String getTestSetStartingMessage(ReportEntry report)
          Get the test set starting message for a report.
static boolean isTestSetStartingMessage(String message)
          Check if the String passed as argument is a "test starting" message.
static ReportEntry parseTestSetStartingMessage(String message)
          Parses a Surefire test set starting message into a ReportEntry object.
 void runStarting()
          Indicates the start of the entire test run.
 void testSetStarting(ReportEntry report)
          Indicates the start of a given test-set
 
Methods inherited from class org.apache.maven.surefire.report.AbstractTextReporter
getElapsedTimeSummary, getOutput, getTestSetSummary, isTestSetCompletedMessage, reset, setWriter, testError, testFailed, testSetCompleted, testSkipped, testSucceeded, writeDetailMessage, writeMessage
 
Methods inherited from class org.apache.maven.surefire.report.AbstractReporter
runCompleted, testAssumptionFailure, testError, testFailed, testStarting, writeFooter
 
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.RunReporter
runCompleted
 

Method Detail

testSetStarting

public void testSetStarting(ReportEntry report)
                     throws ReporterException
Description copied from interface: Reporter
Indicates the start of a given test-set

Specified by:
testSetStarting in interface Reporter
Overrides:
testSetStarting in class AbstractTextReporter
Parameters:
report - the report entry describing the testset
Throws:
ReporterException - When reporting fails

runStarting

public void runStarting()
Description copied from interface: RunReporter
Indicates the start of the entire test run. Only called on the first provider, and just by the ReporterFactory

Specified by:
runStarting in interface RunReporter
Overrides:
runStarting in class AbstractReporter

getTestSetStartingMessage

public static String getTestSetStartingMessage(ReportEntry report)
Get the test set starting message for a report. eg. "Running org.foo.BarTest ( of group )"

Parameters:
report - report whose test set is starting
Returns:
the message

parseTestSetStartingMessage

public static ReportEntry parseTestSetStartingMessage(String message)
Parses a Surefire test set starting message into a ReportEntry object. Only name and group will be set if applicable.

Parameters:
message - The test starting message
Returns:
the parsed ReportEntry

isTestSetStartingMessage

public static boolean isTestSetStartingMessage(String message)
Check if the String passed as argument is a "test starting" message. If so it can be passed to parseTestSetStartingMessage(String)

Parameters:
message - the message to check
Returns:
true if it is a "test starting" message


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