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
The entirety of JUnit XML files is skipped if they are minified #1132
Comments
can you post sample XML file so someone can reproduce the issue?
|
Sure, @srinivasupadhya, something like this: <?xml version="1.0" encoding="utf-8"?><testsuite errors="0" failures="0" name="pytest" skips="0" tests="2" time="0.001"><testcase classname="test.test_api_app" name="test_get_context_from_headers_generic[header_dict0-expected_diff0]" time="0.003357410430908203"/><testcase classname="test.test_api_app" name="test_get_context_from_headers_generic[header_dict1-expected_diff1]" time="0.00024437904357910156"/></testsuite> |
Instead of ignoring the first line of a report if it contains "<?xml", replace the prolog pattern[1] in the first line with an empty string. If the processed first line is empty, ignore it. See GitHub Issue gocd#1132 [1]: http://www.w3.org/TR/REC-xml/#NT-prolog
Instead of ignoring the first line of a report if it contains "<?xml", replace the prolog pattern[1] in the first line with an empty string. If the processed first line is empty, ignore it. See GitHub Issue gocd#1132 [1]: http://www.w3.org/TR/REC-xml/#NT-prolog
@rajiesh - reopening for you to look at |
…eport Revert "The entirety of JUnit XML files is skipped if they are minified (#1132)"
The entirety of JUnit XML files is skipped if they are minified (#1132)
verified it on 15.3.0-2753(7aa885f) and is working as expected. |
Yay 🎉 |
Reverting all changes related to #1132 as this is breaking multiple things
Re-opening again. Causes issues with big (say 12MB) XML files.
|
I have the same problem with go-server 16.6.0-3590, for the very same case. The issue is still there.
The xml file is generated by py-test, and is one single line indeed. After running @underyx solution with |
I'm seeing this with 16.7.0 (3819-b0b9921bdea58101121cc181d697355177d2f197)
Contents of the XML
Error in GoCD
|
Echoing @darioblanco - adding xmllint works for the job but not at the stage level |
and seeing the same problem with 17.10.0, running the xml file through |
Closing as dup of #983 |
I'm using py.test and its built-in JUnit XML generator to make reports of my tests. Go.cd always fails to display any of the contents, logging this:
Now, bear with me here, cause I have zero knowledge of Java, but skimming through the source I think the issue is that the py.test JUnit files have no newlines in them, so this line skips the complete file, with its 200 test cases.
If that's not the problem, please let me know and I'll edit the title of this issue.Edit: I tried reformatting the same XML file and it works now. This means that there's a workaround:Workaround
xmllib2-utils
package on your agentsjunit.min.xml
instead ofjunit.xml
The text was updated successfully, but these errors were encountered: