/peekie:peekie-testsfrom peekie
Parses and formats test results from Xcode .xcresult bundles via `peekie tests`. Supports filtering by status, device labels for matrix runs, attachment export, and SonarQube generic test report generation.
Ships in peekie. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
peekie testsParse a .xcresult bundle and emit per-module test results with fully-qualified test names, durations, and failure messages.
peekie tests <xcresult-path> [flags]
| Flag | Default | Notes |
|---|---|---|
<xcresult-path> | — | Required positional. Path to the .xcresult bundle. |
--format json|list|sonar | list | Output format. Default differs from sister subcommands — tests defaults to list, others default to json. |
--include <statuses> | all 6 (success,failure,expectedFailure,skipped,mixed,unknown) | Comma-separated list. Filters which tests appear in output. Status names are case-sensitive. |
--include-device-details true|false | false | When true, device names appear in qualifiedName (e.g. … / testFoo() [iPhone 15 Pro]). Useful for matrix runs. |
--tests-path <path> | — | Required with --format sonar. Source-tree path used for file/line correlation in the SonarQube report. Ignored for json / list. |
--attachments skip|export | skip | When export, each test JSON gains an attachments array AND files are extracted to disk. |
--attachments-to <dir> | — | Required with --attachments export. Directory where attachment files are written. |
-v, --verbose | false | Debug-level logging to stderr. |
--format json (default-flat structure)Per-module tests array with fully-qualified names. Root-level @Test functions (no enclosing @Suite), nested @Suite types, and backtick-escaped names all appear flat in this array.
{
"modules": [
{
"name": "ExamplesTests",
"files": [],
"tests": [
{"qualifiedName": "ExamplesTests / 2 + 3 = 5", "status": "success", "durationMs": 11.99},
{"qualifiedName": "ExamplesTests / ExampleSUITests / failure()", "status": "failure", "durationMs": 8.34, "message": "Expected 5.0 but got 6.0"},
{"qualifiedName": "ExamplesTests / OuterSuite / InnerSuite / DeeplyNestedSuite / deeplyNestedSuccess()", "status": "success", "durationMs": 1.2}
]
}
]
}
qualifiedName is the canonical full path joined by / (literal space-slash-space). Module → suite path (if any) → test name. Use this as the stable identifier when correlating tests across runs.status is one of success, failure, expectedFailure, skipped, mixed, unknown.message only appears on tests that produced a failure / skip / mixed message.tests is empty when no tests of the included statuses survive filtering.--format listHuman-readable. One line per test, grouped by module. Good for terminal scanning, not for piping to jq.
--format sonarSonarQube generic-test report (XML). Requires --tests-path. Use only when feeding SonarQube directly.
If the output is <testExecutions version="1" /> (empty root, no <file> entries), Sonar's file-correlation matched nothing — --tests-path doesn't cover where the xcresult's source files actually live.
Diagnose: peek at the suite class names with
peekie tests <xcresult> --format json | jq -r '.modules[].tests[].qualifiedName' | head
and find for a matching <SuiteName>.swift — point --tests-path at the directory that contains it.
--attachments export JSON additionpeekie tests Tests.xcresult --format json --attachments export --attachments-to /tmp/att
Each test gains an optional attachments array:
{
"qualifiedName": "ExamplesTests / ExampleSUITests / withAttachment()",
"status": "success",
"durationMs": 8.34,
"attachments": [
{
"name": "Calculation Result.txt",
"exportedFileName": "67676173-…-396.txt",
"path": "/tmp/att/67676173-…-396.txt",
"contentType": "text/plain",
"isAssociatedWithFailure": false,
"repetitionNumber": 1
}
]
}
peekie tests Tests.xcresult --include failure,mixed --format json | jq '.modules[].tests'
peekie tests Tests.xcresult --include failure --format json \
| jq '[.modules[].tests[]] | length'
peekie tests Tests.xcresult --include failure --format json \
| jq -r '.modules[].tests[] | "- " + .qualifiedName + ": " + (.message // "")'
peekie tests Tests.xcresult --format json --include-device-details true
Device names become part of qualifiedName (e.g. … / testFoo() [iPhone 15 Pro]). Useful for de-duplicating identical test names across simulators.
peekie tests Tests.xcresult --format sonar --tests-path ./Sources > sonar-tests.xml
peekie tests Tests.xcresult --format json --attachments export --attachments-to /tmp/att \
| jq '.modules[].tests[] | select(.attachments)'
--format sonar without --tests-path — it'll error out at runtime.--attachments export without --attachments-to — same.suites / rootLevelTests / nestedSuites JSON shape — the CLI always emits the flat tests[] shape with qualifiedName. The nested shape is the older JSONFormatter.Grouping.bySuite SDK output, not what the CLI prints.peekie tests — it only runs the test-results invocation. Use peekie coverage / peekie warnings for those.qualifiedName strings if you only need a status filter — use --include and let the CLI do it.peekie-attachments — standalone manifest + per-test extraction with --test-id.peekie-warnings, peekie-errors — build-side diagnostics from the same bundle.peekie-coverage — coverage from the same bundle.peekie (umbrella) — cross-subcommand recipes (e.g. saving failure attachments as CI artifacts).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
xcresult, test-results, xcode-testing, ci-testing, sonarqube
npx claudepluginhub dodobrands/peekie --plugin peekie6 skills in this plugin
/peekieRoute Xcode `.xcresult` parsing work to the right `peekie` subcommand. Trigger on broad bundle intent — e.g. "look at this xcresult: /tmp/Build.xcresult", "parse this test bundle", "what's in this build artifact?", "can you summarize this `.xcresult`?", "I have an xcresult from CI, what should I do with it?". Five dedicated sub-skills (`peekie-tests`, `peekie-warnings`, `peekie-errors`, `peekie-coverage`, `peekie-attachments`) cover the data axes; this umbrella picks the right one./peekie-attachmentsExtract and list test attachments (screenshots, logs, blobs) from an Xcode `.xcresult` bundle via `peekie attachments`. Trigger when the user asks about attached files in a bundle — e.g. "extract failure screenshots from /tmp/Tests.xcresult to /tmp/out", "save attachments for a single test", "what's attached to my failing tests?", "dump every attachment from this xcresult", "give me a manifest of attachments with file paths and content types", "I need just the attachments for `ExampleSUITests/failure()`". `--output-dir` is required. Note `--include` filters the printed manifest, NOT files written to disk — use `--test-id` to scope disk writes./peekie-coverageExtract code coverage from an Xcode `.xcresult` bundle via `peekie coverage`. Trigger when the user asks about coverage from a bundle — e.g. "what's the coverage in /tmp/Tests.xcresult?", "coverage per module please", "covered vs total lines for each file", "give me overall coverage as a percentage I can print in CI", "is coverage above 70%?", "JSON of coverage per file for a custom report". One subcommand, hierarchical modules → files JSON with covered/total line counts.Other plugins' skills for the same job