# JUnit report viewer

- Human page: https://happytails.ai/en/developer-tools/junit-report-viewer/
- Markdown: https://happytails.ai/en/developer-tools/junit-report-viewer.md
- Structured JSON: https://happytails.ai/agents/en/developer-tools/junit-report-viewer/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `junit-report-viewer` |
| Category | developer-tools |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Use the visible action or interactive controls. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Runs in your browser in a background worker. Reads JUnit and xunit.net v2 XML up to 2,000,000 characters and 200,000 test cases.

### Inputs and settings

Text input: JUnit or xUnit XML report.

Example or placeholder shown in the interface (not a validated fixture):

```text
<testsuites><testsuite name="CartTest">...</testsuite></testsuites>
```

Paste the XML your test runner wrote, for example TEST-*.xml from Surefire or junit.xml from pytest. Up to 2,000,000 characters. Review the settings before running.

| Setting | Meaning | Control type | Default | Constraints |
| --- | --- | --- | --- | --- |
| `show` | Show test cases | select | "all" | Allowed: all, problems, failures, skipped |
| `sort` | Order | select | "input" | Allowed: input, slowest, status, name |
| `slowestCount` | Slowest tests to list | number | "10" | min=1 max=1000 step=1 |
| `includeDetails` | Include failure details in the JSON report | checkbox | false |  |

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Up to 2,000,000 characters and 200,000 test cases per report. Processing runs locally in a background worker in your browser. Downloads: a JSON report and a CSV of test cases.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "junit-report-viewer",
  "category": "developer-tools",
  "built": true,
  "requirements": "Up to 2,000,000 characters and 200,000 test cases per report. Processing runs locally in a background worker in your browser. Downloads: a JSON report and a CSV of test cases.",
  "implementation": {
    "fields": [
      {
        "key": "show",
        "label": "Show test cases",
        "value": "all",
        "type": "select",
        "values": [
          "all",
          "problems",
          "failures",
          "skipped"
        ],
        "labels": {
          "all": "All test cases",
          "problems": "Failures and errors",
          "failures": "Failures only",
          "skipped": "Skipped tests"
        }
      },
      {
        "key": "sort",
        "label": "Order",
        "value": "input",
        "type": "select",
        "values": [
          "input",
          "slowest",
          "status",
          "name"
        ],
        "labels": {
          "input": "Report order",
          "slowest": "Slowest first",
          "status": "Test status",
          "name": "Test name"
        }
      },
      {
        "key": "slowestCount",
        "label": "Slowest tests to list",
        "value": "10",
        "type": "number",
        "min": 1,
        "max": 1000,
        "step": 1
      },
      {
        "key": "includeDetails",
        "label": "Include failure details in the JSON report",
        "value": false,
        "type": "checkbox"
      }
    ],
    "registrationFamily": "report-ingest-analysis-reference",
    "inputMaxLength": 2000000,
    "inputErrorCode": "REPORT_INGEST_ANALYSIS_REFERENCE_TOO_LONG",
    "note": "Runs in your browser in a background worker. Reads JUnit and xunit.net v2 XML up to 2,000,000 characters and 200,000 test cases.",
    "experience": {
      "automatic": false,
      "single": false,
      "inputMaxLength": 2000000,
      "inputMode": "text",
      "label": "JUnit or xUnit XML report",
      "placeholder": "<testsuites><testsuite name=\"CartTest\">...</testsuite></testsuites>",
      "help": "Paste the XML your test runner wrote, for example TEST-*.xml from Surefire or junit.xml from pytest. Up to 2,000,000 characters. Review the settings before running.",
      "action": null
    },
    "mode": "explicit",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Open a JUnit or xUnit XML test report and see failures, errors, skipped tests and the slowest tests at a glance. Download the totals as JSON and every test case as CSV.

### How to use JUnit report viewer

1. Paste a JUnit or xUnit XML report, or open the file.
2. Choose which test cases to show and how to order them.
3. Run the analysis and review totals, suites and the slowest tests.
4. Download the JSON report or the CSV of test cases.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

## Useful next steps

- [XML validator](https://happytails.ai/en/developer-tools/xml-validator/) ([Markdown](https://happytails.ai/en/developer-tools/xml-validator.md))

- [XML formatter](https://happytails.ai/en/developer-tools/xml-formatter/) ([Markdown](https://happytails.ai/en/developer-tools/xml-formatter.md))

- [XML to CSV](https://happytails.ai/en/data-tools/xml-to-csv/) ([Markdown](https://happytails.ai/en/data-tools/xml-to-csv.md))

## What it reads

The viewer reads JUnit style XML from Maven Surefire, Gradle, pytest, jest-junit and similar runners, including nested testsuite elements and Surefire rerun elements, plus xunit.net v2 XML. Each test case gets one status: error, failed, skipped or passed, in that order of priority.

### How totals are counted

Totals are counted from the test cases themselves, not from the tests and failures attributes on the suite, because those attributes are sometimes stale. The pass rate leaves skipped tests out. Times that are not plain decimal seconds are counted as invalid and left out of the total time.

### Limits

Reports declaring custom XML entities are rejected. Very large system-out blocks count toward the character limit. The tool does not run tests; it only reads the report you supply.
