Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pytest reporting in JUnit XML format

  • e.g. for Jenkins integration
  • See usage
pytest --junitxml report.xml

{% embed include file="src/examples/pytest/reporting/report.xml)

To make the XML more himan-readable:

cat report.xml | python -c 'import sys;import xml.dom.minidom;s=sys.stdin.read();print(xml.dom.minidom.parseString(s).toprettyxml())'