JUnitWriter does not emit <system-out> / <system-err> at all. A test's MessageLog is dropped from the JUnit report, even though the format has a place for exactly this output.
Proposal
Map the two process-stream channels of Messenger onto the JUnit elements, per <testcase>:
Messenger::CHANNEL_STDOUT -> <system-out>
Messenger::CHANNEL_STDERR -> <system-err>
Both are plain text elements (CDATA, no attributes), one of each per testcase. Messages of a channel are concatenated in recorded order. A testcase with no messages in a channel gets no element.
Other channels (output, plugin channels) are not written: JUnit has no slot for them, and the terminal renderer already shows them.
Why
Anything a test or a plugin reports as stderr should reach CI. The first consumer is the error-handler plugin (#73, #262): captured PHP errors of a passing test are logged to the stderr channel, so they show up in Jenkins / GitLab / TeamCity test details without inventing a non-standard <warning> element.
Notes
Status::Risky and failures keep their <error> / <failure> encoding; this is additive.
- Suite-level
<system-out> / <system-err> are out of scope.
JUnitWriterdoes not emit<system-out>/<system-err>at all. A test'sMessageLogis dropped from the JUnit report, even though the format has a place for exactly this output.Proposal
Map the two process-stream channels of
Messengeronto the JUnit elements, per<testcase>:Messenger::CHANNEL_STDOUT-><system-out>Messenger::CHANNEL_STDERR-><system-err>Both are plain text elements (CDATA, no attributes), one of each per testcase. Messages of a channel are concatenated in recorded order. A testcase with no messages in a channel gets no element.
Other channels (
output, plugin channels) are not written: JUnit has no slot for them, and the terminal renderer already shows them.Why
Anything a test or a plugin reports as stderr should reach CI. The first consumer is the error-handler plugin (#73, #262): captured PHP errors of a passing test are logged to the
stderrchannel, so they show up in Jenkins / GitLab / TeamCity test details without inventing a non-standard<warning>element.Notes
Status::Riskyand failures keep their<error>/<failure>encoding; this is additive.<system-out>/<system-err>are out of scope.