Module org.junitpioneer
Package org.junitpioneer.jupiter.issue
Class IssueExtensionExecutionListener
- java.lang.Object
-
- org.junitpioneer.jupiter.issue.IssueExtensionExecutionListener
-
- All Implemented Interfaces:
org.junit.platform.launcher.TestExecutionListener
public class IssueExtensionExecutionListener extends java.lang.Object implements org.junit.platform.launcher.TestExecutionListenerThis listener collects the names and results of all tests, which are annotated with the@Issueannotation. After all tests are finished the results are provided to anIssueProcessorfor further processing.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanactiveThis listener will be active as soon as Pioneer is on the class/module path, regardless of whether@Issueis actually used.static java.lang.StringREPORT_ENTRY_KEYprivate java.util.concurrent.ConcurrentMap<java.lang.String,IssueTestCaseBuilder>testCasesstatic java.lang.StringTIME_REPORT_KEY
-
Constructor Summary
Constructors Constructor Description IssueExtensionExecutionListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.util.List<IssueTestSuite>createIssueTestSuites()voidexecutionFinished(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.TestExecutionResult testExecutionResult)private java.util.List<IssueTestCase>getIssueTestCases(IssueTestCaseBuilder builder)private java.util.List<IssueTestCase>mergeIssueTestCases(java.util.List<IssueTestCase> first, java.util.List<IssueTestCase> second)voidreportingEntryPublished(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.reporting.ReportEntry entry)voidtestPlanExecutionFinished(org.junit.platform.launcher.TestPlan testPlan)
-
-
-
Field Detail
-
REPORT_ENTRY_KEY
public static final java.lang.String REPORT_ENTRY_KEY
- See Also:
- Constant Field Values
-
TIME_REPORT_KEY
public static final java.lang.String TIME_REPORT_KEY
- See Also:
- Constant Field Values
-
active
private final boolean active
This listener will be active as soon as Pioneer is on the class/module path, regardless of whether@Issueis actually used. To prevent superfluous computation and memory use, we "deactivate" this listener if it is not needed. That's the case when we detect noIssueProcessor- presumably nobody uses this extension then.
-
testCases
private final java.util.concurrent.ConcurrentMap<java.lang.String,IssueTestCaseBuilder> testCases
-
-
Method Detail
-
reportingEntryPublished
public void reportingEntryPublished(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.reporting.ReportEntry entry)- Specified by:
reportingEntryPublishedin interfaceorg.junit.platform.launcher.TestExecutionListener
-
executionFinished
public void executionFinished(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.TestExecutionResult testExecutionResult)- Specified by:
executionFinishedin interfaceorg.junit.platform.launcher.TestExecutionListener
-
testPlanExecutionFinished
public void testPlanExecutionFinished(org.junit.platform.launcher.TestPlan testPlan)
- Specified by:
testPlanExecutionFinishedin interfaceorg.junit.platform.launcher.TestExecutionListener
-
createIssueTestSuites
java.util.List<IssueTestSuite> createIssueTestSuites()
-
getIssueTestCases
private java.util.List<IssueTestCase> getIssueTestCases(IssueTestCaseBuilder builder)
-
mergeIssueTestCases
private java.util.List<IssueTestCase> mergeIssueTestCases(java.util.List<IssueTestCase> first, java.util.List<IssueTestCase> second)
-
-