--- id: junit-xml version: "1.9" license: MIT license_treatment: permissive maintenance: dormant --- # junit-xml — Creates JUnit XML test result documents that can be read by tools such as Jenkins License: permissive · Maintenance: dormant · Downloads: 12.8M/mo ## What it is and what it does junit-xml is a Python library that serializes test results into JUnit XML format, the de facto standard for test reporting in CI/CD platforms like Jenkins and Bamboo. It provides TestSuite and TestCase classes that you populate with test metadata (name, class, duration, stdout, stderr) and then export to XML via to_xml_string() or to_file()—the library handles formatting, pretty-printing, and automatic stripping of illegal XML characters. The package is a thin, focused tool: it does not run tests or integrate with test frameworks directly, but rather accepts test result data and produces the XML that CI systems consume to generate dashboards and reports. It has one runtime dependency (six) and installs with low friction. While maintenance is dormant (last release 2020-02-22), the package is marked Production/Stable and widely deployed. Use it for: - Export test results from a custom Python test runner to Jenkins for visualization and trend tracking. - Generate JUnit XML from test runs to feed into Bamboo CI pipelines. - Produce machine-readable test reports from a Python test suite for integration with CI/CD systems. - Batch-convert test results from multiple Python test tools into a standardized format for aggregated reporting. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates JUnit XML test result documents compatible with Jenkins and Bamboo, allowing Python test suites to produce machine-readable reports for CI/CD systems. Yes, if you need to export Python test results to Jenkins, Bamboo, or any CI system that consumes JUnit XML. The package is stable, permissively licensed, and has minimal dependencies. Be aware that maintenance is dormant; if your CI platform changes its XML schema expectations, you may need to fork or patch the library yourself. For standard use cases, it remains a reliable choice. ## Install pip install junit-xml uv add junit-xml poetry add junit-xml ## Installing junit-xml Before you install: Low install friction with a single lightweight dependency (six). Maintenance is dormant—last release was 2020-02-22 and no commits since 2023-12-20—but the package is marked Production/Stable and has accumulated substantial adoption. License in practice: MIT license (permissive) imposes no restrictions on use, modification, or distribution in proprietary or open-source projects. Quickstart: pip install junit-xml from junit_xml import TestSuite, TestCase test_cases = [TestCase('Test1', 'some.class.name', 123.345, 'stdout', 'stderr')] ts = TestSuite("my suite", test_cases) print(TestSuite.to_xml_string([ts])) Verify before relying: - Whether dormant maintenance status poses a risk if Jenkins or Bamboo XML schema requirements change. - Current compatibility with modern Python versions beyond what classifiers declare. - Whether the package remains compatible with current versions of Jenkins and Bamboo. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 12.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags junit xml test reports, jenkins test result xml, python test reporting, bamboo xml output, ci test result format, test suite xml generation, ci-cd-integration, test-reporting [View on SkillFed](https://skillfed.io/packages/junit-xml) · [View on PyPI](https://pypi.org/project/junit-xml/)