xunitparser
Read JUnit/XUnit XML files and map them to Python objects
What it is and what it does
xunitparser is a minimal XML parser that reads JUnit/XUnit test result files and converts them into Python objects mirroring the standard unittest module's structure. It returns a TestSuite object containing TestCase objects and a TestResult object, letting you programmatically inspect test outcomes, class names, method names, and pass/fail/skip status.
The package has no runtime dependencies and installs cleanly, but it is no longer maintained. It was last released in February 2022 and has not been updated since. If you need to parse JUnit XML in a legacy codebase or as a one-time integration task, it will likely work; if you need active support or compatibility with the latest Python versions, you should evaluate alternatives or plan to maintain a fork.
Use it for:
- Parse JUnit XML output from CI/CD pipelines to programmatically analyze test results in Python.
- Extract test metadata (class name, method name, pass/fail status) from XML reports for custom reporting or filtering.
- Integrate legacy test result files into a Python-based test analysis or aggregation tool.
- Inspect test suite structure and outcomes without writing custom XML parsing logic.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses JUnit/XUnit XML test result files and maps them to Python objects compatible with the standard unittest module.
Yes, if you need to parse JUnit XML in a stable, legacy codebase and can accept that the package is no longer maintained. The low install friction and lack of dependencies make it a lightweight choice. No, if you require active maintenance, support for the latest Python versions, or expect to need bug fixes or feature updates. Consider alternatives if you are starting a new project.
Install
xunitparser on PyPI
pip
pip install xunitparseruv
uv add xunitparserpoetry
poetry add xunitparserInstalling xunitparser
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned—last release was 1633 days ago—so expect no maintenance, bug fixes, or support for newer Python versions beyond those already declared.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute it freely with minimal restrictions.
Quickstart
import xunitparser
ts, tr = xunitparser.parse(open('/path/to/unit.xml'))
for tc in ts:
print(tc.classname, tc.methodname, 'passed' if tc.good else 'failed')
Verify before relying
- Whether the package works reliably with Python versions beyond 3.10 or with modern test frameworks.
- Whether the XML parsing handles all JUnit/XUnit dialect variations in real-world use.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,633 days since the last release |
| First released | |
| Downloads | 113,318/month — #12,345 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: xunitparser-1.3.4-py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
junitparserParse, create, and manipulate JUnit/xUnit test…
permissive · top 5,000 on PyPI
testtoolstesttools extends Python's standard unittest…
permissive · top 5,000 on PyPI
unittest-xml-reportingA unittest test runner that exports test…
permissive · top 5,000 on PyPI
xmlunittestExtends Python's unittest framework to compare…
permissive · top 5,000 on PyPI
junit-xmlGenerates JUnit XML test result documents…
permissive · top 5,000 on PyPI
junit2htmlConverts JUnit or XUnit XML test result files…
permissive · top 5,000 on PyPI
xmlrunnerA unittest test runner that exports test…
copyleft · top 15,000 on PyPI
junit-xml-2Generates JUnit XML test result reports from…
permissive · top 15,000 on PyPI
flake8-formatter-junit-xmlFormats flake8 linting output as JUnit XML,…
permissive · top 15,000 on PyPI
python-subunitSubunit is a streaming protocol library for…
permissive · top 5,000 on PyPI