Skip to content

Commit eacec19

Browse files
improve README.md
1 parent 90c13ea commit eacec19

File tree

1 file changed

+113
-19
lines changed

1 file changed

+113
-19
lines changed

README.md

Lines changed: 113 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,141 @@
11
# TestingBot CLI
22

3-
TestingBot CLI is a command-line interface to run tests with Espresso, XCUITest and Maestro on TestingBot.
3+
CLI tool to run Espresso, XCUITest and Maestro tests on [TestingBot's](https://testingbot.com) cloud infrastructure.
44

5-
## Features
5+
## Installation
6+
7+
```sh
8+
npm install -g testingbotctl
9+
```
610

7-
- Run Espresso tests on TestingBot
8-
- Run XCUITest tests on TestingBot
9-
- Run Maestro tests on TestingBot
11+
## Authentication
1012

11-
## Installation
13+
The CLI requires TestingBot API credentials. You can provide them in three ways:
14+
15+
1. **Command-line options**: `--api-key` and `--api-secret`
16+
2. **Environment variables**: `TB_KEY` and `TB_SECRET`
17+
3. **Config file**: Create `~/.testingbot` with content `key:secret`
18+
19+
## Commands
1220

13-
To install TestingBot CLI, use the following command:
21+
### Maestro
22+
23+
Run Maestro UI tests on real devices and emulators/simulators.
1424

1525
```sh
16-
npm install -g testingbotctl
26+
testingbot maestro <app> <flows> [options]
1727
```
1828

19-
## Usage
29+
**Arguments:**
30+
- `app` - Path to your app file (.apk, .ipa, .app, or .zip)
31+
- `flows` - Path to flow file (.yaml/.yml), directory, .zip, or glob pattern
32+
33+
**Options:**
34+
35+
| Option | Description |
36+
|--------|-------------|
37+
| `--device <name>` | Device name (e.g., "Pixel 9", "iPhone 16") |
38+
| `--platform <name>` | Platform: Android or iOS |
39+
| `--deviceVersion <version>` | OS version (e.g., "14", "17.2") |
40+
| `--orientation <orientation>` | PORTRAIT or LANDSCAPE |
41+
| `--device-locale <locale>` | Device locale (e.g., "en_US", "de_DE") |
42+
| `--timezone <timezone>` | Timezone (e.g., "America/New_York") |
43+
| `--name <name>` | Test name for dashboard |
44+
| `--build <build>` | Build identifier for grouping |
45+
| `--throttle-network <speed>` | Network throttling: 4G, 3G, Edge, airplane, disable |
46+
| `--geo-country-code <code>` | Geographic IP location (ISO code) |
47+
| `--include-tags <tags>` | Only run flows with these tags (comma-separated) |
48+
| `--exclude-tags <tags>` | Exclude flows with these tags (comma-separated) |
49+
| `-e, --env <KEY=VALUE>` | Environment variable for flows (repeatable) |
50+
| `--maestro-version <version>` | Maestro version to use |
51+
| `--async` | Start tests and exit without waiting for results |
52+
| `-q, --quiet` | Suppress progress output |
53+
| `--report <format>` | Download report after completion: html or junit |
54+
| `--report-output-dir <path>` | Directory to save reports |
55+
56+
**Examples:**
57+
58+
```sh
59+
# Basic usage
60+
testingbot maestro app.apk ./flows
2061

21-
Here are some example commands to get you started:
62+
# With device selection
63+
testingbot maestro app.apk ./flows --device "Pixel 8" --deviceVersion "14"
2264

23-
### Run Espresso Tests
65+
# iOS app with tags
66+
testingbot maestro app.ipa ./flows --platform iOS --include-tags "smoke,regression"
67+
68+
# With environment variables
69+
testingbot maestro app.apk ./flows -e API_URL=https://staging.example.com -e API_KEY=secret
70+
71+
# Download JUnit report
72+
testingbot maestro app.apk ./flows --report junit --report-output-dir ./reports
73+
74+
# Run in background (async)
75+
testingbot maestro app.apk ./flows --async
76+
```
77+
78+
### Espresso
79+
80+
Run Android Espresso tests on real devices and emulators.
81+
82+
```sh
83+
testingbot espresso [options]
84+
```
85+
86+
**Required Options:**
87+
88+
| Option | Description |
89+
|--------|-------------|
90+
| `--app <path>` | Path to application under test (.apk) |
91+
| `--test-app <path>` | Path to test application (.apk) |
92+
| `--device <name>` | Real device to use |
93+
| `--emulator <name>` | Emulator to use |
94+
95+
**Example:**
2496

2597
```sh
26-
testingbotctl run espresso --app your-app.apk --test your-test.apk
98+
testingbot espresso \
99+
--app app.apk \
100+
--test-app app-test.apk \
101+
--device "Pixel 8" \
102+
--emulator "Android 14"
27103
```
28104

29-
### Run XCUITest Tests
105+
### XCUITest
106+
107+
Run iOS XCUITest tests on real devices and simulators.
30108

31109
```sh
32-
testingbotctl run xcuitest --app your-app.ipa --test your-test.zip
110+
testingbot xcuitest [options]
33111
```
34112

35-
### Run Maestro Tests
113+
**Required Options:**
114+
115+
| Option | Description |
116+
|--------|-------------|
117+
| `--app <path>` | Path to application under test (.ipa or .app) |
118+
| `--test-app <path>` | Path to test application |
119+
| `--device <name>` | Device to use |
120+
121+
**Example:**
36122

37123
```sh
38-
testingbotctl run maestro --app your-app.apk --test your-test.yaml
124+
testingbot xcuitest \
125+
--app app.ipa \
126+
--test-app app-test.zip \
127+
--device "iPhone 16"
39128
```
40129

41-
## Contributing
130+
## Exit Codes
131+
132+
- `0` - All tests passed
133+
- `1` - One or more tests failed or an error occurred
134+
135+
## Documentation
42136

43-
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
137+
For more information, visit [TestingBot Documentation](https://testingbot.com/support).
44138

45139
## License
46140

47-
This project is licensed under the MIT License.
141+
MIT

0 commit comments

Comments
 (0)