-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SUREFIRE-2219] Add test stdErr/stdOut output to ReportTestCase #692
base: master
Are you sure you want to change the base?
Conversation
Thanks, I will look into this shortly. I also need to put other PRs into consider because of memory consumption, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At current glance looks totally reasonable. Kudos for the first time. Le me check the other open PRs which might intervene here.
Are we talking about memory consumption here or in the other PRs? What are you concerned about? The XML parser uses SAX, not a DOM. Of course, the console log contents need to be stored in
|
6d59ba1
to
3e3b26a
Compare
TestSuiteXmlParser no longer ignores the 'system-out' and 'system-err' tags from the Surefire report XML. It parses them and sets the corresponding properties in ReportTestCase.
3e3b26a
to
b357d55
Compare
@michael-o, FYI: I rebased on the latest changes, resolving a merge conflict, and also used |
@kriegaex thanks, will try to review asap. Corona has knocked me out. |
@michael-o, I wish you a swift recovery. Take good care of yourself. |
Thanks for this feature @kriegaex ! |
@acouvreur, actually I am just the user having opened SUREFIRE-2219, not the developer implementing it. Back then, I just had 45 minutes to investigate and do some back-end leg work to hopefully expedite the implementation, handing this off to any committers who feel up for the task and are way more competent regarding content generation via the sink API than I will ever be. I am afraid, I might just create a mess and cleaning it up might take more effort than someone else doing it right. |
case "system-err": | ||
currentElement = new StringBuilder(); | ||
parseContent = true; | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incomplete/imprecise. Look at the schema: https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd. Testcase can have stdout/stderr, but also reruns and flakes. We should basically overwrite in that case. We need a way to make sure that these are direct descendants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My PR ist half a year old. I created it, because you asked me to. It is meant to be something you can commit on top of and refine. "Allow edits by maintainers" is active for this PR. Please do so.
Currently, my personal situation does not permit me to spend time on it, because on top of being busy with work I am in the process of relocating to another continent and was also thrown back by a recent stay in hospital after an accident, which cost me extra time. This is not an excuse, just an explanation. I am still interested in getting this issue resolved, only the time window to further collaborate on it has closed for now.
FYI, I switched this draft PR to "ready for review", so it can be merged after someone will have committed review findings on top of it. |
Sure, don't worry. Just wanted to point out that this is incomplete. |
TestSuiteXmlParser
no longer ignores thesystem-out
andsystem-err
tags from the Surefire report XML. It parses them and sets the corresponding properties inReportTestCase
.@michael-o, this is a bare PR for the back-end. It contains no tests and no changes to
SurefireReportRenderer::constructTestCaseSection
. I leave these up to you. But now you have the raw data to work from. Sorry, I do not have more time than this. Hope it helps a bit anyway. You can just commit on top of this draft PR.To do:
ReportTestCase
, representingSystem.out
andSystem.err
outputsI hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.