Aggregate Test Runs
aggregateTestRunsAggregate test-run counts; groupBy outcome | runType | configId | catalogueTestId | phoneNumber; optional timeBucket day/week/month with UTC ISO8601 bucket keys ("2026-05-12" day, "2026-W19" week, "2026-05" month). Use cases: "% pass/fail this week", "which compliance test fails most", "day-by-day pass count last 2 weeks". ALWAYS use this for "how many", "what share" and "which fails most": counting by paging through listTestRuns gives wrong totals. Filters: runType (mission | compliance | param | load; load = the individual calls load tests made, which are never counted as param), outcome, phoneNumber, configId, catalogueTestId, startedAfter/startedBefore. configId matches the runs of one saved test, standard or mission; there is NO configName filter here, so to count the runs of a named test find its id first (listTestConfigs for a standard test, listMissionTestConfigs for a mission test). With groupBy=configId the keys are ids: name one with getTestConfig (most are standard tests), or getMissionTestConfig if that returns 404. A key of "unknown" means runs with no value for that field. Response capped at top 100 groups by count desc; truncated:boolean indicates cap hit. For whole load tests and their statistics use listLoadTests. D-12: groupBy=stepName returns 400 — for step-level breakdowns within a single run use getRunResults; for step-level aggregation across runs see Phase 1.1.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"groupBy": "<groupBy>"
},
"name": "aggregateTestRuns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groupBy | Yes | Dimension to group counts by. `stepName` is rejected (D-12). | |
| outcome | No | Pre-filter runs by outcome before grouping. | |
| runType | No | Pre-filter runs by type before grouping. `load` is load-test calls. | |
| configId | No | Pre-filter runs launched from a specific saved config before grouping. | |
| timeBucket | No | UTC ISO8601 time granularity (Q-5). Omit for flat group counts. | |
| phoneNumber | No | Pre-filter runs by destination number (E.164 exact) before grouping. | |
| startedAfter | No | ISO8601 lower bound for startedAt (inclusive), applied before grouping. | |
| startedBefore | No | ISO8601 upper bound for startedAt (inclusive), applied before grouping. | |
| catalogueTestId | No | Pre-filter runs by compliance catalogue test ID before grouping. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groups | No | Flat groups sorted by count descending (present when no timeBucket). | |
| buckets | No | Time-bucketed groups (present when timeBucket provided). Q-5 UTC ISO8601 keys. | |
| truncated | Yes | True when more than 100 unique group keys existed (Q-6 cap hit). | |
| totalGroups | Yes | Total distinct group keys before the 100-group cap. |