Class RunListenerAdapter
- java.lang.Object
-
- org.apache.maven.surefire.junitplatform.RunListenerAdapter
-
- All Implemented Interfaces:
org.junit.platform.launcher.TestExecutionListener
final class RunListenerAdapter extends java.lang.Object implements org.junit.platform.launcher.TestExecutionListener
- Since:
- 2.22.0
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.regex.Pattern
COMMA_PATTERN
private java.util.concurrent.ConcurrentMap<org.junit.platform.launcher.TestIdentifier,org.junit.platform.engine.TestExecutionResult>
failures
private RunListener
runListener
private org.junit.platform.launcher.TestPlan
testPlan
private java.util.concurrent.ConcurrentMap<org.junit.platform.launcher.TestIdentifier,java.lang.Long>
testStartTime
-
Constructor Summary
Constructors Constructor Description RunListenerAdapter(RunListener runListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.Integer
computeElapsedTime(org.junit.platform.launcher.TestIdentifier testIdentifier)
private SimpleReportEntry
createReportEntry(org.junit.platform.launcher.TestIdentifier testIdentifier)
private SimpleReportEntry
createReportEntry(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.TestExecutionResult testExecutionResult, java.lang.Integer elapsedTime)
private SimpleReportEntry
createReportEntry(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.TestExecutionResult testExecutionResult, java.util.Map<java.lang.String,java.lang.String> systemProperties, java.lang.String reason, java.lang.Integer elapsedTime)
void
executionFinished(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.TestExecutionResult testExecutionResult)
void
executionSkipped(org.junit.platform.launcher.TestIdentifier testIdentifier, java.lang.String reason)
void
executionStarted(org.junit.platform.launcher.TestIdentifier testIdentifier)
(package private) java.util.Map<org.junit.platform.launcher.TestIdentifier,org.junit.platform.engine.TestExecutionResult>
getFailures()
(package private) boolean
hasFailingTests()
(package private) void
reset()
void
testPlanExecutionFinished(org.junit.platform.launcher.TestPlan testPlan)
void
testPlanExecutionStarted(org.junit.platform.launcher.TestPlan testPlan)
private java.lang.String[]
toClassMethodName(org.junit.platform.launcher.TestIdentifier testIdentifier)
[0] class name - used in stacktrace parser [1] class display name [2] method signature - used in stacktrace parser [3] method display nameprivate StackTraceWriter
toStackTraceWriter(java.lang.String realClassName, java.lang.String realMethodName, java.lang.Throwable throwable)
private StackTraceWriter
toStackTraceWriter(java.lang.String realClassName, java.lang.String realMethodName, org.junit.platform.engine.TestExecutionResult testExecutionResult)
-
-
-
Field Detail
-
COMMA_PATTERN
private static final java.util.regex.Pattern COMMA_PATTERN
-
testStartTime
private final java.util.concurrent.ConcurrentMap<org.junit.platform.launcher.TestIdentifier,java.lang.Long> testStartTime
-
failures
private final java.util.concurrent.ConcurrentMap<org.junit.platform.launcher.TestIdentifier,org.junit.platform.engine.TestExecutionResult> failures
-
runListener
private final RunListener runListener
-
testPlan
private volatile org.junit.platform.launcher.TestPlan testPlan
-
-
Constructor Detail
-
RunListenerAdapter
RunListenerAdapter(RunListener runListener)
-
-
Method Detail
-
testPlanExecutionStarted
public void testPlanExecutionStarted(org.junit.platform.launcher.TestPlan testPlan)
- Specified by:
testPlanExecutionStarted
in interfaceorg.junit.platform.launcher.TestExecutionListener
-
testPlanExecutionFinished
public void testPlanExecutionFinished(org.junit.platform.launcher.TestPlan testPlan)
- Specified by:
testPlanExecutionFinished
in interfaceorg.junit.platform.launcher.TestExecutionListener
-
executionStarted
public void executionStarted(org.junit.platform.launcher.TestIdentifier testIdentifier)
- Specified by:
executionStarted
in interfaceorg.junit.platform.launcher.TestExecutionListener
-
executionFinished
public void executionFinished(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.TestExecutionResult testExecutionResult)
- Specified by:
executionFinished
in interfaceorg.junit.platform.launcher.TestExecutionListener
-
computeElapsedTime
private java.lang.Integer computeElapsedTime(org.junit.platform.launcher.TestIdentifier testIdentifier)
-
executionSkipped
public void executionSkipped(org.junit.platform.launcher.TestIdentifier testIdentifier, java.lang.String reason)
- Specified by:
executionSkipped
in interfaceorg.junit.platform.launcher.TestExecutionListener
-
createReportEntry
private SimpleReportEntry createReportEntry(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.TestExecutionResult testExecutionResult, java.util.Map<java.lang.String,java.lang.String> systemProperties, java.lang.String reason, java.lang.Integer elapsedTime)
-
createReportEntry
private SimpleReportEntry createReportEntry(org.junit.platform.launcher.TestIdentifier testIdentifier)
-
createReportEntry
private SimpleReportEntry createReportEntry(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.TestExecutionResult testExecutionResult, java.lang.Integer elapsedTime)
-
toStackTraceWriter
private StackTraceWriter toStackTraceWriter(java.lang.String realClassName, java.lang.String realMethodName, org.junit.platform.engine.TestExecutionResult testExecutionResult)
-
toStackTraceWriter
private StackTraceWriter toStackTraceWriter(java.lang.String realClassName, java.lang.String realMethodName, java.lang.Throwable throwable)
-
toClassMethodName
private java.lang.String[] toClassMethodName(org.junit.platform.launcher.TestIdentifier testIdentifier)
- [0] class name - used in stacktrace parser
- [1] class display name
- [2] method signature - used in stacktrace parser
- [3] method display name
- Parameters:
testIdentifier
- a class or method- Returns:
- 4 elements string array
-
getFailures
java.util.Map<org.junit.platform.launcher.TestIdentifier,org.junit.platform.engine.TestExecutionResult> getFailures()
- Returns:
- Map of tests that failed.
-
hasFailingTests
boolean hasFailingTests()
-
reset
void reset()
-
-