skillfed

xunitparser

Read JUnit/XUnit XML files and map them to Python objects

xunitparser v1.3.4 113.3K downloads/30d#12,345 on PyPI
Permissive license Abandoned released

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 xunitparser

uv

uv add xunitparser

poetry

poetry add xunitparser

Installing 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

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Testing

Tags

junit xml parserxunit test resultsparse junit xmltest result xml parsingunittest xml integration
junit-xmltest-parsingunmaintained

More Testing packages