Skip to main content

flowdeck test

Run unit and UI tests.

Options

After running flowdeck config set, workspace, scheme, and simulator are saved to project state. CLI parameters are only required if you haven’t run flowdeck config set, or to override saved values. Use --device "My Mac" for macOS builds.
--config here means the explicit command config file format. It is separate from .flowdeck/config.json and .flowdeck/config.local.json.
On failed test runs, FlowDeck prints the extracted failure reason plus Full log: <absolute-path> for the persisted raw xcodebuild output. Read that file directly before rerunning with --verbose.
Simulator tests already execute without opening Simulator.app. --headless makes that intent explicit for app-hosted and agent workflows while preserving the same execution behavior. The flag is ignored for macOS and physical-device targets.

Finalized Result Bundles

Every real run waits for xcodebuild to finish and saves one finalized test bundle at ~/.flowdeck/logs/<project-hash>/test.xcresult. The build-for-testing phase uses a separate FlowDeck diagnostics bundle, so the two phases never compete for the same -resultBundlePath. To choose the test bundle path, pass -resultBundlePath through --xcodebuild-options. If more than one value is present across config and CLI sources, the final value wins. FlowDeck removes duplicate forms and applies the selected path only to test-without-building. --verbose prints stable terminal markers: ** TEST SUCCEEDED **, ** TEST FAILED **, or ** TEST EXECUTE FAILED **. A nonzero xcodebuild status, including 65, always produces a failed command.

Test Filtering

The --only option supports multiple formats:
  • Full path: MyAppTests/LoginTests/testValidLogin - runs a specific test method
  • Top-level Swift Testing function: MyAppTests/topLevelTest() - omits the synthetic discovery class
  • Class name: LoginTests - runs all tests in that class
  • Method name: testValidLogin - runs all tests with that method name (across classes)
You can specify multiple tests by using --only multiple times or separating with commas. When --plan is combined with --only or --test-cases, FlowDeck resolves the filter against that plan’s enabled and selected tests. Exclusions in other plans do not affect the run. Without --plan, discovery follows the scheme’s default test plan. If the selected plan is not attached to the scheme, its file is missing, or its contents cannot be read, FlowDeck stops before running tests and suggests flowdeck test plans to inspect the scheme’s available plans.

Config File Format

The --config parameter accepts the explicit command config format:
For macOS builds, set platform to "macOS" (no simulator needed).

JSON Output

When using --json, the command outputs newline-delimited JSON events during execution, followed by a final test result:
Event Types: Final Result (Success):
Final Result (Failure):

flowdeck test discover

Discover all available tests in a project by parsing test source files. This uses static source analysis (like Xcode’s Test Navigator) and does not require building the project.

Options

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. By default, tests that are disabled in the scheme’s default plan (or the plan selected with --plan) are excluded from results. Use --include-skipped-tests to include excluded and unselected tests with isSkipped: true.
If --plan appears on both flowdeck test and flowdeck test discover, the value after discover takes precedence. Missing, unavailable, or malformed plans fail discovery and point to flowdeck test plans.

JSON Output


flowdeck test plans

List test plans referenced by a scheme. This reads the scheme file and does not build the project.

Options

JSON Output