-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Reduce memory usage of junitxml #3328
Comments
GitMate.io thinks possibly related issues are #1521 (High memory usage if tests called by test case name), #2968 (Memory usage in 3.3.0), #1074 (Discard in memory XML representation after done with a node (junitxml)), #126 (junitxml doesnt escape everything), and #466 (IOError when writing --junitxml report). |
I think this might add quite some complexity. The xunit2 spec typically adds attributes to some of the top levels elements, containing for example the number of tests that failed. If we were to stream the report to disk we would not be able to add those values beforehand, as my understanding is that each of those fragments gets generated at the end of each test. Thus we might have to write just the content, then construct the headers, and read/write the content back in the middle. This looks like more disk IO than is potentially worth and might slow down the entire run. Does that make sense or am I missing something? |
Good point @BenjaminSchubert. Since it has been a awhile this was created, nobody has demonstrated interest in working on this, and I suspect this is less of an issue nowadays, I think we can close this and revisit if needed. 👍 |
From #3323 (comment):
This is one idea, but this might produce an invalid junitxml if pytest can't finish for some reason and ends up not writing the end tag on the XML. An alternative might be writing to a temporary file and only moving it to the final location when the XML is complete, or just bite the bullet and let other tools fail to parse the XML file.
The text was updated successfully, but these errors were encountered: