test-macos-app — Codex command: macOS tests
This command picks a narrow macOS test run and groups failures by type. Use it when checking an Xcode or Swift project.
~/.codex/prompts/test-macos-app.mdWhat test-macos-app does
test-macos-app works out whether the project should use xcodebuild test or swift test, then runs the smallest useful test scope. A supplied target or filter narrows the run instead of invoking the whole suite. The command also accepts an Xcode scheme, a test target or product, and either Debug or Release configuration.
Failures are sorted into compile errors, failed assertions, crashes, environment or setup problems, and flaky tests. The result calls out the main blocker and the narrowest sensible follow-up. A focused rerun takes priority when the available arguments make one possible.
The workflow also checks for host app setup and simulator-only assumptions that can interfere with a macOS run. When target or filter is present, rerunning the complete suite is unnecessary.
What it helps with
- run macOS tests with
xcodebuild testorswift test - narrow execution to a scheme, target, or filter
- separate build errors from test failures
- classify crashes and environment problems
- identify the main blocker and next step
Example prompts for the agent
- Run
/test-macos-appand check the smallest useful macOS scope. - Use
/test-macos-app target=MyMacTeststo focus on theMyMacTeststarget. - Run the
LoginTestsfilter underReleasewith/test-macos-app filter=LoginTests configuration=Release.
How to install test-macos-app
Manually: put the files in place
~/.codex/prompts/test-macos-app.mdCall it with /prompts:test-macos-app. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.claude/commands/test-macos-app.mdCall it with /test-macos-app. For all projects use ~/.claude/commands/
Manually: put the files in place
.github/prompts/test-macos-app.prompt.mdManually: put the files in place
.gemini/commands/test-macos-app.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about test-macos-app
How do I install test-macos-app in Codex?
Place the command file at ~/.codex/prompts/test-macos-app.md.
What does test-macos-app do?
It chooses between xcodebuild test and swift test, runs a focused macOS test scope, and sorts failures into practical categories.
Which arguments does the command accept?
You can provide scheme, target, filter, and configuration. The configuration accepts Debug or Release, with Debug as the default.
Source text
test-macos-app.md · MIT
# /test-macos-app Run the smallest meaningful macOS test scope first and explain failures by category. ## Arguments - `scheme`: Xcode scheme name (optional) - `target`: test target or product name (optional) - `filter`: test filter expression (optional) - `configuration`: `Debug` or `Release` (optional, default: `Debug`) ## Workflow 1. Detect whether the repo uses `xcodebuild test` or `swift test`. 2. Prefer focused test execution when a target or filter is provided. 3. Classify failures as compile, assertion, crash, env/setup, or flake. 4. Summarize the top blocker and the narrowest sensible next step. ## Guardrails - Avoid rerunning the full suite if a focused rerun is possible. - Distinguish build failures from actual failing tests. - Note when host app setup or simulator-only test assumptions leak into a macOS run.
© OpenAI · MIT · openai/plugins