You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- A booted iOS simulator, Android emulator, or connected real device
47
48
49
+
Run `mobilewright doctor` to verify your environment is ready:
50
+
51
+
```bash
52
+
npx mobilewright doctor
53
+
```
54
+
55
+
It checks Xcode, Android SDK, simulators, ADB, and other dependencies — and tells you exactly what's missing and how to fix it. Add `--json` for machine-readable output.
56
+
48
57
## Packages
49
58
50
59
| Package | Description |
@@ -280,12 +289,26 @@ The `device` fixture connects once per worker (reading from `mobilewright.config
280
289
281
290
## CLI
282
291
292
+
### `mobilewright init`
293
+
294
+
Scaffold a `mobilewright.config.ts` and `example.test.ts` in the current directory. Skips files that already exist.
295
+
283
296
```bash
284
-
# List all connected devices, simulators, and emulators
285
-
npx mobilewright devices
297
+
npx mobilewright init
298
+
```
299
+
286
300
```
301
+
created mobilewright.config.ts
302
+
created example.test.ts
303
+
```
304
+
305
+
### `mobilewright devices`
306
+
307
+
List all connected devices, simulators, and emulators.
287
308
288
-
Example output:
309
+
```bash
310
+
npx mobilewright devices
311
+
```
289
312
290
313
```
291
314
ID Name Platform Type State
@@ -294,10 +317,33 @@ ID Name Platform Type
294
317
5A5FCFCA-27EC-4D1B-B412-BAE629154EE0 iPhone 17 Pro ios simulator booted
295
318
```
296
319
297
-
## Tests
320
+
### `mobilewright test`
321
+
322
+
Run your tests. Auto-discovers `mobilewright.config.ts` in the current directory.
323
+
324
+
```bash
325
+
npx mobilewright test
326
+
npx mobilewright test login.test.ts # run a specific file
327
+
npx mobilewright test --grep "sign in"# filter by test name
328
+
npx mobilewright test --reporter html # generate HTML report
329
+
npx mobilewright test --retries 2 # retry flaky tests
330
+
npx mobilewright test --workers 4 # parallel workers
331
+
npx mobilewright test --list # list tests without running
332
+
```
333
+
334
+
### `mobilewright show-report`
335
+
336
+
Open the HTML report generated by `--reporter html`.
0 commit comments