analyze_test_results
Analyze JUnit XML or CSV test results to identify flaky, ever-failing, never-run, and slowest tests. Returns structured health metrics for multiple runs.
Instructions
Deterministic test-results health metrics (flaky / ever-failing / never-run / slowest / failure clustering) from real test execution data — no LLM anywhere in this call path; write your own narrative from the returned numbers. Provide exactly one of junit_xml or csv_text. junit_xml is normally one JUnit XML report string for one run (accepts both a and a bare root); to analyze flakiness across MULTIPLE runs in one call, pass a JSON array of {"run_id": "...", "xml": "..."} objects instead — either as a genuine JSON array/list argument, or as a string starting with "[" (some MCP clients stringify array arguments; both forms are accepted). csv_text columns: required name/classname/status (passed|failed|error|skipped), optional run_id/duration_s/message. reference_tests, if given, is a list of test identities ("classname::name") expected to have run — any absent from the results are reported under never_run. Flaky = pass_rate strictly between flaky_min and flaky_max with at least 3 executions; fewer executions is reported as insufficient data, not flaky. Malformed/oversized input never raises — it returns a structured {"error": "invalid_argument", ...}. Returns the full ResultsAnalysis as JSON (runs, total_tests, executions, overall_pass_rate, flaky, ever_failing, never_run, slowest, failure_clusters, per_run, warnings).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv_text | No | ||
| flaky_max | No | ||
| flaky_min | No | ||
| junit_xml | No | ||
| reference_tests | No |