Registry / testing / test-results-parser

test-results-parser

JSON →
library0.6.1pypypi✓ verified 85d ago

The `test-results-parser` Python library provides functionalities to parse test result files, primarily JUnit XML. It offers two main parsing functions: `parse_junit_xml` for JUnit XML files and `parse_raw_upload` for raw test result uploads. This library is largely written in Rust with Python bindings, focusing on efficient test result processing for integration with platforms like Codecov. The current version is 0.6.1, and its release cadence appears irregular.

pip install test-results-parser
INSTALL
IMPORT
SIG · TEST-RESULTS-PARSE
T
test-results-parser
testingpythonv0.6.1
Install
1.7s avg
Import
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 21.3MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.7s · import 0.000s · 21MB
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse_junit_xml
from test_results_parser import parse_junit_xml
import testing_result_parsers
Testrun
from test_results_parser import Testrun
import testing_result_parsers
Framework
from test_results_parser import Framework
import testing_result_parsers

This quickstart demonstrates how to parse a JUnit XML file using `testing_result_parsers.parse_junit_xml`. It creates a dummy XML file, parses it, and then prints the name, outcome, and duration of each test run. The `parse_junit_xml` function returns a list of `Testrun` objects.

import testing_result_parsers import os # Create a dummy JUnit XML file for demonstration dummy_junit_xml_content = ''' <testsuites> <testsuite name="my_suite" tests="2" failures="1" errors="0" skipped="0" time="1.5"> <testcase classname="my_module.my_class" name="test_success" time="1.0" /> <testcase classname="my_module.my_class" name="test_failure" time="0.5"> <failure message="Assertion failed: 1 != 2">Traceback details...</failure> </testcase> </testsuite> </testsuites> ''' file_path = "dummy_junit.xml" with open(file_path, "w") as f: f.write(dummy_junit_xml_content) # Parse the JUnit XML file test_runs = testing_result_parsers.parse_junit_xml(file_path) for run in test_runs: print(f"Test Name: {run.name}, Outcome: {run.outcome}, Duration: {run.duration}") # Clean up the dummy file os.remove(file_path)
Debug
Known issues
gotchaThe PyPI package `test-results-parser` imports as `testing_result_parsers`. Using `import test_results_parser` will result in an `ModuleNotFoundError`.
fix
Always use `import testing_result_parsers` after installation.
affects: All versions
gotchaThis library is primarily designed to parse JUnit XML files and raw test result uploads for Codecov. While it offers parsing capabilities, it's not a generic test result manipulation library like `junitparser` which supports creation and merging of XMLs.
fix
Understand the specific scope of this library; if advanced JUnit XML manipulation (e.g., creating, merging, custom elements) is needed, consider `junitparser`.
affects: All versions
gotchaAs a Rust-backed Python library, development setup (e.g., for contributors) requires `maturin` and a Rust toolchain.
fix
For development, install `maturin` (`pip install maturin`) and a Rust toolchain, then use `maturin develop`.
affects: All versions
Upgrade
Version history
0.6.1latest on PyPI · released Nov 17, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
27 hits · last 30 days
node
22
OpenAI (training)
2
Resources
test-results-parser — pip install test-results-parser · libregistry