Skip to main content
FlowDeck CLI provides comprehensive test execution capabilities, making it easy to run tests from the terminal or integrate into CI/CD pipelines.

Quick Start

After running flowdeck config set, workspace, scheme, and simulator are saved to project state. Run tests with:
To make headless simulator execution explicit for an app-hosted or agent workflow:
Simulator tests already run without opening Simulator.app. The flag records the caller’s intent and is ignored for macOS and physical-device targets.
flowdeck config set saves runtime selection state. If you pass --config, that uses the explicit command config format, which is separate from .flowdeck/config.json and .flowdeck/config.local.json.

Running All Tests

Running Tests on macOS

Use --device "My Mac" for macOS-only test targets:

Filtering Tests

By Test Target

Run specific test targets:

By Test Class or Method

The --only option supports flexible matching:

Skipping Tests

Skip specific tests:

Test Plans

Run a specific test plan by name or by path:
Filters are resolved against the active plan. A test selected by Smoke can be run with --only or --test-cases even when another plan skips it. Without --plan, FlowDeck uses the scheme’s default test plan. If a selected plan is not attached to the scheme, its referenced file is missing, or the plan is malformed, FlowDeck stops before test execution and points to flowdeck test plans for the available plan names.

List Test Plans

List test plans referenced by a scheme (no build required):

Test Discovery

Discover all available tests before running. Test discovery uses static source parsing (like Xcode’s Test Navigator) and does not require building the project.
By default, tests disabled by the scheme’s default plan (or the plan selected with --plan) are excluded from discovery results. Use --include-skipped-tests to show excluded and unselected tests marked as skipped in the output. When --plan is present on both the parent test command and the discover subcommand, the value after discover wins. Plan-selection failures are not silently ignored. Example output:
With --include-skipped-tests:
JSON output with skipped tests:

JSON Output

For CI/CD integration, use JSON output:
Example JSON output:
The final flowdeck.test object is authoritative: its totals and verdict come from the finalized xcresult, reconciled with the real xcodebuild status. Live events remain useful for progress and richer failure locations. Any nonzero xcodebuild status—including 65—keeps success false.

Finalized Result Bundles

Every real test run saves a finalized bundle to ~/.flowdeck/logs/<project-hash>/test.xcresult. The optional absolute resultBundlePath in the final JSON points to that bundle. Supply -resultBundlePath through --xcodebuild-options to choose another location; the final supplied value wins and applies only to the test phase. Verbose output preserves canonical ** TEST SUCCEEDED **, ** TEST FAILED **, and ** TEST EXECUTE FAILED ** verdict lines. Human output also branches on the overall success value, so a process or infrastructure failure cannot be labeled as passing merely because zero failed tests were parsed.

CI/CD Integration

GitHub Actions Example

Parsing Results

Test Output

Human-Readable Output

Tips

Use --json output in CI/CD for reliable parsing and integration with test reporting tools.
Test discovery uses static source parsing and doesn’t require building. It finds XCTestCase subclasses, test* methods, @Suite structs, and @Test functions directly from source files.

Troubleshooting

Tests Not Discovered

Test discovery parses source files directly. If tests aren’t found:
  1. Ensure test files are in the scheme’s test targets
  2. Verify test classes inherit from XCTestCase or use @Test/@Suite
  3. Check that XCTest methods start with test

Simulator Issues

If tests fail to start, try booting the simulator first: