Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
After the previous refactoring of surefire-junit3, we should continue with updating the abstraction in order to complete SUREFIRE-1860. The changes in SUREFIRE-1860 are big and therefore I would like to split them to an abstraction in PR, continue with another PRs regarding implementation of encoder/decoder, SimpleReportEntry. It would give us the opportunity to associate the std/out/err logs with test run id (Thread) and deterministically create the reports. This way we will fix pending issues (a problem with parallel logs in junit5 tests, and simplify the listeners in surefire-junit47 provider) in the future. So I am going to split the work in several Jiras.
The method writeTestOutput( String output, boolean newLine, boolean stdout ) appeared in ForkingRunListener and TestSetRunListener and it is called by ConsoleOutputCapture. The signature of this method will be changed.
The provider listeners can be stateful but the ForkingRunListener must be stateless.
The meta information (testRunId and Thread) will be associated with the particular run of the test method in the implementation of provider's RunListener. So the listener should have this meta information and the ForkingRunListener should not have it. We will implement enum RunMode, testRunId:long, TestOutputReportEntry and we will introduce a new interface TestReportListener. Method signatures will be changed to TestOutputReceiver#writeTestOutput(TestOutputReportEntry) and EventChannelEncoder#testOutput(TestOutputReportEntry). We will remove ConsoleStream interface and ConsoleLogger will be used instead. Any combinations of two interfaces out of three (RunListener, TestOutputReceiver, ConsoleLogger) are avoided and the only TestReportListener will be used. Simplified code around logger in JUnitCoreProvider. We will rename a creator method createReporter() in ReporterFactory.
Attachments
Issue Links
- is a child of
-
SUREFIRE-1860 extend ReportEntry interface and SimpleReportEntry with mandatory properties runMode:String, testRunId:long
- Closed
- links to