xmlrunner
PyUnit-based test runner with JUnit like XML reporting.
What it is and what it does
xmlrunner is a custom test runner for Python's unittest framework that captures test results and writes them to XML files in a format understood by continuous integration servers, build systems, and IDEs. Instead of printing test output to the console, it generates structured XML reports that downstream tools can parse and display.
The package provides XMLTestRunner as a drop-in replacement for unittest's standard TextTestRunner, plus a Django integration hook. It has no runtime dependencies and works by wrapping the unittest framework. However, the project has been dormant since 2014, with the last release over a decade ago—while the repository is not archived, active maintenance is minimal.
Use it for:
- Export unittest results to XML for Jenkins, GitLab CI, or other CI systems that consume JUnit-format reports.
- Generate test reports in a format that IDEs and test dashboards can parse and visualize.
- Integrate test reporting into Django projects by setting TEST_RUNNER in settings.py.
- Capture test metadata (pass/fail/skip status, timing, descriptions) in structured XML for post-processing.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A unittest test runner that exports test results to XML files compatible with CI systems, IDEs, and build tools.
Yes, with conditions. The package is stable and has no known vulnerabilities, making it suitable for existing projects already using it or for simple unittest-to-XML conversion needs. However, install friction is high (source-only distribution), and dormancy since 2014 means no support for modern Python or CI ecosystem changes. If you need active maintenance or compatibility with recent tooling, consider alternatives like pytest with junit-xml plugin or modern CI-native reporting.
Install
xmlrunner on PyPI
pip
pip install xmlrunneruv
uv add xmlrunnerpoetry
poetry add xmlrunnerInstalling xmlrunner
Before you install
High install friction due to source distribution only. Package is dormant—last release was 2014-11-10, over a decade ago, with no commits since 2024-03-07. Maintenance is minimal; consider whether you need active support.
License in practice
Licensed under LGPL (copyleft). You must disclose source code modifications and make them available under the same license if you distribute the package or derivative works.
Quickstart
pip install xmlrunner
import unittest
import xmlrunner
if __name__ == '__main__':
unittest.main(testRunner=xmlrunner.XMLTestRunner(output='test-reports'))
Verify before relying
- Whether the package works reliably with modern Python versions (3.10+) despite no recent releases.
- Whether XML output format remains compatible with current CI/IDE standards.
- Whether the Django integration (XMLTestRunner in settings.py) still functions with current Django versions.
Package facts
| License | LGPL (copyleft) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | dormant — 4,295 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 287,894/month — #8,022 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: xmlrunner-1.7.7.tar.gz
Keywords: pyunit, unittest, junit xml, report, testrunner
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
html-testRunnerA unittest test runner that generates…
permissive · top 15,000 on PyPI
unittest-xml-reportingA unittest test runner that exports test…
permissive · top 5,000 on PyPI
junit-xml-2Generates JUnit XML test result reports from…
permissive · top 15,000 on PyPI
stestrstestr is a parallel test runner for Python…
permissive · top 15,000 on PyPI
xunitparserParses JUnit/XUnit XML test result files and…
permissive · top 15,000 on PyPI
teamcity-messagesSends test results and build status from Python…
permissive · top 15,000 on PyPI
colour-runnerAdds colored output to Python's unittest test…
permissive · top 15,000 on PyPI
junitparserParse, create, and manipulate JUnit/xUnit test…
permissive · top 5,000 on PyPI
nosenose extends unittest with automatic test…
copyleft · top 5,000 on PyPI
junit-xmlGenerates JUnit XML test result documents…
permissive · top 5,000 on PyPI