[TIP] invalid xml characters in junit output with pytest

Pella,Chris Chris.Pella at safenet-inc.com
Mon Feb 25 08:01:02 PST 2013

We have a problem with a test we are running in Jenkins. We are wrapping a binary executable with pexpect as part of a test suite. When a failure occurs it looks like there are some escape characters e.g. 0x1b that are captured in the junit xml output:

org.xml.sax.SAXParseException<http://stacktrace.jenkins-ci.org/search?query=org.xml.sax.SAXParseException>: An invalid XML character (Unicode: 0x1b) was found in the element content of the document.
Consequently, Jenkins doesn't print the results for the test. I tried writing a python script to filter out the invalid xml but it doesn't seem to get executed before the Jenkins junit reporting executes.
Is there a way to tell the pytest junit plugin to filter these characters?


The information contained in this electronic mail transmission 
may be privileged and confidential, and therefore, protected 
from disclosure. If you have received this communication in 
error, please notify us immediately by replying to this 
message and deleting it from your computer without copying 
or disclosing it.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20130225/47492880/attachment.htm>

More information about the testing-in-python mailing list