skillfed

xmlrunner

PyUnit-based test runner with JUnit like XML reporting.

xmlrunner v1.7.7 287.9K downloads/30d#8,022 on PyPI3
Copyleft license LGPL DORMANT released

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 xmlrunner

uv

uv add xmlrunner

poetry

poetry add xmlrunner

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)Natural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Testing

Tags

unittest xml reportingjunit xml test runnerpython test xml outputci test report generationxmltestrunner
test-reportingjunit-xmlci-integration

More Python Modules packages