JUnit XML Parser Test Report to JSON Failures API
Free tier included · ToolsCI already writes your test results — as JUnit/Ant XML, a format nobody wants to parse by hand. This API turns that XML into flat, predictable JSON: totals (tests, failures, errors, skipped, time_sec), per-suite stats, and every test case with its status (passed / failed / error / skipped) and failure message. `POST /failures` skips straight to what broke, returning only failed and errored cases with suite, case name and message.
Who needs it: teams building CI dashboards that need a compact summary instead of a 12 MB artifact; alerting pipelines that want the broken cases only; LLM and agent workflows that need a token-cheap description of a test run; and anyone scripting across pytest, Maven/Surefire, PHPUnit, Jest or JUnit 5 output with one client instead of four parsers.
Why this one: it is format-aware, not a generic XML tool — it understands `<testsuites>`/`<testsuite>`, walks nested suites (PHPUnit, Jest per-file, JUnit 5) and reports each suite's `path`, tolerates namespace prefixes by matching local names, takes the worst result when a case has several (error > failure > skipped), and does not fail a case for Surefire flaky/rerun elements. Parsing uses defusedxml: no entities, no DTD fetch, no external calls, nothing stored.
Honest limits: case counts are computed from `<testcase>` elements, not from suite attributes; suite time is the sum of case times; XML is capped at 10 MB; the root must be `<testsuites>` or `<testsuite>`.
Endpoints
| Method | Path | What it does |
|---|---|---|
POST | /parse | Parse a JUnit/Ant XML report into totals, per-suite stats and per-case status with messages. |
POST | /failures | Return only failed and errored cases — suite, case name and message — as a ready-made list of what broke. |
Quick start
curl -X POST "https://junitxml.p.rapidapi.com/parse" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: junitxml.p.rapidapi.com" \
-H "Content-Type: application/json" \
-d '{"xml":"<testsuites name=\"pytest\"><testsuite name=\"pytest\" tests=\"2\" failures=\"1\" errors=\"0\" skipped=\"0\" time=\"0.123\"><testcase name=\"test_ok\" classname=\"tests.test_a\" time=\"0.010\"/><testcase name=\"test_bad\" classname=\"tests.test_a\" time=\"0.020\"><failure message=\"assert 1 == 2\">assert 1 == 2</failure></testcase></testsuite></testsuites>"}'
FAQ
What is the request limit?
One POST carries one report of up to 10 MB of XML, which covers very large monorepo runs. Monthly quotas are 1 000 / 20 000 / 200 000 requests, with hourly caps of 1 000 / 5 000 / 20 000.
Is my test data stored or sent anywhere?
No. Parsing happens offline in-process with defusedxml — no entities are expanded, no DTD is fetched, no external services are called, and nothing is written to disk or to a database. The response is built and the XML is discarded.
Can I trust the counts?
They are computed from the actual `<testcase>` elements, not copied from suite attributes, so a report whose attributes disagree with its content still yields correct case-level counts. Suite time is the sum of case times, which can differ slightly from a suite's own `time` attribute.
Can I batch several reports in one call?
No — one report per request. Batch by looping client-side; the endpoint is fast enough for per-job calls in a CI pipeline. `<testsuites>` with many nested suites is handled in a single request.
Try JUnit XML Parser Test Report to JSON Failures free
Free tier on every plan. Get an API key and start calling in under a minute.
Open on RapidAPI