get_test_results
Fetch and parse test results from a Codemagic build, returning a structured pass/fail/error/skip summary with failure details. Supports Flutter, Android, and iOS tests via JUnit XML artifacts.
Instructions
Fetch and parse test results from a Codemagic build. Searches the build's artifact list for JUnit XML files and returns a structured pass/fail/error/skip summary with per-failure details (message + stack trace excerpt). Covers Flutter, Android instrumented tests, and iOS (xcresult converted by Codemagic's CLI tools). Pass artifact_url directly if you already have it from wait_for_build — skips the artifact search. The build must be in a terminal state (finished or failed) for artifacts to be available. Requires the codemagic.yaml workflow to include a test_report glob pointing at the JUnit XML output.
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": {
"build_id": "<build_id>"
},
"name": "get_test_results"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| build_id | Yes | Codemagic build ID | |
| artifact_url | No | Direct URL to a JUnit XML artifact — if provided, skips artifact search. Use the short_lived_download_url from get_build or wait_for_build. |