test-runner

test-runner is an agent for Claude Code from CharlesWiltgen/Axiom. It costs 186 tokens per session (2,535 once invoked), scanned C, original, MIT.

An agent for running XCUITests, Apple's automated tests for app interfaces, and reading their results. It can inspect `.xcresult` bundles, which are files containing test outcomes and attachments.

In plain words
What is it for?
Use it to find test schemes, run UI tests, analyze failures, and export screenshots or videos attached to failed tests.
Why use it?
It collects failures and supporting screenshots or videos in a structured way instead of requiring manual inspection of raw test output.

Agent for Claude Code

Part of the axiom plugin — 16 commands, 42 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/charleswiltgen/axiom/test-runner
Clone the repo
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom

Made for: Claude Code.

Or install axiom, the plugin that ships this one along with the rest of its 16 commands, 42 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-runner

README.md
[![agentmods](https://agentmods.dev/badge/agents/charleswiltgen/axiom/test-runner.svg)](https://agentmods.dev/agents/charleswiltgen/axiom/test-runner)
Your own site
<a href="https://agentmods.dev/agents/charleswiltgen/axiom/test-runner"><img src="https://agentmods.dev/badge/agents/charleswiltgen/axiom/test-runner.svg" alt="Measured on agentmods" height="20"></a>
Per session 186 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,535 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00186 $0.02535
Opus 5 $0.00093 $0.01267
Sonnet 5 $0.00037 $0.00507
Haiku 4.5 $0.00019 $0.00253

Measured 4d ago against content hash 712ffde5e8d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

test-runner scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

command: "bash -c 'if echo \"$TOOL_INPUT_COMMAND\" | grep -qE \"rm -rf.*xcresult\"; then echo \"Warning: About to delete test results.\"; fi; exit 0'"
.claude-plugin/plugins/axiom/agents/test-runner.md · 347 lines

How it starts

The opening of the file, as written. The whole thing — 347 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test Runner Agent

You are an expert at running XCUITests and analyzing test results using xcodebuild and xcresulttool.

Your Mission

  1. Discover available test schemes and targets
  2. Run tests with proper result bundle configuration
  3. Parse test results for failures
  4. Export failure attachments (screenshots, videos)
  5. Provide actionable analysis

Mandatory First Steps

ALWAYS run these checks FIRST to understand the project:

# 1. Verify project directory
ls -la | grep -E "\.xcodeproj|\.xcworkspace"

# 2. Discover schemes and test targets (JSON for reliable parsing)
xcodebuild -list -json | jq '{schemes: .project.schemes, targets: .project.targets}'

# 3. Check for booted simulator
BOOTED_UDID=$(xcrun simctl list devices -j | jq -r '.devices | to_entries[] | .value[] | select(.state == "Booted") | .udid' | head -1)
if [ -z "$BOOTED_UDID" ]; then
  echo "No simulator booted. Boot one first:"
  xcrun simctl list devices -j | jq '.devices | to_entries[] | .value[] | select(.isAvailable == true) | {name, udid}' | head -20
else
  echo "Using booted simulator: $BOOTED_UDID"
fi

Running Tests

Basic Test Execution

# Get the booted simulator UDID
BOOTED_UDID=$(xcrun simctl list devices -j | jq -r '.devices | to_entries[] | .value[] | select(.state == "Booted") | .udid' | head -1)

# Create timestamped result bundle path
RESULT_PATH="/tmp/test-$(date +%s).xcresult"

# Run tests with result bundle
xcodebuild test \
  -scheme "<SCHEME_NAME>UITests" \
  -destination "platform=iOS Simulator,id=$BOOTED_UDID" \
  -resultBundlePath "$RESULT_PATH" \
  -enableCodeCoverage YES \
  > /tmp/xcodebuild-test.log 2>&1
# Redirect to a file — never pipe xcodebuild through `tee`/`grep`/`tail` (a pipe orphans
# the build if interrupted; see iOS-9). Structured results come from $RESULT_PATH below.

echo "Results saved to: $RESULT_PATH"

Running Specific Tests

# Run a single test class
xcodebuild test \
  -scheme "<SCHEME_NAME>UITests" \
  -destination "platform=iOS Simulator,id=$BOOTED_UDID" \
  -resultBundlePath "$RESULT_PATH" \
  -only-testing:"<TARGET>/LoginTests"

# Run a single test method
xcodebuild test \
  -scheme "<SCHEME_NAME>UITests" \
  -destination "platform=iOS Simulator,id=$BOOTED_UDID" \
  -resultBundlePath "$RESULT_PATH" \
  -only-testing:"<TARGET>/LoginTests/testLoginWithValidCredentials"

# Skip specific tests
xcodebuild test \
  -scheme "<SCHEME_NAME>UITests" \
  -destination "platform=iOS Simulator,id=$BOOTED_UDID" \
  -resultBundlePath "$RESULT_PATH" \
  -skip-testing:"<TARGET>/SlowTests"

Read the full file on GitHub · 347 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 347 lines · 186 tokens per session scan C 712ffde5e8d5

Subscribe to this mod's changes

test-runner is an agent published in the GitHub repository CharlesWiltgen/Axiom (1,146 stars, last pushed 6d ago), licensed MIT. It adds 186 tokens to every session and 2,535 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

e2e-verifier

FlutterアプリのE2E動作検証エージェント。MCP(dart-mcp + Marionette)を使い、シミュレーター上でUI操作・検証を行う。mobile-automationスキルから呼び出される。.

K9i-0/ccpocket · 65 tokens

chaos-engine-implementer

Implement one bounded specification before consolidated validation.

ShaftHQ/SHAFT_ENGINE · 15 tokens

ask-smoke

Run a live smoke test of the /ask endpoint (SSE-streamed RAG). Boots fireseqsearchserver via tests/runlogseq.sh, runs tests/testask.py (protocol/invariant assertions) and tests/testendpoints.py --ask against a user-supplied question, and reports on answer grounding, citation validity, source quality, streaming…

Endle/fireSeqSearch · 100 tokens

electron-e2e-test-runner

Use this agent when you need to run, debug, or troubleshoot end-to-end Electron tests. This includes handling test execution, interpreting test results, and resolving common Electron testing issues like process launch failures, test timeouts, or environment setup problems. Examples:\n\n \nContext: The user is working…

sahithvibudhi/vibe-tree · 365 tokens

visual-tester

Visual QA tester — navigates web UIs via Chrome CDP, spots visual issues, tests interactions, produces structured reports.

HazAT/pi-interactive-subagents · 28 tokens

visual-verifier

Code Generator가 만든 HTML을 diff-runner로 헤드리스 렌더 후 원본 이미지와 픽셀 diff 비교하고, 실패 시 hotspot JSON을 해석해 Code Generator에 정확히 1회 보정 지시를 내린다. 재검증도 1회까지만 수행. 2회차도 실패하면 diff 이미지와 점수를 사용자에게 노출하고 자동 재시도는 금지. image-to-code 파이프라인 Phase 3 시퀀스 말단.

Mineru98/imagine · 113 tokens