diff --git a/README.md b/README.md index e21db2d..17f68fd 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ There are first-class integrations for GitHub Actions, Bitrise, Bitbucket Pipeli ### How do I get videos, logs and test reports? -Pass `--download-artifacts ALL` (or `FAILED`) to a `dcd cloud` run, or fetch them after the fact with `dcd artifacts --upload-id --download-artifacts ALL`. Each result in the console also has a download menu for its logs, reports, app binary and workspace. Reports are available as `junit` and `html` via `--report` (`html-detailed` and `allure` are [deprecated](getting-started/deprecations.md)). See [Artifacts & Downloads](artifacts/artifacts.md) and [Report Formats](artifacts/report-formats.md). +Pass `--download-artifacts ALL` (or `FAILED`) to a `dcd cloud` run, or fetch them after the fact with `dcd artifacts --upload-id --download-artifacts ALL`. Each result in the console also has a download menu for its logs, reports, app binary and workspace. Reports are available as `junit` and `html` via `--report` (`html-detailed` and `allure` are [deprecated](getting-started/deprecations.md)). See [Artifacts & Downloads](artifacts/artifacts.md) and [Report formats](artifacts/artifacts.md#report-formats). ### Is there a time limit on a test? diff --git a/SUMMARY.md b/SUMMARY.md index c9d2e8c..47f11e2 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -18,24 +18,17 @@ * [Bitrise Steps](ci-cd/bitrise-steps.md) * [Bitbucket Pipelines](ci-cd/bitbucket-pipelines.md) * [Any CI](ci-cd/any-ci.md) -* [Async Execution](advanced/async-execution.md) * [Cancelling Superseded Runs](advanced/cancel-previous.md) ## Devices * [Devices & OS Versions](getting-started/devices-configuration.md) -* [Deprecations & Removals](getting-started/deprecations.md) * [Device Matrix](configuration/device-matrix.md) -* [Per-flow Devices](configuration/per-flow-devices.md) * [Per-flow Overrides](configuration/per-flow-overrides.md) * [Runner Types](configuration/runner-type.md) * [Google Play APIs](configuration/google-play-apis.md) * [Foldable Devices](configuration/foldable-devices.md) -* [Animations](configuration/disable-animations.md) -* [Device Locale](configuration/device-locale.md) -* [Device Date & Time](configuration/device-datetime.md) -* [Device Orientation](configuration/orientation.md) -* [Chrome Onboarding](advanced/chrome-onboarding.md) +* [Device Settings](configuration/device-settings.md) ## Configuration @@ -51,7 +44,6 @@ ## Test Artifacts & Reports * [Artifacts & Downloads](artifacts/artifacts.md) -* [Report Formats](artifacts/report-formats.md) * [Inspecting Variables](artifacts/inspecting-variables.md) ## Notifications @@ -70,9 +62,9 @@ * [List](cli/dcd-list.md) * [Login & Accounts](cli/dcd-login.md) * [Settings](cli/dcd-settings.md) -* [Devices](cli/dcd-device.md) * [Exit Codes](advanced/exit-codes.md) * [Live Sessions](cli/dcd-live.md) +* [Devices](cli/dcd-device.md) ## REST API @@ -91,21 +83,23 @@ * [Agent Devices](mcp/agent-devices.md) * [Agent Devices Tools](mcp/agent-devices-tools.md) * [Agent Instructions](mcp/agent-devices-skill.md) -* [Older dcd-mcp Server](mcp/overview.md) + +## Billing + +* [Test Run Billing](billing/test-run-billing.md) +* [Subscriptions](billing/subscriptions.md) +* [Overage](billing/overage.md) +* [Usage Alerts & Limits](billing/usage-alerts.md) ## Security & Compliance * [Security Overview](security/security-overview.md) * [IP Addresses](security/ip-addresses.md) * [Enterprise SSO](security/enterprise-single-sign-on.md) -* [IT Security Policies](security/it-security-policies.md) -## Billing +## Product Lifecycle -* [Test Run Billing](billing/test-run-billing.md) -* [Subscriptions](billing/subscriptions.md) -* [Overage](billing/overage.md) -* [Usage Alerts & Limits](billing/usage-alerts.md) +* [Deprecations & Removals](getting-started/deprecations.md) ## Legal diff --git a/advanced/async-execution.md b/advanced/async-execution.md deleted file mode 100644 index 8a5a59c..0000000 --- a/advanced/async-execution.md +++ /dev/null @@ -1,70 +0,0 @@ -# Async Execution - -By default, `dcd cloud` waits for all tests to complete before exiting. Async mode lets you start a test run and return immediately — useful when you want to avoid blocking your CI pipeline. - -## Basic Usage - -```bash -dcd cloud --async -``` - -When tests are submitted successfully, the command exits with code `0` regardless of test outcome. If submission itself fails, it exits with code `1`. - -Because the command doesn't wait for the run, `--download-artifacts` and `--report` do nothing with `--async`. Download artifacts and reports with [`dcd artifacts`](../cli/dcd-artifacts.md) once the run has finished. With `--json` or `--json-file`, the result has `status` `PENDING`, and each test has the status it was submitted with (see [JSON output](../cli/dcd-cloud.md#json-output)). - -Pair `--async` with `--name` to make it easy to look up results later: - -```bash -dcd cloud --async --name "build-$GIT_SHA" -``` - -## Checking Results After an Async Run - -Use the `dcd status` command to poll for results by upload ID: - -```bash -dcd status --upload-id -``` - -You can also look a run up by name with `--name` (handy when paired with `--async --name`). A run's status can turn `FAILED` before all its tests have finished, so wait until no test is queued, pending or running before you download anything. See [dcd status](../cli/dcd-status.md#polling-an-async-run) for an example. - -## GitHub Actions Pattern - -In GitHub Actions, async mode is useful when you want to kick off tests and check results in a later step, while other CI work continues in parallel: - -```yaml -jobs: - build-and-test: - runs-on: ubuntu-latest - steps: - - name: Build app - run: ./gradlew assembleDebug - - # Start tests immediately — don't wait for results - - uses: devicecloud-dev/device-cloud-for-maestro@v2 - id: dcd - with: - api-key: ${{ secrets.DCD_API_KEY }} - app-file: app/build/outputs/apk/debug/app-debug.apk - async: true - name: ${{ github.sha }} - - # Continue with other CI work while tests run in the background - - name: Run unit tests - run: ./gradlew test - - # Record where to find the results - - name: Record the console URL - run: echo "View results at: ${{ steps.dcd.outputs.DEVICE_CLOUD_CONSOLE_URL }}" -``` - -::: info -In async mode the Action doesn't wait for the run, so `DEVICE_CLOUD_UPLOAD_STATUS` is always `PENDING`, `DEVICE_CLOUD_FLOW_RESULTS` is `[]` and `DEVICE_CLOUD_APP_BINARY_ID` isn't set. For a pass/fail verdict, poll [`dcd status`](../cli/dcd-status.md#polling-an-async-run) or use the [DeviceCloud GitHub App](../ci-cd/github-checks.md) check. -::: - -## Considerations - -- The console URL is available via the `DEVICE_CLOUD_CONSOLE_URL` action output so you can link to results from your CI summary. -- Retries (`--retry`) and async mode work together — DeviceCloud handles retries in the background. -- If you need the final pass/fail status in CI, poll with [`dcd status`](../cli/dcd-status.md#polling-an-async-run). -- With the [DeviceCloud GitHub App](../ci-cd/github-checks.md) installed, an async run reports its result back as a pass/fail check on the pull request, so you don't have to poll for it yourself. diff --git a/advanced/chrome-onboarding.md b/advanced/chrome-onboarding.md deleted file mode 100644 index c392264..0000000 --- a/advanced/chrome-onboarding.md +++ /dev/null @@ -1,19 +0,0 @@ -# Chrome Onboarding - -Chrome Onboarding pre-configures Chrome browser settings before your tests run on Android devices, ensuring that first-run dialogs don't interfere with test execution. - -## Onboarding Methods - -By default we use a config-based Chrome onboarding which adds minimal overhead and works for most scenarios. - -If config-based onboarding can't be confirmed on the device, we automatically switch to Maestro-based onboarding, which runs a Maestro flow that opens Chrome and taps through its first-run screens. It's more thorough, but it adds significant overhead, because the flow runs on the device before your test. - -If Maestro-based onboarding fails, the test goes back in the queue to start again on a fresh device. This doesn't use up a [retry](retry-strategies.md) and isn't charged. If onboarding still fails on the last attempt, the test starts anyway, and the test's log notes that Chrome may show its welcome screen first. - -## Forcing Maestro-based Onboarding - -If you're experiencing issues with Chrome, you can force Maestro-based onboarding using the CLI flag `--maestro-chrome-onboarding`. - -::: warning -Maestro-based onboarding **will slow your test suite down**. We only recommend it if you're having issues with the default config-based method. -::: diff --git a/artifacts/artifacts.md b/artifacts/artifacts.md index 6559803..b5bf74c 100644 --- a/artifacts/artifacts.md +++ b/artifacts/artifacts.md @@ -80,6 +80,56 @@ Files are named after the flow file (without its extension), e.g. `login-maestro Each [retry](../advanced/retry-strategies.md#seeing-every-attempt) attempt gets its own result-ID folder, so the failed attempt's screenshots and video are in the zip even if a retry passed. +## Report formats + +DeviceCloud supports the standard Maestro report formats: JUnit and HTML. + +::: warning +`allure` and `html-detailed` are deprecated. We're targeting their removal on **7 December 2026**, subject to change based on usage. Once they're removed, runs that pass them still run and don't fail: + +- `--report html-detailed` gets the standard HTML report. +- `--report allure` gets no report. + +To move now, use `--report html` or `--report junit`. +::: + +### Available Reports + +We support the following report types: + +- `junit` +- `html` +- `html-detailed` (deprecated, removal targeted for 7 December 2026) +- `allure` (deprecated, removal targeted for 7 December 2026) + +You can enable each report using `--report `. `--format` is an alias for `--report`. + +The CLI will automatically download the report to your working directory for you after the run finishes. To change the download path, use the flag for that report format: + +- `--junit-path ` (default `./report.xml`) +- `--html-path ` (default `./report.zip`, applies to `html` and `html-detailed`) +- `--allure-path ` (default `./report.html`) + +::: info +The `html` and `html-detailed` reports are downloaded as a ZIP archive (the report plus its screenshots, videos and logs). Unzip it to view the report. +::: + +(`--artifacts-path` is a separate flag that sets the download path for the artifacts zip and requires `--download-artifacts`.) + +### Types of Report + +#### JUnit + +JUnit reports are XML-based and are generally the standard format for CI/CD reports. + +#### HTML and HTML-Detailed + +HTML reports are human-readable and provide a summary of a test run, including failure screenshots. Both are delivered as a ZIP containing the report and the files it links to. Detailed reports add the test steps to everything in a standard HTML report. `html-detailed` is deprecated: once it's removed (targeted for 7 December 2026), it gives the standard HTML report. + +#### Allure + +Allure reports are HTML-based and are downloaded as a single, self-contained HTML file. Allure is deprecated, and we're targeting its removal on 7 December 2026. Once it's removed, runs that pass `--report allure` get no report. Use `html` or `junit` instead. + ## Retention App binaries and workspaces are deleted 1 month after they were last used. Test results, their artifacts (logs, screenshots and videos) and the environment variables passed with `--env` are kept for 6 months. diff --git a/artifacts/report-formats.md b/artifacts/report-formats.md deleted file mode 100644 index 48a7939..0000000 --- a/artifacts/report-formats.md +++ /dev/null @@ -1,49 +0,0 @@ -# Report Formats - -DeviceCloud supports the standard Maestro report formats: JUnit and HTML. - -::: warning -`allure` and `html-detailed` are deprecated. We're targeting their removal on **7 December 2026**, subject to change based on usage. Once they're removed, runs that pass them still run and don't fail: - -- `--report html-detailed` gets the standard HTML report. -- `--report allure` gets no report. - -To move now, use `--report html` or `--report junit`. -::: - -## Available Reports - -We support the following report types: - -- `junit` -- `html` -- `html-detailed` (deprecated, removal targeted for 7 December 2026) -- `allure` (deprecated, removal targeted for 7 December 2026) - -You can enable each report using `--report `. `--format` is an alias for `--report`. - -The CLI will automatically download the report to your working directory for you after the run finishes. To change the download path, use the flag for that report format: - -- `--junit-path ` (default `./report.xml`) -- `--html-path ` (default `./report.zip`, applies to `html` and `html-detailed`) -- `--allure-path ` (default `./report.html`) - -::: info -The `html` and `html-detailed` reports are downloaded as a ZIP archive (the report plus its screenshots, videos and logs). Unzip it to view the report. -::: - -(`--artifacts-path` is a separate flag that sets the download path for the artifacts zip and requires `--download-artifacts`.) - -## Types of Report - -### JUnit - -JUnit reports are XML-based and are generally the standard format for CI/CD reports. - -### HTML and HTML-Detailed - -HTML reports are human-readable and provide a summary of a test run, including failure screenshots. Both are delivered as a ZIP containing the report and the files it links to. Detailed reports add the test steps to everything in a standard HTML report. `html-detailed` is deprecated: once it's removed (targeted for 7 December 2026), it gives the standard HTML report. - -### Allure - -Allure reports are HTML-based and are downloaded as a single, self-contained HTML file. Allure is deprecated, and we're targeting its removal on 7 December 2026. Once it's removed, runs that pass `--report allure` get no report. Use `html` or `junit` instead. diff --git a/ci-cd/bitbucket-pipelines.md b/ci-cd/bitbucket-pipelines.md index 2f2ef60..2470446 100644 --- a/ci-cd/bitbucket-pipelines.md +++ b/ci-cd/bitbucket-pipelines.md @@ -67,7 +67,7 @@ Most pipe variables map to the [`dcd cloud`](../cli/dcd-cloud.md) CLI flag of th | `WORKSPACE` / `FLOWS` | Path to your Maestro flows folder or file. If you set both, `FLOWS` wins. | | `ANDROID_DEVICE`, `ANDROID_API_LEVEL` | Android device + API level. | | `IOS_DEVICE`, `IOS_VERSION` | iOS device + version. | -| `DEVICE_LOCALE` | Device locale, e.g. `de_DE`. See [Device Locale](../configuration/device-locale.md). | +| `DEVICE_LOCALE` | Device locale, e.g. `de_DE`. See [Locale](../configuration/device-settings.md#locale). | | `GOOGLE_PLAY` | `"true"` to run on Android devices with Google Play. | | `MAESTRO_VERSION` | Maestro version to run your flows with. See [Maestro Versions](../configuration/maestro-versions.md). | | `CONFIG` | Path to a custom Maestro config file. | @@ -76,7 +76,7 @@ Most pipe variables map to the [`dcd cloud`](../cli/dcd-cloud.md) CLI flag of th | `METADATA` | Newline-separated `key=value` metadata attached to the run. | | `INCLUDE_TAGS` / `EXCLUDE_TAGS` | Filter flows by Maestro tag. | | `RETRY` | Number of retries on failure, up to `2`. See [Retry Strategies](../advanced/retry-strategies.md). | -| `REPORT` | `junit` or `html`. `html-detailed` and `allure` are deprecated, see [Report Formats](../artifacts/report-formats.md). | +| `REPORT` | `junit` or `html`. `html-detailed` and `allure` are deprecated, see [Report formats](../artifacts/artifacts.md#report-formats). | | `JUNIT_PATH` | Where to write the JUnit report (default `./report.xml`). | | `DOWNLOAD_ARTIFACTS` | `ALL` or `FAILED` — downloads logs/screenshots/videos. | | `JSON_FILE` | `"true"` to write the results to `_dcd.json`. | diff --git a/ci-cd/bitrise-steps.md b/ci-cd/bitrise-steps.md index 6bd3d99..473ca5b 100644 --- a/ci-cd/bitrise-steps.md +++ b/ci-cd/bitrise-steps.md @@ -61,15 +61,15 @@ For the devices and OS versions you can pass, and which combinations work, see [ | Android API Level | `android_api_level` | `36` | Android API level, e.g. `34`. | | iOS Device | `ios_device` | `iphone-16` | iOS device, e.g. `iphone-17`. | | iOS Version | `ios_version` | `26` | Major iOS version, e.g. `18`. | -| Device Locale | `device_locale` | — | E.g. `de_DE`. See [Device Locale](../configuration/device-locale.md). | +| Device Locale | `device_locale` | — | E.g. `de_DE`. See [Locale](../configuration/device-settings.md#locale). | | Device Orientation | `orientation` | `0` | Android only. `0` (portrait) or `90` (landscape). | | Google Play | `google_play` | `false` | Android only. Run on devices with Google Play. | | Runner Type | `runner_type` | `default` | `default`, `cpu1`, `m1` or `m4`. `m1` and `m4` incur premium pricing. See [Runner Types](../configuration/runner-type.md). | | Render Engine | `render_engine` | — | Android only, from 1.3.0. `lavapipe` or `swiftshader`, the software renderer the emulator boots with on the default Android runner. Leave it empty to let DeviceCloud choose (`swiftshader` for apps built with Flutter, otherwise `lavapipe`). | | Android No Snapshot | `android_no_snapshot` | `false` | Android only. Force a cold boot. Already on for API 34 and later. | -| Maestro Chrome Onboarding | `maestro_chrome_onboarding` | `false` | Android only. See [Chrome Onboarding](../advanced/chrome-onboarding.md). | +| Maestro Chrome Onboarding | `maestro_chrome_onboarding` | `false` | Android only. See [Chrome onboarding](../configuration/device-settings.md#chrome-onboarding). | | Show Crosshairs | `show_crosshairs` | `false` | Android only. Show crosshairs where the flow taps. | -| Disable Animations | `disable_animations` | `false` | Turn off device animations (Reduce Motion on iOS). See [Animations](../configuration/disable-animations.md). | +| Disable Animations | `disable_animations` | `false` | Turn off device animations (Reduce Motion on iOS). See [Animations](../configuration/device-settings.md#animations). | ### Running the tests @@ -80,7 +80,7 @@ For the devices and OS versions you can pass, and which combinations work, see [ | Retry Count | `retry` | `0` | Retries on failure, up to `2`. See [Retry Strategies](../advanced/retry-strategies.md). | | Priority | `priority` | `normal` | From 1.5.0. `low`, `normal` or `high`: which of your team's queued runs starts first. It never moves your runs ahead of other customers. See [Run Priority](../configuration/run-priority.md). | | Cancel Previous Run | `cancel_previous` | `false` | From 1.4.0. Cancel the previous run's still-queued tests when this one starts. See [Cancelling superseded runs](#cancelling-superseded-runs). | -| Async Execution | `async` | `false` | Don't wait for the results: the step passes once the run is submitted. See [Async Execution](../advanced/async-execution.md). | +| Async Execution | `async` | `false` | Don't wait for the results: the step passes once the run is submitted. See [Async execution](overview.md#async-execution). | | Dry Run | `dry_run` | `false` | List the flows that would run without starting a run. | | Ignore SHA Check | `ignore_sha_check` | `false` | Upload the binary even if the same file was uploaded before. Not recommended. | @@ -88,7 +88,7 @@ For the devices and OS versions you can pass, and which combinations work, see [ | Input | Key | Default | Description | |---|---|---|---| -| Report Format | `report` | — | `junit` or `html`. `html-detailed` and `allure` are deprecated, see [Report Formats](../artifacts/report-formats.md). | +| Report Format | `report` | — | `junit` or `html`. `html-detailed` and `allure` are deprecated, see [Report formats](../artifacts/artifacts.md#report-formats). | | JUnit Report Path | `junit_path` | `./report.xml` | Where to save the JUnit report. | | HTML Report Path | `html_path` | `./report.zip` | Where to save the HTML report, a ZIP of the report and its files. | | Allure Report Path | `allure_path` | `./report.html` | Where to save the Allure report. | diff --git a/ci-cd/eas-workflows.md b/ci-cd/eas-workflows.md index d897ce0..60bae7b 100644 --- a/ci-cd/eas-workflows.md +++ b/ci-cd/eas-workflows.md @@ -216,7 +216,7 @@ For the devices and OS versions you can pass, and which combinations work, see [ | `--ios-device ` | iOS device, e.g. `iphone-17`. Default `iphone-16`. | | `--ios-version ` | Major iOS version, e.g. `18`. Default `26`. | | `--android-device-matrix `, `--ios-device-matrix ` | Run every flow once per device and OS pair, e.g. `pixel-8:34`. Repeatable. See [Device Matrix](../configuration/device-matrix.md). | -| `--device-locale ` | E.g. `de_DE`. See [Device Locale](../configuration/device-locale.md). | +| `--device-locale ` | E.g. `de_DE`. See [Locale](../configuration/device-settings.md#locale). | | `--orientation ` | Android only. `0` or `90`. | | `--google-play` | Android only. Run on Google Play devices. | | `--runner-type ` | `default`, `cpu1`, `m1`, `m4`. `m1` and `m4` incur premium pricing. See [Runner Types](../configuration/runner-type.md). | @@ -231,20 +231,20 @@ For the devices and OS versions you can pass, and which combinations work, see [ | `--name ` | Custom name for this test run. | | `--metadata key=value` | Extra metadata for the run. Repeatable. | | `--retry ` | Number of automatic retries on failure, up to `2`. See [Retry Strategies](../advanced/retry-strategies.md). | -| `--report ` | `junit` or `html`, saved in the working directory as `report.xml` or `report.zip`. `html-detailed` and `allure` are deprecated, see [Report Formats](../artifacts/report-formats.md). | +| `--report ` | `junit` or `html`, saved in the working directory as `report.xml` or `report.zip`. `html-detailed` and `allure` are deprecated, see [Report formats](../artifacts/artifacts.md#report-formats). | | `--junit-path `, `--html-path ` | Save the report somewhere else. | ### Execution Options | Flag | Description | |------|-------------| -| `--async` | Exit immediately without waiting for results (exit code `0` regardless). See [Async Execution](../advanced/async-execution.md). | +| `--async` | Exit immediately without waiting for results (exit code `0` regardless). See [Async execution](overview.md#async-execution). | | `--cancel-previous` | Cancel the still-queued tests of the previous run of this job on the same branch or PR. Needs `DCD_GH_REPO` plus `DCD_GH_BRANCH` or `DCD_GH_PR_NUMBER`; set `DCD_CHECK_NAME` per job. See [Cancelling superseded runs](../advanced/cancel-previous.md). | | `--priority ` | `low`, `normal` (default) or `high`. Reorders only your team's own queued runs. See [Run Priority](../configuration/run-priority.md). | | `--download-artifacts ` | Download logs/screenshots/videos as `artifacts.zip` in the working directory. Options: `ALL`, `FAILED`. `--artifacts-path` saves it somewhere else. | | `--json-file` | Write the results to `_dcd.json`. The job still fails when the run fails. | -| `--disable-animations` | Disable device animations. See [Animations](../configuration/disable-animations.md). | -| `--maestro-chrome-onboarding` | Android only. See [Chrome Onboarding](../advanced/chrome-onboarding.md). | +| `--disable-animations` | Disable device animations. See [Animations](../configuration/device-settings.md#animations). | +| `--maestro-chrome-onboarding` | Android only. See [Chrome onboarding](../configuration/device-settings.md#chrome-onboarding). | | `--android-no-snapshot` | Force cold boot. Auto-enabled for API 34+. | | `--debug` | Verbose debug output. | diff --git a/ci-cd/github-actions.md b/ci-cd/github-actions.md index 16b0a8d..a789c8b 100644 --- a/ci-cd/github-actions.md +++ b/ci-cd/github-actions.md @@ -115,7 +115,7 @@ For the devices and OS versions you can pass, and which combinations work, see [ | `android-api-level` | No | `36` | Android API level, e.g. `34`. | | `ios-device` | No | `iphone-16` | iOS device model, e.g. `iphone-17`. | | `ios-version` | No | `26` | Major iOS version, e.g. `18`. | -| `device-locale` | No | — | Device locale in `ISO-639-1_ISO-3166-1` format (e.g. `de_DE`). See [Device Locale](../configuration/device-locale.md). | +| `device-locale` | No | — | Device locale in `ISO-639-1_ISO-3166-1` format (e.g. `de_DE`). See [Locale](../configuration/device-settings.md#locale). | | `orientation` | No | `0` | Android only. Device orientation in degrees. Options: `0`, `90`. | | `google-play` | No | `false` | Android only. Run flows against Google Play devices. | | `runner-type` | No | `default` | Runner type. Options: `default`, `cpu1`, `m1`, `m4`. `m1` and `m4` incur premium pricing. See [Runner Types](../configuration/runner-type.md). | @@ -128,13 +128,13 @@ For the devices and OS versions you can pass, and which combinations work, see [ | `env` | No | — | Multiline list of environment variables (`KEY=value`) to inject into flows. | | `name` | No | PR title or commit message | Custom name for this test run, visible in the console. Defaults to the pull request's title on PR events, the commit message on push events, and the commit SHA otherwise. | | `retry` | No | `0` | Number of retries on failure, up to `2`. See [Retry Strategies](../advanced/retry-strategies.md). | -| `report` | No | — | Report format: `junit` or `html`, saved in the working directory as `report.xml` or `report.zip`. `html-detailed` still works but is deprecated. See [Report Formats](../artifacts/report-formats.md). | +| `report` | No | — | Report format: `junit` or `html`, saved in the working directory as `report.xml` or `report.zip`. `html-detailed` still works but is deprecated. See [Report formats](../artifacts/artifacts.md#report-formats). | ### Android-Specific Options | Input | Required | Default | Description | |-------|----------|---------|-------------| -| `maestro-chrome-onboarding` | No | `false` | Force Maestro-based Chrome onboarding. Fixes browser-related crashes but slows tests. See [Chrome Onboarding](../advanced/chrome-onboarding.md). | +| `maestro-chrome-onboarding` | No | `false` | Force Maestro-based Chrome onboarding. Fixes browser-related crashes but slows tests. See [Chrome onboarding](../configuration/device-settings.md#chrome-onboarding). | | `android-no-snapshot` | No | `false` | Force cold boot instead of snapshot boot. Automatically enabled for API level 34+. | | `render-engine` | No | — | Software renderer the emulator boots with on the default Android runner (`cpu1`). Options: `lavapipe`, `swiftshader`. Leave unset to let DeviceCloud choose: `lavapipe`, or `swiftshader` for apps built with Flutter. Try `swiftshader` if your app fails to render or the device drops offline mid-run. | @@ -157,7 +157,7 @@ The action automatically attaches Git and pull request metadata to each run, rea | Input | Required | Default | Description | |-------|----------|---------|-------------| -| `async` | No | `false` | Exit immediately without waiting for results. Returns exit code `0` regardless of test outcome. See [Async Execution](../advanced/async-execution.md). | +| `async` | No | `false` | Exit immediately without waiting for results. Returns exit code `0` regardless of test outcome. See [Async execution](overview.md#async-execution). | | `cancel-previous` | No | `false` | Cancel the still-queued tests of the previous run of this job on the same branch or PR. See [Cancelling superseded runs](../advanced/cancel-previous.md). | | `priority` | No | `normal` | Run priority: `low`, `normal` or `high`. Reorders only your team's own queued runs. See [Run Priority](../configuration/run-priority.md). | | `quiet` | No | `true` | Quieter output, without progress updates while the run is polled. Set to `false` to see them. | diff --git a/ci-cd/github-checks.md b/ci-cd/github-checks.md index 3566eff..15f1ae8 100644 --- a/ci-cd/github-checks.md +++ b/ci-cd/github-checks.md @@ -124,4 +124,4 @@ Usually it's one of these: --- -See also [GitHub Actions](github-actions.md) and [Async Execution](../advanced/async-execution.md). +See also [GitHub Actions](github-actions.md) and [Async execution](overview.md#async-execution). diff --git a/ci-cd/overview.md b/ci-cd/overview.md index af66b75..ab81f95 100644 --- a/ci-cd/overview.md +++ b/ci-cd/overview.md @@ -13,11 +13,11 @@ DeviceCloud has integrations for the CI providers below. For any other provider, ## Useful Features For CI/CD -* [Async Execution](../advanced/async-execution.md) — Fire-and-forget tests without blocking your pipeline +* [Async execution](#async-execution) — Fire-and-forget tests without blocking your pipeline * [Cancelling Superseded Runs](../advanced/cancel-previous.md) — Drop the previous run's queued tests when a newer commit arrives * [Run Priority](../configuration/run-priority.md) — Choose which of your own queued runs starts first * [dcd status](../cli/dcd-status.md) — Poll for results after an async run -* [Report Formats](../artifacts/report-formats.md) — Generate JUnit/HTML reports for your CI system +* [Report formats](../artifacts/artifacts.md#report-formats) — Generate JUnit/HTML reports for your CI system * [Artifacts & Downloads](../artifacts/artifacts.md) — Access logs, screenshots, and videos * [Exit Codes](../advanced/exit-codes.md) — Gate your pipeline on the result @@ -25,3 +25,74 @@ DeviceCloud has integrations for the CI providers below. For any other provider, * [Environment Variables](../configuration/environment-variables.md) — Pass secrets and config to your flows * [API Keys](../getting-started/api-keys.md) — Manage authentication + +## Async execution + +By default, `dcd cloud` waits for all tests to complete before exiting. Async mode lets you start a test run and return immediately — useful when you want to avoid blocking your CI pipeline. + +### Basic Usage + +```bash +dcd cloud --async +``` + +When tests are submitted successfully, the command exits with code `0` regardless of test outcome. If submission itself fails, it exits with code `1`. + +Because the command doesn't wait for the run, `--download-artifacts` and `--report` do nothing with `--async`. Download artifacts and reports with [`dcd artifacts`](../cli/dcd-artifacts.md) once the run has finished. With `--json` or `--json-file`, the result has `status` `PENDING`, and each test has the status it was submitted with (see [JSON output](../cli/dcd-cloud.md#json-output)). + +Pair `--async` with `--name` to make it easy to look up results later: + +```bash +dcd cloud --async --name "build-$GIT_SHA" +``` + +### Checking Results After an Async Run + +Use the `dcd status` command to poll for results by upload ID: + +```bash +dcd status --upload-id +``` + +You can also look a run up by name with `--name` (handy when paired with `--async --name`). A run's status can turn `FAILED` before all its tests have finished, so wait until no test is queued, pending or running before you download anything. See [dcd status](../cli/dcd-status.md#polling-an-async-run) for an example. + +### GitHub Actions Pattern + +In GitHub Actions, async mode is useful when you want to kick off tests and check results in a later step, while other CI work continues in parallel: + +```yaml +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - name: Build app + run: ./gradlew assembleDebug + + # Start tests immediately — don't wait for results + - uses: devicecloud-dev/device-cloud-for-maestro@v2 + id: dcd + with: + api-key: ${{ secrets.DCD_API_KEY }} + app-file: app/build/outputs/apk/debug/app-debug.apk + async: true + name: ${{ github.sha }} + + # Continue with other CI work while tests run in the background + - name: Run unit tests + run: ./gradlew test + + # Record where to find the results + - name: Record the console URL + run: echo "View results at: ${{ steps.dcd.outputs.DEVICE_CLOUD_CONSOLE_URL }}" +``` + +::: info +In async mode the Action doesn't wait for the run, so `DEVICE_CLOUD_UPLOAD_STATUS` is always `PENDING`, `DEVICE_CLOUD_FLOW_RESULTS` is `[]` and `DEVICE_CLOUD_APP_BINARY_ID` isn't set. For a pass/fail verdict, poll [`dcd status`](../cli/dcd-status.md#polling-an-async-run) or use the [DeviceCloud GitHub App](github-checks.md) check. +::: + +### Considerations + +- The console URL is available via the `DEVICE_CLOUD_CONSOLE_URL` action output so you can link to results from your CI summary. +- Retries (`--retry`) and async mode work together — DeviceCloud handles retries in the background. +- If you need the final pass/fail status in CI, poll with [`dcd status`](../cli/dcd-status.md#polling-an-async-run). +- With the [DeviceCloud GitHub App](github-checks.md) installed, an async run reports its result back as a pass/fail check on the pull request, so you don't have to poll for it yourself. diff --git a/cli/dcd-artifacts.md b/cli/dcd-artifacts.md index 0659064..70b9bdc 100644 --- a/cli/dcd-artifacts.md +++ b/cli/dcd-artifacts.md @@ -83,4 +83,4 @@ UPLOAD_ID=$(jq -r .uploadId results.json) dcd artifacts --upload-id "$UPLOAD_ID" --download-artifacts ALL ``` -See [Async Execution](../advanced/async-execution.md) and [Report Formats](../artifacts/report-formats.md) for more details. +See [Async execution](../ci-cd/overview.md#async-execution) and [Report formats](../artifacts/artifacts.md#report-formats) for more details. diff --git a/cli/dcd-cloud.md b/cli/dcd-cloud.md index 5e02114..5b24101 100644 --- a/cli/dcd-cloud.md +++ b/cli/dcd-cloud.md @@ -44,8 +44,8 @@ See [Authentication](../getting-started/api-keys.md) for the full picture. | `--android-api-level ` | Android API level | | `--ios-device ` | iOS device model to run on (see [Devices](../getting-started/devices-configuration.md)) | | `--ios-version ` | iOS version | -| `--device-locale ` | Device locale (see [Device Locale](../configuration/device-locale.md)) | -| `--orientation ` | Device orientation, `0` (portrait) or `90` (landscape). Android only (see [Orientation](../configuration/orientation.md)) | +| `--device-locale ` | Device locale (see [Locale](../configuration/device-settings.md#locale)) | +| `--orientation ` | Device orientation, `0` (portrait) or `90` (landscape). Android only (see [Orientation](../configuration/device-settings.md#orientation)) | | `--google-play` | Use a Google Play-enabled device. Android only (see [Google Play APIs](../configuration/google-play-apis.md)) | | `--runner-type ` | Runner type to use: `default` (the default), `cpu1`, `m1` or `m4` (see [Runner Types](../configuration/runner-type.md)) | | `--render-engine ` | Android only. Software renderer the emulator boots with: `lavapipe` (default) or `swiftshader`. Try `swiftshader` if your app fails to render or the device drops out mid-run. Apps built with Flutter are detected and switched automatically | @@ -88,7 +88,7 @@ Attach Git and pull request metadata to a run. These values are displayed in the | Flag | Description | |------|-------------| -| `--maestro-chrome-onboarding` | Force Maestro-based Chrome onboarding. Slows tests but can fix browser-related crashes (see [Chrome Onboarding](../advanced/chrome-onboarding.md)) | +| `--maestro-chrome-onboarding` | Force Maestro-based Chrome onboarding. Slows tests but can fix browser-related crashes (see [Chrome onboarding](../configuration/device-settings.md#chrome-onboarding)) | | `--android-no-snapshot` | Force a cold boot instead of a snapshot boot on the standard Android runner. Automatically enabled for API 34+ | | `--show-crosshairs` | Display crosshairs for screen interactions during test execution | @@ -96,13 +96,13 @@ Attach Git and pull request metadata to a run. These values are displayed in the | Flag | Description | |------|-------------| -| `--disable-animations` | Disable device animations during test execution. On Android, disables system animation scales. On iOS, enables Reduce Motion. Overrides `disableAnimations` in `config.yaml`, and `--no-disable-animations` keeps animations on even when `config.yaml` turns them off (see [Animations](../configuration/disable-animations.md)) | +| `--disable-animations` | Disable device animations during test execution. On Android, disables system animation scales. On iOS, enables Reduce Motion. Overrides `disableAnimations` in `config.yaml`, and `--no-disable-animations` keeps animations on even when `config.yaml` turns them off (see [Animations](../configuration/device-settings.md#animations)) | ### Output & Execution | Flag | Description | |------|-------------| -| `--async` | Submit tests and return immediately (exit `0`) without waiting for results. `--download-artifacts` and `--report` do nothing with `--async`: download them later with [`dcd artifacts`](dcd-artifacts.md) (see [Async Execution](../advanced/async-execution.md)) | +| `--async` | Submit tests and return immediately (exit `0`) without waiting for results. `--download-artifacts` and `--report` do nothing with `--async`: download them later with [`dcd artifacts`](dcd-artifacts.md) (see [Async execution](../ci-cd/overview.md#async-execution)) | | `--cancel-previous` | Cancel the still-queued tests of the previous run from the same CI context. Needs a repository plus a branch or PR: `--repo-name` with `--branch` or `--pr-number`, or the same values as `--metadata gh_repo=…` with `gh_branch=…` or `gh_pr_number=…` (see [Cancelling superseded runs](../advanced/cancel-previous.md)) | | `--priority ` | `low`, `normal` (default) or `high`. Reorders only your team's own queued runs (see [Run Priority](../configuration/run-priority.md)) | | `--quiet`, `-q` | Suppress per-test progress; print only the final summary | @@ -110,7 +110,7 @@ Attach Git and pull request metadata to a run. These values are displayed in the | `--json-file` | Write JSON results to a file (`_dcd.json` by default). Exits `0` even if the test run fails; infrastructure errors still exit `1`. Also turns on `--quiet` | | `--json-file-name ` | Custom name (or relative path) for the JSON file. Requires `--json-file` | | `--dry-run` | Simulate the run without uploading or triggering a test — useful for debugging workflow issues | -| `--report `, `--format` | Generate and download a report. Options: `junit`, `html`, `html-detailed`, `allure`. `html-detailed` and `allure` are deprecated, and we're targeting their removal on 7 December 2026. After that, runs that pass them still run (see [Report Formats](../artifacts/report-formats.md)) | +| `--report `, `--format` | Generate and download a report. Options: `junit`, `html`, `html-detailed`, `allure`. `html-detailed` and `allure` are deprecated, and we're targeting their removal on 7 December 2026. After that, runs that pass them still run (see [Report formats](../artifacts/artifacts.md#report-formats)) | | `--junit-path ` | Output path for the JUnit report (requires `--report junit`) | | `--html-path ` | Output path for the HTML report (requires `--report html` or `html-detailed`). The HTML report downloads as a ZIP, so use a `.zip` path such as `./report.zip` | | `--allure-path ` | Output path for the Allure report (requires `--report allure`). Deprecated, along with `allure` | diff --git a/cli/dcd-status.md b/cli/dcd-status.md index c3e9b9b..50c1557 100644 --- a/cli/dcd-status.md +++ b/cli/dcd-status.md @@ -150,7 +150,7 @@ jobs: echo "$RESULT" | jq -e '.status == "PASSED" or .supersededBy != null' > /dev/null ``` -See [Async Execution](../advanced/async-execution.md) for more patterns. +See [Async execution](../ci-cd/overview.md#async-execution) for more patterns. ## Underlying API diff --git a/cli/overview.md b/cli/overview.md index d592966..63f5d09 100644 --- a/cli/overview.md +++ b/cli/overview.md @@ -2,7 +2,7 @@ The dcd CLI is the primary way to interact with DeviceCloud from your terminal or CI/CD pipeline. It is a drop-in replacement for `maestro cloud` — in most cases you can swap `maestro cloud` for `dcd cloud`. -The CLI is published as `@devicecloud.dev/dcd` on npm and as a standalone binary. Both include `dcd mcp`, an [MCP server](../mcp/connect.md) that lets AI agents run cloud tests and read their results. The npm package also ships `dcd-mcp`, the [older MCP server](../mcp/overview.md). +The CLI is published as `@devicecloud.dev/dcd` on npm and as a standalone binary. Both include `dcd mcp`, an [MCP server](../mcp/connect.md) that lets AI agents run cloud tests and read their results. ## Installation diff --git a/configuration/device-datetime.md b/configuration/device-datetime.md deleted file mode 100644 index 1d01ec0..0000000 --- a/configuration/device-datetime.md +++ /dev/null @@ -1,50 +0,0 @@ -# Device Date & Time - -Run a flow with the device clock set to a chosen date and time, useful for testing expiry logic, subscription renewals, time-gated features, free-trial countdowns, or other date-specific UI (birthdays, holidays, "new this week" etc). - -By default, a run uses the real current time. Our Android runners use UTC, and our iOS runners use UK time (GMT, or BST in summer). - -## Usage - -To set the time for a flow, set a [per-flow override](per-flow-overrides.md) in the flow's YAML. The value is an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time string. There's no `dcd cloud` flag for this, so it's set per flow. - -```yaml -# in your test.yaml -appId: my.app -env: - DEVICECLOUD_OVERRIDE_DEVICE_DATETIME: "2030-01-01T09:00:00Z" - DEVICECLOUD_OVERRIDE_DEVICE_TIMEZONE: "America/New_York" # optional ---- -# test steps -``` - -* `DEVICECLOUD_OVERRIDE_DEVICE_DATETIME` — target date/time, ISO 8601 (e.g. `2030-01-01T09:00:00Z`). -* `DEVICECLOUD_OVERRIDE_DEVICE_TIMEZONE` — optional [IANA timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) (e.g. `Europe/London`). Android only, and only applied together with `DEVICECLOUD_OVERRIDE_DEVICE_DATETIME`. Setting it needs a rootable image, so it isn't available on [Google Play](google-play-apis.md) images. - -If the value can't be parsed, it is ignored and the flow runs with the default -(real) time. - -Due to platform limitations, this behaves very differently on Android and iOS. -On Android it sets the real device clock, so the app sees the new time. -On iOS it only changes the cosmetic status-bar clock — the app's own `Date()` is unaffected as iOS simulators share their host kernel. Read the platform notes below before relying on it. - -## Android - -Sets the real emulator clock, so `Date.now()`, `System.currentTimeMillis()`, date pickers, and anything else the app reads all see the new time. Auto-time sync is disabled for the run so the value sticks. - -The override sets the clock the run starts with. The clock then ticks forward normally for the rest of the run; it isn't frozen. If you need time to stand still, drive it from within your app or test instead. - -::: info -This is not available on Google Play images. [Google Play](google-play-apis.md) emulators are not rootable, so the clock cannot be set. Google Play flows will log a warning and continue on real time. Use the standard image if you need the date/time override. -::: - -## iOS - -iOS simulators read the host machine's clock and there is no per-simulator API to change it, so: - -* The app's `Date()` / `NSDate` is not changed — your app logic will still see the real time. iOS cannot time-travel app code. -* DeviceCloud applies a cosmetic status-bar time only via the simulator status-bar override. -* The status bar shows the hour and minute of the requested time in UTC, so write the value with a `Z` suffix (e.g. `2030-01-01T09:30:00Z` shows `9:30`). `DEVICECLOUD_OVERRIDE_DEVICE_TIMEZONE` is ignored on iOS. -* Apple's tooling only accepts whole `HH:MM` times and rejects a zero minute, so a requested time on the hour (e.g. `09:00`) is shown as `9:01`, and midnight (`00:xx` UTC) is left at the real time. - -If you need real time-travel on iOS, control the date from inside your app (e.g. a debug/launch argument) rather than relying on this override. diff --git a/configuration/device-locale.md b/configuration/device-locale.md deleted file mode 100644 index aedc293..0000000 --- a/configuration/device-locale.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -description: "Set the device's language and region for a whole upload with --device-locale, or for one flow, plus the locale format, the defaults and common locales." ---- - -# Device Locale - -Set device language and region for localisation testing. - -::: info -If you don't set a locale, Android runs use `en_US` and iOS runs use `en_GB`. Pass `--device-locale` to get the same locale on both. -::: - -## Format - -`{language_code}_{COUNTRY_CODE}` - -* Language: ISO-639 (two or three lowercase letters) -* Country: ISO-3166-1 (two uppercase letters) - -The underscore is required: use `de_DE`, not `de-DE`. - -::: warning -The locale isn't checked when you submit a run, only when the device is prepared. If it doesn't match this format: - -* **Android:** the error is logged and the test runs in the default locale. -* **iOS:** the device can't be prepared, so the test is retried and eventually fails. -::: - -## Usage - -To set locale for the whole upload: - -```bash -# German -dcd cloud ... --device-locale de_DE - -# With device selection -dcd cloud ... --android-device pixel-6 --device-locale ja_JP -``` - -To override the locale for a single test, set a [per-flow override](per-flow-overrides.md) in its `env:` block. It overrides the upload setting above, for that test only: - -```yaml -# in your test.yaml -appId: my.app -env: - DEVICECLOUD_OVERRIDE_DEVICE_LOCALE: de_DE ---- -# test steps -``` - -## Common Locales - -### European - -* `en_GB`: English (UK) -* `de_DE`: German -* `fr_FR`: French -* `it_IT`: Italian - -### Asian - -* `zh_CN`: Chinese -* `ja_JP`: Japanese -* `ko_KR`: Korean - -### RTL - -* `ar_SA`: Arabic -* `he_IL`: Hebrew diff --git a/configuration/device-matrix.md b/configuration/device-matrix.md index b1bbc65..45ef1ae 100644 --- a/configuration/device-matrix.md +++ b/configuration/device-matrix.md @@ -86,6 +86,6 @@ Without `--async` the run waits for **every** device and exits `0` only if all o - One platform per upload. An upload runs one app binary, so `--ios-device-matrix` and `--android-device-matrix` cannot be combined in the same run. -- A flow that names its own device wins. If a flow targets a device in its YAML via [per-flow devices](per-flow-devices.md), it runs once on that device and is excluded from the matrix. Ten flows across four devices with one targeted flow is 37 runs, not 40. +- A flow that names its own device wins. If a flow targets a device in its YAML via a [per-flow override](per-flow-overrides.md#pin-a-flow-to-a-device), it runs once on that device and is excluded from the matrix. Ten flows across four devices with one targeted flow is 37 runs, not 40. - A flow that sets its own [runner type](runner-type.md#overriding-the-runner-type-for-a-single-flow) is not excluded. It still runs on every device in the matrix, on that runner type. \ No newline at end of file diff --git a/configuration/device-settings.md b/configuration/device-settings.md new file mode 100644 index 0000000..9720a9e --- /dev/null +++ b/configuration/device-settings.md @@ -0,0 +1,254 @@ +--- +description: "Settings DeviceCloud applies to the device before a flow runs: animations, locale, date and time, orientation and Chrome onboarding." +--- + +# Device Settings + +These settings are applied to the device before a flow runs. Each section says whether you set it for the whole upload with a `dcd cloud` flag, for one flow with a [per-flow override](per-flow-overrides.md), or both. + +## Animations + +You can turn off device animations during a test run. On Android this works by zeroing the three +system animation scales (`window`, `transition`, `animator`) via adb. On iOS this +enables the **Reduce Motion** accessibility setting. + +### Turning animations off + +#### Whole upload + +Pass the flag on `dcd cloud`: + +```bash +dcd cloud ... --disable-animations +``` + +Or set it once in the workspace `config.yaml`, separately for each platform: + +```yaml +platform: + android: + disableAnimations: true + ios: + disableAnimations: true +``` + +The CLI reads the block for your app's platform: `platform.android` for an `.apk`, and `platform.ios` for an `.app`, `.zip` or Expo `.tar.gz` build. With `--app-binary-id` it can't see the app, so it uses `platform.ios` only when you pass `--ios-device`, `--ios-version` or `--ios-device-matrix`, and `platform.android` otherwise. + +A flag on `dcd cloud` beats `config.yaml`. To keep animations on for a run, even where `config.yaml` turns them off, pass `--no-disable-animations`: + +```bash +dcd cloud ... --no-disable-animations +``` + +#### Per test (both platforms) + +Override the upload-wide setting for a single flow with a [per-flow override](per-flow-overrides.md): + +```yaml +# in your test.yaml +appId: my.app +env: + DEVICECLOUD_OVERRIDE_DISABLE_ANIMATIONS: true +--- +# test steps +``` + +#### Per test, platform-specific + +When the same flow YAML runs on both Android and iOS, you can target each platform +independently. Use this when animations cause problems on one platform but you want +them on for the other (for example, animations off on Android to fix scroll/tap +flakiness, but on for iOS where Reduce Motion changes app appearance): + +```yaml +# in your test.yaml +appId: my.app +env: + DEVICECLOUD_OVERRIDE_ANDROID_DISABLE_ANIMATIONS: true + DEVICECLOUD_OVERRIDE_IOS_DISABLE_ANIMATIONS: false +--- +# test steps +``` + +The other platform's key is ignored — only the one matching the run's platform is +consulted. + +### Precedence + +When more than one is set, the most specific wins: + +1. `DEVICECLOUD_OVERRIDE__DISABLE_ANIMATIONS` (per test, this platform) +2. `DEVICECLOUD_OVERRIDE_DISABLE_ANIMATIONS` (per test, both platforms) +3. `--disable-animations` or `--no-disable-animations` on `dcd cloud` (whole upload) +4. `disableAnimations` in `config.yaml`, for the run's platform (whole upload) +5. Default: animations are **on** + +A `false` override is honoured the same as `true` — a test can opt out even when the +upload-wide flag is set. + +## Locale + +Set device language and region for localisation testing. + +::: info +If you don't set a locale, Android runs use `en_US` and iOS runs use `en_GB`. Pass `--device-locale` to get the same locale on both. +::: + +### Format + +`{language_code}_{COUNTRY_CODE}` + +* Language: ISO-639 (two or three lowercase letters) +* Country: ISO-3166-1 (two uppercase letters) + +The underscore is required: use `de_DE`, not `de-DE`. + +::: warning +The locale isn't checked when you submit a run, only when the device is prepared. If it doesn't match this format: + +* **Android:** the error is logged and the test runs in the default locale. +* **iOS:** the device can't be prepared, so the test is retried and eventually fails. +::: + +### Setting the locale + +To set locale for the whole upload: + +```bash +# German +dcd cloud ... --device-locale de_DE + +# With device selection +dcd cloud ... --android-device pixel-6 --device-locale ja_JP +``` + +To override the locale for a single test, set a [per-flow override](per-flow-overrides.md) in its `env:` block. It overrides the upload setting above, for that test only: + +```yaml +# in your test.yaml +appId: my.app +env: + DEVICECLOUD_OVERRIDE_DEVICE_LOCALE: de_DE +--- +# test steps +``` + +### Common locales + +#### European + +* `en_GB`: English (UK) +* `de_DE`: German +* `fr_FR`: French +* `it_IT`: Italian + +#### Asian + +* `zh_CN`: Chinese +* `ja_JP`: Japanese +* `ko_KR`: Korean + +#### RTL + +* `ar_SA`: Arabic +* `he_IL`: Hebrew + +## Date and time + +Run a flow with the device clock set to a chosen date and time, useful for testing expiry logic, subscription renewals, time-gated features, free-trial countdowns, or other date-specific UI (birthdays, holidays, "new this week" etc). + +By default, a run uses the real current time. Our Android runners use UTC, and our iOS runners use UK time (GMT, or BST in summer). + +### Setting the date and time + +To set the time for a flow, set a [per-flow override](per-flow-overrides.md) in the flow's YAML. The value is an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time string. There's no `dcd cloud` flag for this, so it's set per flow. + +```yaml +# in your test.yaml +appId: my.app +env: + DEVICECLOUD_OVERRIDE_DEVICE_DATETIME: "2030-01-01T09:00:00Z" + DEVICECLOUD_OVERRIDE_DEVICE_TIMEZONE: "America/New_York" # optional +--- +# test steps +``` + +* `DEVICECLOUD_OVERRIDE_DEVICE_DATETIME` — target date/time, ISO 8601 (e.g. `2030-01-01T09:00:00Z`). +* `DEVICECLOUD_OVERRIDE_DEVICE_TIMEZONE` — optional [IANA timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) (e.g. `Europe/London`). Android only, and only applied together with `DEVICECLOUD_OVERRIDE_DEVICE_DATETIME`. Setting it needs a rootable image, so it isn't available on [Google Play](google-play-apis.md) images. + +If the value can't be parsed, it is ignored and the flow runs with the default +(real) time. + +Due to platform limitations, this behaves very differently on Android and iOS. +On Android it sets the real device clock, so the app sees the new time. +On iOS it only changes the cosmetic status-bar clock — the app's own `Date()` is unaffected as iOS simulators share their host kernel. Read the platform notes below before relying on it. + +### Android + +Sets the real emulator clock, so `Date.now()`, `System.currentTimeMillis()`, date pickers, and anything else the app reads all see the new time. Auto-time sync is disabled for the run so the value sticks. + +The override sets the clock the run starts with. The clock then ticks forward normally for the rest of the run; it isn't frozen. If you need time to stand still, drive it from within your app or test instead. + +::: info +This is not available on Google Play images. [Google Play](google-play-apis.md) emulators are not rootable, so the clock cannot be set. Google Play flows will log a warning and continue on real time. Use the standard image if you need the date/time override. +::: + +### iOS + +iOS simulators read the host machine's clock and there is no per-simulator API to change it, so: + +* The app's `Date()` / `NSDate` is not changed — your app logic will still see the real time. iOS cannot time-travel app code. +* DeviceCloud applies a cosmetic status-bar time only via the simulator status-bar override. +* The status bar shows the hour and minute of the requested time in UTC, so write the value with a `Z` suffix (e.g. `2030-01-01T09:30:00Z` shows `9:30`). `DEVICECLOUD_OVERRIDE_DEVICE_TIMEZONE` is ignored on iOS. +* Apple's tooling only accepts whole `HH:MM` times and rejects a zero minute, so a requested time on the hour (e.g. `09:00`) is shown as `9:01`, and midnight (`00:xx` UTC) is left at the real time. + +If you need real time-travel on iOS, control the date from inside your app (e.g. a debug/launch argument) rather than relying on this override. + +## Orientation + +Control Android device orientation during test execution. + +::: info +Android only. `--orientation` is ignored on iOS, where devices stay in portrait. +::: + +### Options + +* `0`: Portrait (default) +* `90`: Landscape + +Only `0` and `90` are accepted. The legacy `180` and `270` values are rejected. + +::: info +Generic Tablet starts in landscape, so on it `0` (and the default) is landscape and `90` is portrait. +::: + +### Setting the orientation + +```bash +# Portrait +dcd cloud ... --orientation 0 + +# Landscape +dcd cloud ... --orientation 90 +``` + +## Chrome onboarding + +Chrome Onboarding pre-configures Chrome browser settings before your tests run on Android devices, ensuring that first-run dialogs don't interfere with test execution. + +### Onboarding methods + +By default we use a config-based Chrome onboarding which adds minimal overhead and works for most scenarios. + +If config-based onboarding can't be confirmed on the device, we automatically switch to Maestro-based onboarding, which runs a Maestro flow that opens Chrome and taps through its first-run screens. It's more thorough, but it adds significant overhead, because the flow runs on the device before your test. + +If Maestro-based onboarding fails, the test goes back in the queue to start again on a fresh device. This doesn't use up a [retry](../advanced/retry-strategies.md) and isn't charged. If onboarding still fails on the last attempt, the test starts anyway, and the test's log notes that Chrome may show its welcome screen first. + +### Forcing Maestro-based onboarding + +If you're experiencing issues with Chrome, you can force Maestro-based onboarding using the CLI flag `--maestro-chrome-onboarding`. + +::: warning +Maestro-based onboarding **will slow your test suite down**. We only recommend it if you're having issues with the default config-based method. +::: diff --git a/configuration/disable-animations.md b/configuration/disable-animations.md deleted file mode 100644 index 6405605..0000000 --- a/configuration/disable-animations.md +++ /dev/null @@ -1,79 +0,0 @@ -# Animations - -You can turn off device animations during a test run. On Android this works by zeroing the three -system animation scales (`window`, `transition`, `animator`) via adb. On iOS this -enables the **Reduce Motion** accessibility setting. - -## Usage - -### Whole upload - -Pass the flag on `dcd cloud`: - -```bash -dcd cloud ... --disable-animations -``` - -Or set it once in the workspace `config.yaml`, separately for each platform: - -```yaml -platform: - android: - disableAnimations: true - ios: - disableAnimations: true -``` - -The CLI reads the block for your app's platform: `platform.android` for an `.apk`, and `platform.ios` for an `.app`, `.zip` or Expo `.tar.gz` build. With `--app-binary-id` it can't see the app, so it uses `platform.ios` only when you pass `--ios-device`, `--ios-version` or `--ios-device-matrix`, and `platform.android` otherwise. - -A flag on `dcd cloud` beats `config.yaml`. To keep animations on for a run, even where `config.yaml` turns them off, pass `--no-disable-animations`: - -```bash -dcd cloud ... --no-disable-animations -``` - -### Per test (both platforms) - -Override the upload-wide setting for a single flow with a [per-flow override](per-flow-overrides.md): - -```yaml -# in your test.yaml -appId: my.app -env: - DEVICECLOUD_OVERRIDE_DISABLE_ANIMATIONS: true ---- -# test steps -``` - -### Per test, platform-specific - -When the same flow YAML runs on both Android and iOS, you can target each platform -independently. Use this when animations cause problems on one platform but you want -them on for the other (for example, animations off on Android to fix scroll/tap -flakiness, but on for iOS where Reduce Motion changes app appearance): - -```yaml -# in your test.yaml -appId: my.app -env: - DEVICECLOUD_OVERRIDE_ANDROID_DISABLE_ANIMATIONS: true - DEVICECLOUD_OVERRIDE_IOS_DISABLE_ANIMATIONS: false ---- -# test steps -``` - -The other platform's key is ignored — only the one matching the run's platform is -consulted. - -## Precedence - -When more than one is set, the most specific wins: - -1. `DEVICECLOUD_OVERRIDE__DISABLE_ANIMATIONS` (per test, this platform) -2. `DEVICECLOUD_OVERRIDE_DISABLE_ANIMATIONS` (per test, both platforms) -3. `--disable-animations` or `--no-disable-animations` on `dcd cloud` (whole upload) -4. `disableAnimations` in `config.yaml`, for the run's platform (whole upload) -5. Default: animations are **on** - -A `false` override is honoured the same as `true` — a test can opt out even when the -upload-wide flag is set. diff --git a/configuration/foldable-devices.md b/configuration/foldable-devices.md index 86797b7..802edee 100644 --- a/configuration/foldable-devices.md +++ b/configuration/foldable-devices.md @@ -7,7 +7,7 @@ DeviceCloud runs two foldables: the **iPhone Duo** on iOS 27 and the **Pixel 10 | iPhone Duo | `--ios-device iphone-duo --ios-version 27` | `closed`, on the cover screen | `closed`, `book`, `open` | cover 1398 x 2034, plus the larger inner screen | | Pixel 10 Pro Fold | `--android-device pixel-10-pro-fold --android-api-level 36` | `open`, on the inner screen | `closed`, `half`, `open` | inner 2076 x 2152, cover 1080 x 2364 | -A single flow can also name a foldable with [per-flow devices](per-flow-devices.md), for example `DEVICECLOUD_OVERRIDE_IOS_DEVICE: iphone-duo` with `DEVICECLOUD_OVERRIDE_IOS_VERSION: "27"`. +A single flow can also name a foldable with a [per-flow override](per-flow-overrides.md#pin-a-flow-to-a-device), for example `DEVICECLOUD_OVERRIDE_IOS_DEVICE: iphone-duo` with `DEVICECLOUD_OVERRIDE_IOS_VERSION: "27"`. ## Device control from a flow diff --git a/configuration/google-play-apis.md b/configuration/google-play-apis.md index c78a1d3..90f501b 100644 --- a/configuration/google-play-apis.md +++ b/configuration/google-play-apis.md @@ -67,7 +67,7 @@ dcd cloud ... --google-play --android-device pixel-8 --android-api-level 34 If you pass only one of them, DeviceCloud picks the other so the pair has a Google Play image: a device runs on its Google Play API level, and an API level runs on a Google Play device that offers it. If you pass neither, the run uses the default Android device, Pixel 10 on API 36, which has a Google Play image. A device with no Google Play image, or an API level no Google Play device offers, is rejected. -If only some flows opt in with `DEVICECLOUD_OVERRIDE_GOOGLE_PLAY`, those flows are resolved the same way, from the device and API level the flow names, then the ones the upload names. A flow that opts in runs on Pixel 10 on API 36 when neither the flow nor the upload names a device or API level. To choose the device, pin it on the upload, or on those flows with [per-flow devices](per-flow-devices.md). +If only some flows opt in with `DEVICECLOUD_OVERRIDE_GOOGLE_PLAY`, those flows are resolved the same way, from the device and API level the flow names, then the ones the upload names. A flow that opts in runs on Pixel 10 on API 36 when neither the flow nor the upload names a device or API level. To choose the device, pin it on the upload, or on those flows with a [per-flow override](per-flow-overrides.md#pin-a-flow-to-a-device). ## Moving to Apple Silicon (`m1`) @@ -98,6 +98,6 @@ env: * **Devices.** Google Play on `m1` runs on `pixel-8` (API `34`) and `pixel-10` (API `36`, `37`). Pixel 7 isn't offered on `m1`, because it's deprecated. * **Concurrency.** Google Play runs on `m1` count towards your `m1` limit, not your `cpu1` limit. [Concurrency Protection](../getting-started/concurrency-and-parallel-runs.md) doesn't cover `m1`. -Google Play images work the same way on both runner types: they come with Google Play Services and the Play Store, the price is the same, and they can't be rooted, so the [device date and time override](device-datetime.md) isn't applied. +Google Play images work the same way on both runner types: they come with Google Play Services and the Play Store, the price is the same, and they can't be rooted, so the [device date and time override](device-settings.md#date-and-time) isn't applied. Please contact support if you would like more device/API availability. diff --git a/configuration/orientation.md b/configuration/orientation.md deleted file mode 100644 index 5b91da7..0000000 --- a/configuration/orientation.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -description: "Run Android tests in portrait or landscape with --orientation, and the values it accepts. iOS devices stay in portrait." ---- - -# Device Orientation - -Control Android device orientation during test execution. - -::: info -Android only. `--orientation` is ignored on iOS, where devices stay in portrait. -::: - -## Options - -* `0`: Portrait (default) -* `90`: Landscape - -Only `0` and `90` are accepted. The legacy `180` and `270` values are rejected. - -::: info -Generic Tablet starts in landscape, so on it `0` (and the default) is landscape and `90` is portrait. -::: - -## Usage - -```bash -# Portrait -dcd cloud ... --orientation 0 - -# Landscape -dcd cloud ... --orientation 90 -``` diff --git a/configuration/per-flow-devices.md b/configuration/per-flow-devices.md deleted file mode 100644 index ea5040c..0000000 --- a/configuration/per-flow-devices.md +++ /dev/null @@ -1,69 +0,0 @@ -# Per-flow Devices - -By default every flow in an upload runs on the same device, set by the `--ios-device`, -`--ios-version`, `--android-device` and `--android-api-level` flags on `dcd cloud`. - -Sometimes a single flow only matters on one device: for example, a flow you must verify on a -tablet, or a flow that has to work on your oldest supported OS. Rather than running -a separate upload per flow, a flow can declare the device it needs directly in its YAML. - -A flow that declares a device runs as normal on that device. Flows that declare -nothing inherit the upload's device. Your run count does not change. - -## Usage - -Set the device in the flow's `env:` block, like the other [per-flow overrides](per-flow-overrides.md). Supported devices and OS versions are listed in [Devices & OS Versions](../getting-started/devices-configuration.md). - -### iOS - -```yaml -# checkout-tablet.yaml -appId: my.app -env: - DEVICECLOUD_OVERRIDE_IOS_DEVICE: ipad-pro-m5-13 - DEVICECLOUD_OVERRIDE_IOS_VERSION: "26" ---- -# test steps -``` - -### Android - -```yaml -# onboarding-oldest-os.yaml -appId: my.app -env: - DEVICECLOUD_OVERRIDE_ANDROID_DEVICE: pixel-6 - DEVICECLOUD_OVERRIDE_ANDROID_API_LEVEL: "32" ---- -# test steps -``` - -Either key may be set on its own. A flow that sets only `DEVICECLOUD_OVERRIDE_IOS_DEVICE` -keeps the upload's iOS version, and vice versa. - -## Precedence - -1. `DEVICECLOUD_OVERRIDE_*` in the flow's YAML (per test) -2. The upload-wide `--ios-device` / `--ios-version` / `--android-device` / `--android-api-level` flags -3. Default: iPhone 16 on iOS 26, or Pixel 10 on API level 36 (see [Default Devices](../getting-started/devices-configuration.md#default-devices)) - -## Billing - -Each flow still runs once, so your total run count is unchanged. What can change is a flow's -**rate**: iPad, iPhone Duo, Generic Tablet, Pixel 10 Pro Fold and Google Play flows are charged at our advanced rate as per our -[pricing](../billing/test-run-billing.md). Targeting an iPad from one flow in an otherwise -iPhone upload charges that one flow at the advanced rate, and the rest at the standard rate. - -## Rules - -- Device and OS must be a supported combination, including Google Play if applicable. - -- You cannot target across platforms in the same upload. - -- On the `m1` [runner type](runner-type.md), a flow's device must be on API level 34 to 37. Google Play is available only on `pixel-8` (API 34) and `pixel-10` (API 36, 37), and Generic Tablet isn't available. - -## Running a suite across several devices - -Per-flow targeting picks a device for *one* flow. To run your **entire** suite against several -devices, use a [device matrix](device-matrix.md) — every flow runs once per device, under a single -upload. \ No newline at end of file diff --git a/configuration/per-flow-overrides.md b/configuration/per-flow-overrides.md index f2a3eea..16b65ff 100644 --- a/configuration/per-flow-overrides.md +++ b/configuration/per-flow-overrides.md @@ -1,5 +1,5 @@ --- -description: "Every DEVICECLOUD_OVERRIDE_* key a flow can set in its env block to change its own device, runner type, locale, clock, animations or time limit." +description: "Pin one flow to its own device, plus every DEVICECLOUD_OVERRIDE_* key a flow can set in its env block to change its own device, runner type, locale, clock, animations or time limit." --- # Per-flow Overrides @@ -21,21 +21,93 @@ An override applies only to the flow that sets it. The other flows in the upload Overrides only work in a flow's `env:` block. Passed with `-e`, they're treated as ordinary variables and have no effect. +To run one flow on its own device, see [Pin a flow to a device](#pin-a-flow-to-a-device). [Keys](#keys) lists every override. + +## Pin a flow to a device + +By default every flow in an upload runs on the same device, set by the `--ios-device`, +`--ios-version`, `--android-device` and `--android-api-level` flags on `dcd cloud`. + +Sometimes a single flow only matters on one device: for example, a flow you must verify on a +tablet, or a flow that has to work on your oldest supported OS. Rather than running +a separate upload per flow, a flow can declare the device it needs directly in its YAML. + +A flow that declares a device runs as normal on that device. Flows that declare +nothing inherit the upload's device. Your run count does not change. + +### Usage + +Set the device in the flow's `env:` block, like the other [per-flow overrides](#keys). Supported devices and OS versions are listed in [Devices & OS Versions](../getting-started/devices-configuration.md). + +#### iOS + +```yaml +# checkout-tablet.yaml +appId: my.app +env: + DEVICECLOUD_OVERRIDE_IOS_DEVICE: ipad-pro-m5-13 + DEVICECLOUD_OVERRIDE_IOS_VERSION: "26" +--- +# test steps +``` + +#### Android + +```yaml +# onboarding-oldest-os.yaml +appId: my.app +env: + DEVICECLOUD_OVERRIDE_ANDROID_DEVICE: pixel-6 + DEVICECLOUD_OVERRIDE_ANDROID_API_LEVEL: "32" +--- +# test steps +``` + +Either key may be set on its own. A flow that sets only `DEVICECLOUD_OVERRIDE_IOS_DEVICE` +keeps the upload's iOS version, and vice versa. + +### Precedence + +1. `DEVICECLOUD_OVERRIDE_*` in the flow's YAML (per test) +2. The upload-wide `--ios-device` / `--ios-version` / `--android-device` / `--android-api-level` flags +3. Default: iPhone 16 on iOS 26, or Pixel 10 on API level 36 (see [Default Devices](../getting-started/devices-configuration.md#default-devices)) + +### Billing + +Each flow still runs once, so your total run count is unchanged. What can change is a flow's +**rate**: iPad, iPhone Duo, Generic Tablet, Pixel 10 Pro Fold and Google Play flows are charged at our advanced rate as per our +[pricing](../billing/test-run-billing.md). Targeting an iPad from one flow in an otherwise +iPhone upload charges that one flow at the advanced rate, and the rest at the standard rate. + +### Rules + +- Device and OS must be a supported combination, including Google Play if applicable. + +- You cannot target across platforms in the same upload. + +- On the `m1` [runner type](runner-type.md), a flow's device must be on API level 34 to 37. Google Play is available only on `pixel-8` (API 34) and `pixel-10` (API 36, 37), and Generic Tablet isn't available. + +### Running a suite across several devices + +Per-flow targeting picks a device for *one* flow. To run your **entire** suite against several +devices, use a [device matrix](device-matrix.md) — every flow runs once per device, under a single +upload. + ## Keys | Key | Values | What it does | Details | |-----|--------|--------------|---------| -| `DEVICECLOUD_OVERRIDE_IOS_DEVICE` | An iOS device, such as `ipad-pro-m5-13` | Runs the flow on this iOS device instead of the upload's | [Per-flow Devices](per-flow-devices.md) | -| `DEVICECLOUD_OVERRIDE_IOS_VERSION` | An iOS version, such as `"26"` | Runs the flow on this iOS version instead of the upload's | [Per-flow Devices](per-flow-devices.md) | -| `DEVICECLOUD_OVERRIDE_ANDROID_DEVICE` | An Android device, such as `pixel-6` | Runs the flow on this Android device instead of the upload's | [Per-flow Devices](per-flow-devices.md) | -| `DEVICECLOUD_OVERRIDE_ANDROID_API_LEVEL` | An API level, such as `"32"` | Runs the flow on this API level instead of the upload's | [Per-flow Devices](per-flow-devices.md) | +| `DEVICECLOUD_OVERRIDE_IOS_DEVICE` | An iOS device, such as `ipad-pro-m5-13` | Runs the flow on this iOS device instead of the upload's | [Pin a flow to a device](#pin-a-flow-to-a-device) | +| `DEVICECLOUD_OVERRIDE_IOS_VERSION` | An iOS version, such as `"26"` | Runs the flow on this iOS version instead of the upload's | [Pin a flow to a device](#pin-a-flow-to-a-device) | +| `DEVICECLOUD_OVERRIDE_ANDROID_DEVICE` | An Android device, such as `pixel-6` | Runs the flow on this Android device instead of the upload's | [Pin a flow to a device](#pin-a-flow-to-a-device) | +| `DEVICECLOUD_OVERRIDE_ANDROID_API_LEVEL` | An API level, such as `"32"` | Runs the flow on this API level instead of the upload's | [Pin a flow to a device](#pin-a-flow-to-a-device) | | `DEVICECLOUD_OVERRIDE_GOOGLE_PLAY` | `true` | Runs the flow on a Google Play image. `false` doesn't take a flow off `--google-play` | [Google Play APIs](google-play-apis.md#per-test) | | `DEVICECLOUD_OVERRIDE_RUNNER_TYPE` | A runner type, such as `m4` or `m1` | Runs the flow on this runner type instead of the upload's `--runner-type` | [Runner Types](runner-type.md#overriding-the-runner-type-for-a-single-flow) | -| `DEVICECLOUD_OVERRIDE_DEVICE_LOCALE` | A locale, such as `de_DE` | Sets the device's language and region instead of `--device-locale` | [Device Locale](device-locale.md#usage) | -| `DEVICECLOUD_OVERRIDE_DEVICE_DATETIME` | An ISO 8601 date-time, such as `"2030-01-01T09:00:00Z"` | Starts the flow with the device clock set to this time. On iOS, only the status-bar clock changes | [Device Date & Time](device-datetime.md) | -| `DEVICECLOUD_OVERRIDE_DEVICE_TIMEZONE` | An IANA time zone, such as `America/New_York` | Sets the time zone, together with `DEVICECLOUD_OVERRIDE_DEVICE_DATETIME`. Android only, and not on Google Play images | [Device Date & Time](device-datetime.md) | -| `DEVICECLOUD_OVERRIDE_DISABLE_ANIMATIONS` | `true` or `false` | Turns animations off (`true`) or keeps them on (`false`) for the flow, on both platforms | [Animations](disable-animations.md#per-test-both-platforms) | -| `DEVICECLOUD_OVERRIDE_ANDROID_DISABLE_ANIMATIONS` | `true` or `false` | The same, on Android only. Beats `DEVICECLOUD_OVERRIDE_DISABLE_ANIMATIONS` | [Animations](disable-animations.md#per-test-platform-specific) | -| `DEVICECLOUD_OVERRIDE_IOS_DISABLE_ANIMATIONS` | `true` or `false` | The same, on iOS only. Beats `DEVICECLOUD_OVERRIDE_DISABLE_ANIMATIONS` | [Animations](disable-animations.md#per-test-platform-specific) | +| `DEVICECLOUD_OVERRIDE_DEVICE_LOCALE` | A locale, such as `de_DE` | Sets the device's language and region instead of `--device-locale` | [Locale](device-settings.md#setting-the-locale) | +| `DEVICECLOUD_OVERRIDE_DEVICE_DATETIME` | An ISO 8601 date-time, such as `"2030-01-01T09:00:00Z"` | Starts the flow with the device clock set to this time. On iOS, only the status-bar clock changes | [Date and time](device-settings.md#date-and-time) | +| `DEVICECLOUD_OVERRIDE_DEVICE_TIMEZONE` | An IANA time zone, such as `America/New_York` | Sets the time zone, together with `DEVICECLOUD_OVERRIDE_DEVICE_DATETIME`. Android only, and not on Google Play images | [Date and time](device-settings.md#date-and-time) | +| `DEVICECLOUD_OVERRIDE_DISABLE_ANIMATIONS` | `true` or `false` | Turns animations off (`true`) or keeps them on (`false`) for the flow, on both platforms | [Animations](device-settings.md#per-test-both-platforms) | +| `DEVICECLOUD_OVERRIDE_ANDROID_DISABLE_ANIMATIONS` | `true` or `false` | The same, on Android only. Beats `DEVICECLOUD_OVERRIDE_DISABLE_ANIMATIONS` | [Animations](device-settings.md#per-test-platform-specific) | +| `DEVICECLOUD_OVERRIDE_IOS_DISABLE_ANIMATIONS` | `true` or `false` | The same, on iOS only. Beats `DEVICECLOUD_OVERRIDE_DISABLE_ANIMATIONS` | [Animations](device-settings.md#per-test-platform-specific) | | `DEVICECLOUD_OVERRIDE_EXTENDED_RUNTIME` | `true` | Gives the flow up to 20 minutes instead of 10, charged at 2× its rate | [Extended Runtime](extended-runtime.md) | | `DEVICECLOUD_OVERRIDE_DEVICE_CONTROL` | `"true"` | Starts a device-control server for the flow and sets `DCD_CONTROL_URL`. Foldable runs always have one | [Foldable Devices](foldable-devices.md#using-the-commands-on-other-devices) | diff --git a/configuration/run-priority.md b/configuration/run-priority.md index 977e172..a37618d 100644 --- a/configuration/run-priority.md +++ b/configuration/run-priority.md @@ -99,4 +99,4 @@ See [Any CI](../ci-cd/any-ci.md). ## AI agents -The [MCP server](../mcp/overview.md)'s `dcd_run_cloud_test` tool takes an optional `priority` parameter with the same values. See the [Tools Reference](../mcp/tools.md#dcd-run-cloud-test). +The [MCP server](../mcp/connect.md)'s `dcd_run_cloud_test` tool takes an optional `priority` parameter with the same values. See the [Cloud Test Tools](../mcp/tools.md#dcd-run-cloud-test). diff --git a/configuration/workspace-config.md b/configuration/workspace-config.md index dd896e6..99df394 100644 --- a/configuration/workspace-config.md +++ b/configuration/workspace-config.md @@ -150,7 +150,7 @@ platform: The CLI reads the block for your app's platform, which it works out from the app file. With `--app-binary-id` it can't see the app, so it uses `platform.ios` only when you pass `--ios-device`, `--ios-version` or `--ios-device-matrix`, and `platform.android` otherwise. -`--disable-animations` or `--no-disable-animations` on `dcd cloud` beats this setting, and a flow's own `DEVICECLOUD_OVERRIDE_*` setting beats both. See [Animations](disable-animations.md). +`--disable-animations` or `--no-disable-animations` on `dcd cloud` beats this setting, and a flow's own `DEVICECLOUD_OVERRIDE_*` setting beats both. See [Animations](device-settings.md#animations). ### `local` diff --git a/getting-started/deprecations.md b/getting-started/deprecations.md index 4458973..0dc6744 100644 --- a/getting-started/deprecations.md +++ b/getting-started/deprecations.md @@ -15,7 +15,7 @@ Removal dates are targets, subject to change based on usage. | Pixel 7 (`pixel-7`) | Android device | 23 November 2026 | `pixel-8` or `pixel-10` (`pixel-6` for API level 33). On Google Play, `pixel-8` keeps API level 34 | | iOS 17 | iOS version | 23 November 2026 | iOS 18, 26 or 27. iPhone 14 runs iOS 18 | | Maestro 2.2.0 | Maestro version | 23 November 2026 | 2.6.1 or newer | -| `html-detailed` and `allure` | Report formats | 7 December 2026 | `--report html` or `--report junit`. See [Report Formats](../artifacts/report-formats.md) for what happens to runs that still pass them | +| `html-detailed` and `allure` | Report formats | 7 December 2026 | `--report html` or `--report junit`. See [Report formats](../artifacts/artifacts.md#report-formats) for what happens to runs that still pass them | | iPhone 16 Pro (`iphone-16-pro`) | iOS device | 7 December 2026 | `iphone-16` (the default), `iphone-17`, `iphone-air`, `iphone-18-pro` or `iphone-18-pro-max` | | Google Play on `cpu1` | Runner type change | 14 December 2026 | Nothing: Google Play runs move to `m1` on their own. Test your app on `m1` first, see [Moving to Apple Silicon](../configuration/google-play-apis.md#moving-to-apple-silicon-m1) | diff --git a/getting-started/devices-configuration.md b/getting-started/devices-configuration.md index 44b693d..47a6cd1 100644 --- a/getting-started/devices-configuration.md +++ b/getting-started/devices-configuration.md @@ -129,7 +129,7 @@ The iPhone Duo starts folded, on its cover screen, and the Pixel 10 Pro Fold sta ## Targeting a single flow -The flags above set the device for the whole upload. When only one flow needs a particular device then that flow can name its own device in its YAML instead. See [Per-flow Devices](../configuration/per-flow-devices.md). +The flags above set the device for the whole upload. When only one flow needs a particular device then that flow can name its own device in its YAML instead. See [Pin a flow to a device](../configuration/per-flow-overrides.md#pin-a-flow-to-a-device). ## Running your suite across several devices diff --git a/mcp/connect.md b/mcp/connect.md index 91081be..70d0da6 100644 --- a/mcp/connect.md +++ b/mcp/connect.md @@ -4,13 +4,12 @@ description: "Connect Claude Code, Cursor, VS Code, Claude Desktop, Codex or ano # Connect an AI Agent -DeviceCloud has three [MCP](https://modelcontextprotocol.io) servers. Most setups need only `dcd mcp`, which this page sets up. +DeviceCloud has two [MCP](https://modelcontextprotocol.io) servers. Most setups need only `dcd mcp`, which this page sets up. | Server | Where it runs | What it serves | |---|---|---| | `dcd mcp` | On your machine or in CI, started by your MCP client. It comes with the [CLI](../cli/overview.md) | The `dcd_*` [cloud test tools](tools.md). Teams in the [Agent Devices](agent-devices.md) beta also get the device tools through it | | `https://api.devicecloud.dev/mcp` | Hosted by DeviceCloud. Your MCP client signs in through your browser | The device tools only, for teams in the Agent Devices beta. See [Connect your agent](agent-devices.md#connect-your-agent) | -| `dcd-mcp` | On your machine, from the npm package only | The `dcd_*` tools only. It's the [older server](overview.md): new setups use `dcd mcp` | `dcd mcp` lets an AI agent, such as Claude Code, Cursor, VS Code, Claude Desktop or Codex, run cloud tests and read their results. It works the same on your machine and headless, such as in CI. @@ -34,6 +33,10 @@ If your dcd has no `dcd mcp`, or `dcd mcp install` doesn't list your client, upd For Claude Code, Codex and VS Code, `dcd mcp install` runs the client's own command: `claude mcp add`, `codex mcp add` or `code --add-mcp`. For Claude Desktop and Cursor, it adds an entry to their config file and keeps everything else in it. In Claude Code, Codex, Claude Desktop and Cursor, it replaces an entry already named `devicecloud`, such as one for the hosted server. Restart the app afterwards. +::: info +Set up the older `dcd-mcp` command? Point your MCP client at `dcd mcp` instead: it serves the same tools. +::: + ## Headless, with an API key For an agent that runs without you, such as in CI or a script, sign in with an [API key](../getting-started/api-keys.md) instead of `dcd login`. Give it to the server as `DEVICE_CLOUD_API_KEY` in its environment. For example, for Claude Code in CI: @@ -127,7 +130,3 @@ If your team is in the [Agent Devices](agent-devices.md) beta, `dcd mcp` also se ## Read-only mode `dcd_run_cloud_test` starts a test run, which is billable. For an agent that should only look, add `--read-only` after `mcp` in the arguments, or set `DCD_MCP_READONLY=1`. The server then leaves out every tool that changes anything, including the device tools that start, drive or stop a device. `dcd_download_artifacts` stays, because it only writes files on your machine. - -## The older `dcd-mcp` server - -The npm package also has `dcd-mcp`, an older server with the same `dcd_*` tools but no device tools. `dcd mcp` covers it, so you only need `dcd-mcp` for a setup that already uses it. See [Older dcd-mcp Server](overview.md). diff --git a/mcp/overview.md b/mcp/overview.md deleted file mode 100644 index 4361cd9..0000000 --- a/mcp/overview.md +++ /dev/null @@ -1,82 +0,0 @@ -# Older dcd-mcp Server - -`dcd-mcp` is the older DeviceCloud MCP server. New setups use `dcd mcp`, the MCP server in the CLI: see [Connect an AI Agent](connect.md). - -`dcd-mcp` is a second binary in the `@devicecloud.dev/dcd` npm package. It serves the same `dcd_*` [cloud test tools](tools.md) as `dcd mcp`: list devices, submit cloud test runs, check their status and download artifacts. It doesn't serve the [Agent Devices](agent-devices.md) tools, and it has no `install` command. You only need it for a setup that already uses it. - -::: warning -We accept no liability for anything your agent may read or execute. LLMs are a new technology: use them with care and at your own risk. -::: - -## Setup - -Add the server to your MCP client's configuration. It runs over stdio through `npx`, which needs Node 22 or later: - -```jsonc -{ - "mcpServers": { - "devicecloud": { - "command": "npx", - "args": ["-y", "--package=@devicecloud.dev/dcd", "dcd-mcp"], - "env": { "DEVICE_CLOUD_API_KEY": "" } - } - } -} -``` - -The `--package=` form matters: it tells `npx` to run the package's `dcd-mcp` binary. Without it, `npx` runs the `dcd` CLI instead, which rejects `dcd-mcp` as an unknown command. - -::: info -`dcd-mcp` is in the npm package only, so it needs Node even if you installed the CLI with the binary installer. The standalone `dcd` binary has `dcd mcp` instead: see [Connect an AI Agent](connect.md). -::: - -## Authentication - -Auth is inherited from the CLI: - -- Set `DEVICE_CLOUD_API_KEY` in the server's `env` (as above) — **recommended**, **or** -- Run [`dcd login`](../cli/dcd-login.md) once and the server will pick up the stored session. - -When both are present, the environment variable wins. With a `dcd login` session, the server works in your active team, the one [`dcd switch-org`](../cli/dcd-login.md#dcd-switch-org) sets. After you switch teams, restart your MCP client: a running server can keep using the old team for up to an hour. - -Credentials are resolved lazily on the first tool call, not at startup — so your client can connect and enumerate the tools before you've supplied a key, and a bad credential surfaces as a tool error rather than a server that won't start. - -::: warning -A `dcd login` session ends 30 days after you log in, or after 7 days without use. The server refreshes the session while it runs, but once the session ends, every tool call fails with a message telling you to run `dcd login` again. The server picks up the new session on the next call, without a restart. Use an API key for servers that stay running. -::: - -## Tools - -The server exposes six tools. Five are read-only; `dcd_run_cloud_test` submits a run and is billable. - -| Tool | What it does | -|------|--------------| -| [`dcd_list_devices`](tools.md#dcd-list-devices) | Discover available devices, OS versions, and Maestro versions | -| [`dcd_list_runs`](tools.md#dcd-list-runs) | List recent test runs (filter by name/date, paginated) | -| [`dcd_get_status`](tools.md#dcd-get-status) | Get the status and per-test results of a run | -| [`dcd_download_artifacts`](tools.md#dcd-download-artifacts) | Download a run's artifacts zip, and optionally a report, to disk | -| [`dcd_get_team_settings`](tools.md#dcd-get-team-settings) | Read your team's settings: concurrency, test runtime, integrations and more | -| [`dcd_run_cloud_test`](tools.md#dcd-run-cloud-test) | Submit a flow to run on the cloud (**billable**) | - -See [Cloud Test Tools](tools.md) for every parameter, default, and return shape. - -## Read-only mode - -`dcd_run_cloud_test` consumes test credits, so it's annotated as a destructive/non-read-only tool so well-behaved clients can (and should) prompt before calling it. To hide it entirely (recommended for autonomous or untrusted agents), either: - -- pass `--read-only` in `args`, or -- set `DCD_MCP_READONLY=1` in `env`. - -The remaining tools are all read-only. A read-only server doesn't just refuse the tool — it never advertises it, so an agent can't attempt a billable run at all: - -```jsonc -{ - "mcpServers": { - "devicecloud": { - "command": "npx", - "args": ["-y", "--package=@devicecloud.dev/dcd", "dcd-mcp", "--read-only"], - "env": { "DEVICE_CLOUD_API_KEY": "" } - } - } -} -``` diff --git a/mcp/tools.md b/mcp/tools.md index 06c4e1b..c776958 100644 --- a/mcp/tools.md +++ b/mcp/tools.md @@ -1,6 +1,6 @@ # Cloud Test Tools -The `dcd_*` tools run Maestro tests in the cloud and read their results. [`dcd mcp`](connect.md) serves them, and so does the [older `dcd-mcp` server](overview.md). This page lists each tool's parameters and return shape. The tools that drive a cloud device are in [Agent Devices Tools](agent-devices-tools.md). +The `dcd_*` tools run Maestro tests in the cloud and read their results. [`dcd mcp`](connect.md) serves them. This page lists each tool's parameters and return shape. The tools that drive a cloud device are in [Agent Devices Tools](agent-devices-tools.md). All tools return pretty-printed JSON as their text payload. Failures come back as an error result the agent can read and react to — a failing tool never tears down the server, so an agent can recover and retry. @@ -55,7 +55,7 @@ Download a completed run's artifacts zip (videos, logs and screenshots) to local | `report` | `junit` \| `allure` \| `html` | Also download a formatted report of this type. `allure` is deprecated, see [Deprecations & Removals](../getting-started/deprecations.md) | | `reportPath` | string | Where to write the report (defaults by type: `report.xml` for `junit`, `report.zip` for `html`, `report.html` for `allure`). The `html` report is a ZIP. A relative path works as for `artifactsPath` | -Returns `{ uploadId, artifactsPath, reportPath, warnings }`. A **non-empty `warnings` array means a download could not be produced** — most often because the run has no results yet. An empty array means success. See [Artifacts & Downloads](../artifacts/artifacts.md) and [Report Formats](../artifacts/report-formats.md). +Returns `{ uploadId, artifactsPath, reportPath, warnings }`. A **non-empty `warnings` array means a download could not be produced** — most often because the run has no results yet. An empty array means success. See [Artifacts & Downloads](../artifacts/artifacts.md) and [Report formats](../artifacts/artifacts.md#report-formats). ## dcd_get_team_settings diff --git a/public/_redirects b/public/_redirects index 5e672cd..ee6f613 100644 --- a/public/_redirects +++ b/public/_redirects @@ -8,20 +8,46 @@ /welcome-to-devicecloud / 301 # MCP docs moved out of CLI Reference — the old URL is shared in Discord threads. -/cli-reference/mcp-server /ai-agents-and-mcp/older-dcd-mcp-server 301 +/cli-reference/mcp-server /ai-agents-and-mcp/connect-an-ai-agent 301 # Sidebar reorder (Nov 2026): the Devices section and the end of Advanced. Pages whose # old URL was their repo path are redirected by the build; these are the rest. /getting-started/devices-and-os-versions /devices/devices-and-os-versions 301 -/getting-started/deprecations-and-removals /devices/deprecations-and-removals 301 -/configuration/device-date-and-time /devices/device-date-and-time 301 -/configuration/animations /devices/animations 301 -/configuration/device-orientation /devices/device-orientation 301 +/getting-started/deprecations-and-removals /product-lifecycle/deprecations-and-removals 301 +/configuration/device-date-and-time /devices/device-settings#date-and-time 301 +/configuration/animations /devices/device-settings#animations 301 +/configuration/device-orientation /devices/device-settings#orientation 301 /configuration/runner-types /devices/runner-types 301 /advanced/cancelling-superseded-runs /ci-cd-integration/cancelling-superseded-runs 301 -/ai-agents-and-mcp/mcp-server /ai-agents-and-mcp/older-dcd-mcp-server 301 +/ai-agents-and-mcp/mcp-server /ai-agents-and-mcp/connect-an-ai-agent 301 /ai-agents-and-mcp/tools-reference /ai-agents-and-mcp/cloud-test-tools 301 # Old GitBook paths still linked from GitHub Action releases up to v2.7.2. /reference/maestro-versions /configuration/maestro-versions 301 -/reference/chrome-onboarding /devices/chrome-onboarding 301 +/reference/chrome-onboarding /devices/device-settings#chrome-onboarding 301 + +# Small pages merged into larger ones (Nov 2026). The build no longer redirects a +# deleted page's repo path, so each old URL is listed here, pointing at its section. +/devices/animations /devices/device-settings#animations 301 +/configuration/disable-animations /devices/device-settings#animations 301 +/devices/device-locale /devices/device-settings#locale 301 +/configuration/device-locale /devices/device-settings#locale 301 +/devices/device-date-and-time /devices/device-settings#date-and-time 301 +/configuration/device-datetime /devices/device-settings#date-and-time 301 +/devices/device-orientation /devices/device-settings#orientation 301 +/configuration/orientation /devices/device-settings#orientation 301 +/devices/chrome-onboarding /devices/device-settings#chrome-onboarding 301 +/advanced/chrome-onboarding /devices/device-settings#chrome-onboarding 301 +/devices/per-flow-devices /devices/per-flow-overrides#pin-a-flow-to-a-device 301 +/configuration/per-flow-devices /devices/per-flow-overrides#pin-a-flow-to-a-device 301 +/test-artifacts-and-reports/report-formats /test-artifacts-and-reports/artifacts-and-downloads#report-formats 301 +/artifacts/report-formats /test-artifacts-and-reports/artifacts-and-downloads#report-formats 301 +/security-and-compliance/it-security-policies /security-and-compliance/security-overview#it-security-policies 301 +/security/it-security-policies /security-and-compliance/security-overview#it-security-policies 301 +/ci-cd-integration/async-execution /ci-cd-integration/overview#async-execution 301 +/advanced/async-execution /ci-cd-integration/overview#async-execution 301 +/ai-agents-and-mcp/older-dcd-mcp-server /ai-agents-and-mcp/connect-an-ai-agent 301 +/mcp/overview /ai-agents-and-mcp/connect-an-ai-agent 301 + +# Deprecations & Removals moved to its own Product Lifecycle section (Nov 2026). +/devices/deprecations-and-removals /product-lifecycle/deprecations-and-removals 301 diff --git a/security/it-security-policies.md b/security/it-security-policies.md deleted file mode 100644 index 115aef0..0000000 --- a/security/it-security-policies.md +++ /dev/null @@ -1,20 +0,0 @@ -# IT Security Policies - -These are the internal security policies DeviceCloud follows to protect data and systems. - -You may request access to these policies by emailing support@devicecloud.dev. - -The policies available are: - -1. Acceptable Use Policy -2. Access Control Policy -3. Authentication and Password Policy -4. Backup Policy -5. Change Management Policy -6. Data Classification Policy -7. Data Retention and Disposal Policy -8. Encryption Policy -9. Human Resources Policy -10. Logging and Monitoring Policy -11. Security Incident Management Policy -12. Vendor Management Policy diff --git a/security/security-overview.md b/security/security-overview.md index 8f263f9..73b1a85 100644 --- a/security/security-overview.md +++ b/security/security-overview.md @@ -1,5 +1,5 @@ --- -description: "How DeviceCloud protects your data: security leadership, reporting a vulnerability, where data is held, encryption, sign-in and sessions, retention, payments and code control." +description: "How DeviceCloud protects your data: security leadership, reporting a vulnerability, where data is held, encryption, sign-in and sessions, retention, payments, code control and the IT security policies we follow." --- # Security Overview @@ -81,3 +81,24 @@ DeviceCloud uses Paddle, our Merchant of Record, to handle payments. You enter c ## Code Control All code and configurations deployed inside DeviceCloud undergo a thorough code control process, which includes security considerations. All code is written or reviewed by UK-based employees. + +## IT security policies + +These are the internal security policies DeviceCloud follows to protect data and systems. + +You may request access to these policies by emailing support@devicecloud.dev. + +The policies available are: + +1. Acceptable Use Policy +2. Access Control Policy +3. Authentication and Password Policy +4. Backup Policy +5. Change Management Policy +6. Data Classification Policy +7. Data Retention and Disposal Policy +8. Encryption Policy +9. Human Resources Policy +10. Logging and Monitoring Policy +11. Security Incident Management Policy +12. Vendor Management Policy