Class TestSetStats
- java.lang.Object
-
- org.apache.maven.plugin.surefire.report.TestSetStats
-
public class TestSetStats extends java.lang.Object
Maintains per-thread test result state. Not thread safe.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
COMMA
private int
completedCount
private int
errors
private static java.lang.String
ERRORS
private static java.lang.String
FAILURE_MARKER
private int
failures
private static java.lang.String
FAILURES
private static java.lang.String
IN_MARKER
private long
lastStartAt
private boolean
plainFormat
private java.util.Queue<WrappedReportEntry>
reportEntries
private static java.lang.String
RUN
private int
skipped
private static java.lang.String
SKIPPED
private static java.lang.String
TESTS
private static java.lang.String
TESTS_RUN
private long
testSetStartAt
private long
testStartAt
private boolean
trimStackTrace
-
Constructor Summary
Constructors Constructor Description TestSetStats(boolean trimStackTrace, boolean plainFormat)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static java.lang.String
concatenateWithTestGroup(org.apache.maven.shared.utils.logging.MessageBuilder builder, ReportEntry report, boolean phrasedClassName)
Append the test set message for a report.private void
finishTest(WrappedReportEntry reportEntry)
java.lang.String
getColoredTestSetSummary(WrappedReportEntry reportEntry, boolean phrasedClassName)
int
getCompletedCount()
int
getElapsedSinceLastStart()
int
getElapsedSinceTestSetStart()
int
getErrors()
int
getFailures()
java.util.Collection<WrappedReportEntry>
getReportEntries()
int
getSkipped()
java.util.List<java.lang.String>
getTestResults()
java.lang.String
getTestSetSummary(WrappedReportEntry reportEntry, boolean phrasedClassName)
private void
incrementCompletedCount()
void
reset()
void
testError(WrappedReportEntry reportEntry)
void
testFailure(WrappedReportEntry reportEntry)
void
testSetStart()
void
testSkipped(WrappedReportEntry reportEntry)
void
testStart()
void
testSucceeded(WrappedReportEntry reportEntry)
-
-
-
Field Detail
-
TESTS
private static final java.lang.String TESTS
- See Also:
- Constant Field Values
-
RUN
private static final java.lang.String RUN
- See Also:
- Constant Field Values
-
TESTS_RUN
private static final java.lang.String TESTS_RUN
- See Also:
- Constant Field Values
-
FAILURES
private static final java.lang.String FAILURES
- See Also:
- Constant Field Values
-
ERRORS
private static final java.lang.String ERRORS
- See Also:
- Constant Field Values
-
SKIPPED
private static final java.lang.String SKIPPED
- See Also:
- Constant Field Values
-
FAILURE_MARKER
private static final java.lang.String FAILURE_MARKER
- See Also:
- Constant Field Values
-
IN_MARKER
private static final java.lang.String IN_MARKER
- See Also:
- Constant Field Values
-
COMMA
private static final java.lang.String COMMA
- See Also:
- Constant Field Values
-
reportEntries
private final java.util.Queue<WrappedReportEntry> reportEntries
-
trimStackTrace
private final boolean trimStackTrace
-
plainFormat
private final boolean plainFormat
-
testSetStartAt
private long testSetStartAt
-
testStartAt
private long testStartAt
-
completedCount
private int completedCount
-
errors
private int errors
-
failures
private int failures
-
skipped
private int skipped
-
lastStartAt
private long lastStartAt
-
-
Method Detail
-
getElapsedSinceTestSetStart
public int getElapsedSinceTestSetStart()
-
getElapsedSinceLastStart
public int getElapsedSinceLastStart()
-
testSetStart
public void testSetStart()
-
testStart
public void testStart()
-
finishTest
private void finishTest(WrappedReportEntry reportEntry)
-
testSucceeded
public void testSucceeded(WrappedReportEntry reportEntry)
-
testError
public void testError(WrappedReportEntry reportEntry)
-
testFailure
public void testFailure(WrappedReportEntry reportEntry)
-
testSkipped
public void testSkipped(WrappedReportEntry reportEntry)
-
reset
public void reset()
-
getCompletedCount
public int getCompletedCount()
-
getErrors
public int getErrors()
-
getFailures
public int getFailures()
-
getSkipped
public int getSkipped()
-
incrementCompletedCount
private void incrementCompletedCount()
-
getTestSetSummary
public java.lang.String getTestSetSummary(WrappedReportEntry reportEntry, boolean phrasedClassName)
-
getColoredTestSetSummary
public java.lang.String getColoredTestSetSummary(WrappedReportEntry reportEntry, boolean phrasedClassName)
-
getTestResults
public java.util.List<java.lang.String> getTestResults()
-
getReportEntries
public java.util.Collection<WrappedReportEntry> getReportEntries()
-
concatenateWithTestGroup
static java.lang.String concatenateWithTestGroup(org.apache.maven.shared.utils.logging.MessageBuilder builder, ReportEntry report, boolean phrasedClassName)
Append the test set message for a report. e.g. "org.foo.BarTest ( of group )" or phrased text "test class description ( of group )".- Parameters:
builder
- MessageBuilder with preceded text insidereport
- report whose test set is starting- Returns:
- the message
-
-