Skip to content

Commit 283ab68

Browse files
authored
docs: device matrix via --ios-config/--android-config (#1105) (#97)
* docs: device matrix via --ios-config/--android-config (#1105) Document running a whole suite across N devices in one upload with repeatable --ios-config/--android-config, replacing the shell-loop workaround. Covers the no-cross-product rule, one-platform-per-upload, flow-override precedence, the cost preview, and the --json device field. * docs: rename device-matrix flags to --ios-device-matrix/--android-device-matrix (#1105) Match the CLI rename. The branch is not merged yet, so this lands with the correct names and no stale --ios-config ever reaches the published docs. * docs: give the device matrix its own page (#1105) Move the device-matrix content out of 'Devices & OS Versions' into configuration/device-matrix.md, alongside Per-flow Devices in the nav — it is a feature in its own right (flags, cost model, result shape, rules), not a footnote to the device tables. - devices-configuration.md keeps the device/OS tables and now links out, instead of carrying the old 'submit one upload per device' shell loop, which the matrix replaces. - per-flow-devices.md's tail advised the same obsolete loop; it now points at the matrix and explains how the two compose (a flow that names its own device is excluded from the fan-out). - Fixes an 'inits YAML' typo carried over from main. * Proofread * Additional proofread
1 parent 49ffbf4 commit 283ab68

4 files changed

Lines changed: 96 additions & 24 deletions

File tree

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* [Environment Variables](configuration/environment-variables.md)
2727
* [Workspace Configuration](configuration/workspace-config.md)
2828
* [Per-flow Devices](configuration/per-flow-devices.md)
29+
* [Device Matrix](configuration/device-matrix.md)
2930
* [Device Locale](configuration/device-locale.md)
3031
* [Device Date & Time](configuration/device-datetime.md)
3132
* [Animations](configuration/disable-animations.md)

configuration/device-matrix.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Device Matrix
2+
3+
By default every flow in an upload runs on one device, set by the `--ios-device`,
4+
`--ios-version`, `--android-device` and `--android-api-level` flags on `dcd cloud`.
5+
6+
A **device matrix** runs your whole suite against several devices from a single `dcd cloud`
7+
invocation. Every flow runs once per device, all under one upload with one console entry.
8+
9+
## Usage
10+
11+
Pass `--ios-device-matrix <device>:<version>` (or `--android-device-matrix <device>:<apiLevel>`) once per device you want. Supported devices and operating systems are listed [here](../getting-started/devices-configuration.md).
12+
13+
### iOS
14+
15+
```bash
16+
dcd cloud --app-binary-id <id> ./flows \
17+
--ios-device-matrix iphone-16-pro:18 \
18+
--ios-device-matrix iphone-16-pro:26 \
19+
--ios-device-matrix iphone-16-pro-max:26
20+
# one upload, 3 devices x N flows
21+
```
22+
23+
### Android
24+
25+
```bash
26+
dcd cloud --app-binary-id <id> ./flows \
27+
--android-device-matrix pixel-7:34 \
28+
--android-device-matrix pixel-6:33
29+
```
30+
31+
Append `:play` to run a cell against a Google Play device:
32+
33+
```bash
34+
dcd cloud --app-binary-id <id> ./flows \
35+
--android-device-matrix pixel-7:34 \
36+
--android-device-matrix pixel-7:34:play
37+
```
38+
39+
Every `--ios-device-matrix` / `--android-device-matrix` names **exactly one device**. There is no
40+
cross-product: the flags are not combined with each other, or with `--ios-device` / `--ios-version`.
41+
42+
```bash
43+
# runs exactly these two, and nothing else
44+
dcd cloud [...] --ios-device-matrix iphone-15:17 --ios-device-matrix iphone-16-plus:26
45+
```
46+
47+
This is deliberate as not every device supports every OS. Naming each device explicitly means you always get
48+
exactly what you asked for.
49+
50+
## Cost
51+
52+
A matrix runs one test per (flow x device), so a 4-device matrix over 10 flows is **40 flows**, not 10. Before submitting, the CLI prints the number of flows and what they will cost:
53+
54+
```
55+
Device matrix
56+
cells 4
57+
est. cost $0.32
58+
Pixel 7 - API 34 2 flows - $0.16
59+
Pixel 6 - API 33 2 flows - $0.16
60+
```
61+
62+
Rates are per device — iPad and Google Play flows are charged at the advanced rate, as per our [pricing](../billing/test-run-billing.md).
63+
64+
## Results
65+
66+
Each device gets its own result, grouped together in the console so you can compare a flow across devices at a glance.
67+
68+
Under `--json`, every entry in `tests[]` carries a `device` object, so the same flow run on two
69+
devices is unambiguous:
70+
71+
```json
72+
{
73+
"uploadId": "...",
74+
"tests": [
75+
{ "name": "login.yaml", "status": "PASSED", "device": { "name": "Pixel 7", "osVersion": "34" } },
76+
{ "name": "login.yaml", "status": "FAILED", "device": { "name": "Pixel 6", "osVersion": "33" } }
77+
]
78+
}
79+
```
80+
81+
Without `--async` the run waits for **every** device and exits `0` only if all of them passed. Retrying a single failed result re-runs just that one flow on that one device and not the entire matrix.
82+
83+
## Rules
84+
85+
- Every device and OS must be a supported combination, including Google Play if applicable. An unsupported one is rejected before anything runs so you never get a partial submission.
86+
87+
- 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.
88+
89+
- 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.

configuration/per-flow-devices.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,8 @@ iPhone upload charges that one flow at the advanced rate, and the rest at the st
6262

6363
- Currently not supported on `m1` runners due to device limitations.
6464

65-
## Running a whole suite across several devices
65+
## Running a suite across several devices
6666

6767
Per-flow targeting picks a device for *one* flow. To run your **entire** suite against several
68-
devices, submit one upload per device:
69-
70-
```bash
71-
# iOS
72-
dcd cloud [...] --ios-device "<device-1>" --ios-version <version-1>
73-
dcd cloud [...] --ios-device "<device-2>" --ios-version <version-2>
74-
75-
# Android
76-
dcd cloud [...] --android-device "<device-1>" --android-api-level <version-1>
77-
dcd cloud [...] --android-device "<device-2>" --android-api-level <version-2>
78-
```
68+
devices, use a [device matrix](device-matrix.md) — every flow runs once per device, under a single
69+
upload.

getting-started/devices-configuration.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,8 @@ dcd cloud app.zip test.yaml --ios-device ipad-pro-6th-gen
8484

8585
### Targeting a single flow
8686

87-
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 inits YAML instead. See [per-flow-devices.md](../configuration/per-flow-devices.md).
88-
To run your **entire** suite against more than one device, submit one upload per device:
87+
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.md](../configuration/per-flow-devices.md).
8988

90-
```bash
91-
for device in iphone-16-pro iphone-16-pro-max; do
92-
dcd cloud --app-binary-id <id> ./flows \
93-
--ios-device "$device" --ios-version 18 --async
94-
done
95-
```
89+
### Running your suite across several devices
9690

97-
{% hint style="warning" %}
98-
`--async` matters here. Without it, each `dcd cloud` blocks on its own poll loop waiting for
99-
results, so the uploads run one after another instead of concurrently.
100-
{% endhint %}
91+
To run every flow against several devices from a single `dcd cloud` invocation use a [device matrix](../configuration/device-matrix.md).

0 commit comments

Comments
 (0)