Closed reinfi closed 2 months ago
Does junit support any kind of metadata? I'd rather keep those in the xml if possible. There are also other places with similar output.
Does junit support any kind of metadata? I'd rather keep those in the xml if possible. There are also other places with similar output.
Will check if JUnit does support that, but would require a complete rework as there would be no single point of writing the xml.
I'm quite unsure about all the other lines. If they are just informal output I would need to suppress them all. May be I should add a different printMethod and change the other one that they does not output anything with format 'junit'. That would keep the code much cleaner.
https://github.com/testmoapp/junitxml
There are some sort of properties that can be defined but that would need to be defined at any testsuite. Also the information from the output would need to be transfered to the JUnit-Formatter.
And the known JUnit-Parser does not display them properly. So if it fine for you I would skip that part for displaying these informal content.
Another, but different idea, would be that we add an output-file as option where the xml would be stored. Then the normal output could also happen but the xml would only be in that file.
I'll think about it, but if we decide not to print things in Initializer for junit, I'd rather make Printer an interface and just pass VoidPrinter to Initializer in that case.
PHPStan deals with the same issue by using STDERR for informatory message and STDOUT for the regular "formatter output". This seems like a best solution to me.
Fixed in 1.5.3
Bugfix patch for my junit formatter.
Finally found time to test it with CI/CD and found one issue:
The first line breaks the valid xml and I would have to remove it by script.