junit-xml output attribute can be too big to handle with -vv #12223
Labels
plugin: junitxml
related to the junitxml builtin plugin
type: performance
performance or memory problem/improvement
Suppose you have a test that may fail with a very large diff; say:
With normal verbosity (0), the junit-xml output would look like this:
noting the
<failure message='...'>
tag's message and body both have aUse -v to get more diff
.If you do supply a
-vv
, then both the body of the<failure>
tag, AND the content of themessage
attribute can be very large. The latter can be problematic for parsers, and projects like BeautifulSoup and lxml will fail to parse this correctly (truncating or crashing, respectively).Maybe this is a limitation of the junit schema, but is there anything acceptable that can be done to reduce only the content of the message attribute? I think it's more expected and "fine" for the body of a tag to be really long, but an attribute less so.
applies to pytest 8.1.1
The text was updated successfully, but these errors were encountered: