xcresult_get_screenshot
Extract a screenshot from a failed Xcode test at a specific timestamp before failure, using ffmpeg to capture the app state from a video attachment in an .xcresult file.
Instructions
Get screenshot from a failed test at specific timestamp - extracts frame from video attachment using ffmpeg
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": {
"xcresult_path": "<xcresult_path>",
"test_id": "<test_id>",
"timestamp": "<timestamp>"
},
"name": "xcresult_get_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xcresult_path | Yes | Absolute path to the .xcresult file | |
| test_id | Yes | Test ID or index number to get screenshot for | |
| timestamp | Yes | Timestamp in seconds when to extract the screenshot. WARNING: Use a timestamp BEFORE the failure (e.g., if failure is at 30.71s, use 30.69s) as failure timestamps often show the home screen after the app has crashed or reset. |