@testingbot/cli 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +84 -7
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +55 -8
  4. package/dist/logger.js +4 -4
  5. package/dist/models/espresso_options.d.ts +9 -0
  6. package/dist/models/espresso_options.d.ts.map +1 -1
  7. package/dist/models/espresso_options.js +14 -0
  8. package/dist/models/maestro_options.d.ts +20 -7
  9. package/dist/models/maestro_options.d.ts.map +1 -1
  10. package/dist/models/maestro_options.js +22 -9
  11. package/dist/models/testingbot_error.d.ts +3 -0
  12. package/dist/models/testingbot_error.d.ts.map +1 -1
  13. package/dist/models/testingbot_error.js +5 -0
  14. package/dist/models/xcuitest_options.d.ts +9 -0
  15. package/dist/models/xcuitest_options.d.ts.map +1 -1
  16. package/dist/models/xcuitest_options.js +14 -0
  17. package/dist/providers/base_provider.d.ts +119 -0
  18. package/dist/providers/base_provider.d.ts.map +1 -0
  19. package/dist/providers/base_provider.js +296 -0
  20. package/dist/providers/espresso.d.ts +14 -21
  21. package/dist/providers/espresso.d.ts.map +1 -1
  22. package/dist/providers/espresso.js +50 -181
  23. package/dist/providers/login.d.ts +1 -0
  24. package/dist/providers/login.d.ts.map +1 -1
  25. package/dist/providers/login.js +16 -7
  26. package/dist/providers/maestro.d.ts +73 -21
  27. package/dist/providers/maestro.d.ts.map +1 -1
  28. package/dist/providers/maestro.js +842 -276
  29. package/dist/providers/xcuitest.d.ts +14 -21
  30. package/dist/providers/xcuitest.d.ts.map +1 -1
  31. package/dist/providers/xcuitest.js +50 -181
  32. package/dist/upload.d.ts +10 -0
  33. package/dist/upload.d.ts.map +1 -1
  34. package/dist/upload.js +46 -21
  35. package/dist/utils/connectivity.d.ts +26 -0
  36. package/dist/utils/connectivity.d.ts.map +1 -0
  37. package/dist/utils/connectivity.js +131 -0
  38. package/dist/utils/error-helpers.d.ts +26 -0
  39. package/dist/utils/error-helpers.d.ts.map +1 -0
  40. package/dist/utils/error-helpers.js +237 -0
  41. package/dist/utils/file-type-detector.d.ts +4 -1
  42. package/dist/utils/file-type-detector.d.ts.map +1 -1
  43. package/dist/utils/file-type-detector.js +30 -6
  44. package/dist/utils.d.ts.map +1 -1
  45. package/dist/utils.js +8 -3
  46. package/package.json +2 -2
package/README.md CHANGED
@@ -1,8 +1,56 @@
1
- [![Run Tests](https://github.com/testingbot/testingbotctl/actions/workflows/test.yml/badge.svg)](https://github.com/testingbot/testingbotctl/actions/workflows/test.yml)
1
+ <p align="center">
2
+ <a href="https://testingbot.com">
3
+ <img src="resources/logo.svg" alt="Maestro Cloud Testing" width="400">
4
+ </a>
5
+ <br>
6
+ <strong>Run mobile tests on real devices in the cloud</strong>
7
+ </p>
8
+
9
+ <p align="center">
10
+ <a href="https://github.com/testingbot/testingbotctl/actions/workflows/test.yml">
11
+ <img src="https://github.com/testingbot/testingbotctl/actions/workflows/test.yml/badge.svg" alt="Run Tests">
12
+ </a>
13
+ <a href="https://www.npmjs.com/package/@testingbot/cli">
14
+ <img src="https://img.shields.io/npm/v/@testingbot/cli.svg" alt="npm version">
15
+ </a>
16
+ <a href="https://www.npmjs.com/package/@testingbot/cli">
17
+ <img src="https://img.shields.io/npm/dm/@testingbot/cli.svg" alt="npm downloads">
18
+ </a>
19
+ <a href="https://github.com/testingbot/testingbotctl/blob/main/LICENSE">
20
+ <img src="https://img.shields.io/npm/l/@testingbot/cli.svg" alt="license">
21
+ </a>
22
+ </p>
23
+
24
+ <p align="center">
25
+ <a href="https://testingbot.com">Website</a>
26
+ ·
27
+ <a href="https://testingbot.com/support/app-automate/maestro">Documentation</a>
28
+ ·
29
+ <a href="https://www.npmjs.com/package/@testingbot/cli">npm</a>
30
+ </p>
2
31
 
3
- # TestingBot CLI
32
+ ---
33
+
34
+ <p align="center">
35
+ <img src="demo/demo.gif" alt="TestingBot CLI Demo" width="700">
36
+ </p>
37
+
38
+ ---
39
+
40
+ Run **Espresso**, **XCUITest** and **Maestro** tests on real devices in the cloud.
4
41
 
5
- CLI tool to run Espresso, XCUITest and Maestro tests on [TestingBot's](https://testingbot.com) cloud infrastructure.
42
+ - **Real Devices** Test on thousands of real iOS and Android devices
43
+ - **Emulators & Simulators** — Fast feedback with virtual devices
44
+ - **Parallel Execution** — Split tests across multiple devices with sharding
45
+ - **CI/CD Ready** — Integrates with GitHub Actions, Jenkins, and more
46
+ - **Live Results** — Watch tests run in real-time
47
+ - **Artifacts** — Download videos, screenshots, and logs
48
+
49
+ <p align="center">
50
+ <a href="#installation"><strong>Get Started →</strong></a>
51
+ </p>
52
+
53
+ ---
6
54
 
7
55
  ## Installation
8
56
 
@@ -82,9 +130,25 @@ testingbot maestro <app> <flows...> [options]
82
130
  | `-q, --quiet` | Suppress progress output |
83
131
  | `--report <format>` | Download report after completion: html or junit |
84
132
  | `--report-output-dir <path>` | Directory to save reports (required with --report) |
85
- | `--download-artifacts` | Download test artifacts (logs, screenshots, video) |
133
+ | `--download-artifacts [mode]` | Download test artifacts (logs, screenshots, video). Mode: `all` (default) or `failed` |
86
134
  | `--artifacts-output-dir <path>` | Directory to save artifacts zip (defaults to current directory) |
87
135
 
136
+ **Advanced Options:**
137
+
138
+ | Option | Description |
139
+ |--------|-------------|
140
+ | `--shard-split <number>` | Split flows into N parallel sessions for faster execution |
141
+ | `--ignore-checksum-check` | Skip checksum verification and always upload the app |
142
+
143
+ **CI/CD Integration:**
144
+
145
+ | Option | Description |
146
+ |--------|-------------|
147
+ | `--commit-sha <sha>` | Git commit SHA associated with this test run |
148
+ | `--pull-request-id <id>` | Pull request ID this test run originated from |
149
+ | `--repo-name <name>` | Repository name (e.g., GitHub repo slug) |
150
+ | `--repo-owner <owner>` | Repository owner (e.g., GitHub organization or username) |
151
+
88
152
  **Examples:**
89
153
 
90
154
  ```sh
@@ -97,8 +161,8 @@ testingbot maestro app.apk ./flows/smoke ./flows/regression ./flows/e2e
97
161
  # With device selection
98
162
  testingbot maestro app.apk ./flows --device "Pixel 8" --deviceVersion "14"
99
163
 
100
- # iOS app on real device with tags
101
- testingbot maestro app.ipa ./flows --platform iOS --real-device --include-tags "smoke,regression"
164
+ # Android app on real device with tags
165
+ testingbot maestro app.apk ./flows --device "Samsung Galaxy S24" --real-device --include-tags "smoke,regression"
102
166
 
103
167
  # With environment variables
104
168
  testingbot maestro app.apk ./flows -e API_URL=https://staging.example.com -e API_KEY=secret
@@ -109,8 +173,21 @@ testingbot maestro app.apk ./flows --report junit --report-output-dir ./reports
109
173
  # Download all artifacts (logs, screenshots, video)
110
174
  testingbot maestro app.apk ./flows --download-artifacts --build "build-123"
111
175
 
176
+ # Download artifacts only for failed tests
177
+ testingbot maestro app.apk ./flows --download-artifacts failed --artifacts-output-dir ./artifacts
178
+
112
179
  # Run in background (async)
113
180
  testingbot maestro app.apk ./flows --async
181
+
182
+ # Split flows across 3 shards, grouping all flows over 3 parallel sessions
183
+ testingbot maestro app.apk ./flows --shard-split 3
184
+
185
+ # CI/CD integration with Git metadata
186
+ testingbot maestro app.apk ./flows \
187
+ --commit-sha "abc123def" \
188
+ --pull-request-id "42" \
189
+ --repo-owner "myorg" \
190
+ --repo-name "myapp"
114
191
  ```
115
192
 
116
193
  ---
@@ -324,7 +401,7 @@ testingbot xcuitest app.ipa app-test.zip \
324
401
  ### Real-time Progress
325
402
 
326
403
  By default, the CLI shows real-time progress updates including:
327
- - Test status updates
404
+ - Test status updates with actual device names (even when using wildcards)
328
405
  - Device allocation status
329
406
  - Live output from Maestro flows
330
407
 
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwBpC,QAAA,MAAM,OAAO,SAAgB,CAAC;AAyf9B,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0BpC,QAAA,MAAM,OAAO,SAAgB,CAAC;AAwkB9B,eAAe,OAAO,CAAC"}
package/dist/cli.js CHANGED
@@ -14,6 +14,7 @@ const package_json_1 = __importDefault(require("../package.json"));
14
14
  const maestro_options_1 = __importDefault(require("./models/maestro_options"));
15
15
  const maestro_1 = __importDefault(require("./providers/maestro"));
16
16
  const login_1 = __importDefault(require("./providers/login"));
17
+ const testingbot_error_1 = __importDefault(require("./models/testingbot_error"));
17
18
  const program = new commander_1.Command();
18
19
  program
19
20
  .name('testingbot')
@@ -59,6 +60,11 @@ const espressoCommand = program
59
60
  // Report options
60
61
  .option('--report <format>', 'Download test report after completion: html or junit.', (val) => val.toLowerCase())
61
62
  .option('--report-output-dir <path>', 'Directory to save test reports (required when --report is used).')
63
+ // CI/CD metadata
64
+ .option('--commit-sha <sha>', 'The commit SHA of this upload.')
65
+ .option('--pull-request-id <id>', 'The ID of the pull request this upload originated from.')
66
+ .option('--repo-name <name>', 'Repository name (e.g., GitHub repo slug).')
67
+ .option('--repo-owner <owner>', 'Repository owner (e.g., GitHub organization or user slug).')
62
68
  // Authentication
63
69
  .option('--api-key <key>', 'TestingBot API key.')
64
70
  .option('--api-secret <secret>', 'TestingBot API secret.')
@@ -71,6 +77,14 @@ const espressoCommand = program
71
77
  espressoCommand.help();
72
78
  return;
73
79
  }
80
+ const metadata = args.commitSha || args.pullRequestId || args.repoName || args.repoOwner
81
+ ? {
82
+ commitSha: args.commitSha,
83
+ pullRequestId: args.pullRequestId,
84
+ repoName: args.repoName,
85
+ repoOwner: args.repoOwner,
86
+ }
87
+ : undefined;
74
88
  const options = new espresso_options_1.default(app, testApp, args.device, {
75
89
  version: args.platformVersion,
76
90
  realDevice: args.realDevice,
@@ -95,13 +109,14 @@ const espressoCommand = program
95
109
  async: args.async,
96
110
  report: args.report,
97
111
  reportOutputDir: args.reportOutputDir,
112
+ metadata,
98
113
  });
99
114
  const credentials = await auth_1.default.getCredentials({
100
115
  apiKey: args.apiKey,
101
116
  apiSecret: args.apiSecret,
102
117
  });
103
118
  if (credentials === null) {
104
- throw new Error('No TestingBot credentials found. Please authenticate using one of these methods:\n' +
119
+ throw new testingbot_error_1.default('No TestingBot credentials found. Please authenticate using one of these methods:\n' +
105
120
  ' 1. Run "testingbot login" to authenticate via browser (recommended)\n' +
106
121
  ' 2. Use --api-key and --api-secret options\n' +
107
122
  ' 3. Set TB_KEY and TB_SECRET environment variables\n' +
@@ -135,8 +150,7 @@ const maestroCommand = program
135
150
  .option('--device-locale <locale>', 'Device locale (e.g., "en_US", "de_DE").')
136
151
  .option('--timezone <timezone>', 'Device timezone (e.g., "America/New_York", "Europe/London").')
137
152
  // Test metadata
138
- .option('--name <name>', 'Test name for identification in dashboard.')
139
- .option('--build <build>', 'Build identifier for grouping test runs.')
153
+ .option('--name <name>', 'Name for this Maestro run.')
140
154
  // Network and geo
141
155
  .option('--throttle-network <speed>', 'Network throttling: 4G, 3G, Edge, airplane, or disable.', (val) => val)
142
156
  .option('--geo-country-code <code>', 'Geographic IP location (ISO country code, e.g., "US", "DE").')
@@ -157,8 +171,15 @@ const maestroCommand = program
157
171
  .option('--report <format>', 'Download test report after completion: html or junit.', (val) => val.toLowerCase())
158
172
  .option('--report-output-dir <path>', 'Directory to save test reports (required when --report is used).')
159
173
  // Artifact download
160
- .option('--download-artifacts', 'Download test artifacts (logs, screenshots, video) after completion.')
174
+ .option('--download-artifacts [mode]', 'Download test artifacts after completion. Mode: all (default) or failed.', (val) => (val === 'failed' ? 'failed' : 'all'))
161
175
  .option('--artifacts-output-dir <path>', 'Directory to save artifacts zip (defaults to current directory).')
176
+ .option('--ignore-checksum-check', 'Skip checksum verification and always upload the app.')
177
+ .option('--shard-split <number>', 'Number of chunks to split flows into (by default each flow runs on its own session).', (val) => parseInt(val, 10))
178
+ // CI/CD metadata
179
+ .option('--commit-sha <sha>', 'The commit SHA of this upload.')
180
+ .option('--pull-request-id <id>', 'The ID of the pull request this upload originated from.')
181
+ .option('--repo-name <name>', 'Repository name (e.g., GitHub repo slug).')
182
+ .option('--repo-owner <owner>', 'Repository owner (e.g., GitHub organization or user slug).')
162
183
  // Authentication
163
184
  .option('--api-key <key>', 'TestingBot API key.')
164
185
  .option('--api-secret <secret>', 'TestingBot API secret.')
@@ -192,13 +213,20 @@ const maestroCommand = program
192
213
  env[key] = value;
193
214
  }
194
215
  }
216
+ const metadata = args.commitSha || args.pullRequestId || args.repoName || args.repoOwner
217
+ ? {
218
+ commitSha: args.commitSha,
219
+ pullRequestId: args.pullRequestId,
220
+ repoName: args.repoName,
221
+ repoOwner: args.repoOwner,
222
+ }
223
+ : undefined;
195
224
  const options = new maestro_options_1.default(app, flows, args.device, {
196
225
  includeTags: args.includeTags,
197
226
  excludeTags: args.excludeTags,
198
227
  platformName: args.platform,
199
228
  version: args.deviceVersion,
200
229
  name: args.name,
201
- build: args.build,
202
230
  orientation: args.orientation,
203
231
  locale: args.deviceLocale,
204
232
  timeZone: args.timezone,
@@ -211,15 +239,20 @@ const maestroCommand = program
211
239
  report: args.report,
212
240
  reportOutputDir: args.reportOutputDir,
213
241
  realDevice: args.realDevice,
214
- downloadArtifacts: args.downloadArtifacts,
242
+ downloadArtifacts: args.downloadArtifacts === true
243
+ ? 'all'
244
+ : args.downloadArtifacts,
215
245
  artifactsOutputDir: args.artifactsOutputDir,
246
+ ignoreChecksumCheck: args.ignoreChecksumCheck,
247
+ shardSplit: args.shardSplit,
248
+ metadata,
216
249
  });
217
250
  const credentials = await auth_1.default.getCredentials({
218
251
  apiKey: args.apiKey,
219
252
  apiSecret: args.apiSecret,
220
253
  });
221
254
  if (credentials === null) {
222
- throw new Error('No TestingBot credentials found. Please authenticate using one of these methods:\n' +
255
+ throw new testingbot_error_1.default('No TestingBot credentials found. Please authenticate using one of these methods:\n' +
223
256
  ' 1. Run "testingbot login" to authenticate via browser (recommended)\n' +
224
257
  ' 2. Use --api-key and --api-secret options\n' +
225
258
  ' 3. Set TB_KEY and TB_SECRET environment variables\n' +
@@ -269,6 +302,11 @@ const xcuitestCommand = program
269
302
  // Report options
270
303
  .option('--report <format>', 'Download test report after completion: html or junit.', (val) => val.toLowerCase())
271
304
  .option('--report-output-dir <path>', 'Directory to save test reports (required when --report is used).')
305
+ // CI/CD metadata
306
+ .option('--commit-sha <sha>', 'The commit SHA of this upload.')
307
+ .option('--pull-request-id <id>', 'The ID of the pull request this upload originated from.')
308
+ .option('--repo-name <name>', 'Repository name (e.g., GitHub repo slug).')
309
+ .option('--repo-owner <owner>', 'Repository owner (e.g., GitHub organization or user slug).')
272
310
  // Authentication
273
311
  .option('--api-key <key>', 'TestingBot API key.')
274
312
  .option('--api-secret <secret>', 'TestingBot API secret.')
@@ -281,6 +319,14 @@ const xcuitestCommand = program
281
319
  xcuitestCommand.help();
282
320
  return;
283
321
  }
322
+ const metadata = args.commitSha || args.pullRequestId || args.repoName || args.repoOwner
323
+ ? {
324
+ commitSha: args.commitSha,
325
+ pullRequestId: args.pullRequestId,
326
+ repoName: args.repoName,
327
+ repoOwner: args.repoOwner,
328
+ }
329
+ : undefined;
284
330
  const options = new xcuitest_options_1.default(app, testApp, args.device, {
285
331
  version: args.platformVersion,
286
332
  realDevice: args.realDevice,
@@ -298,13 +344,14 @@ const xcuitestCommand = program
298
344
  async: args.async,
299
345
  report: args.report,
300
346
  reportOutputDir: args.reportOutputDir,
347
+ metadata,
301
348
  });
302
349
  const credentials = await auth_1.default.getCredentials({
303
350
  apiKey: args.apiKey,
304
351
  apiSecret: args.apiSecret,
305
352
  });
306
353
  if (credentials === null) {
307
- throw new Error('No TestingBot credentials found. Please authenticate using one of these methods:\n' +
354
+ throw new testingbot_error_1.default('No TestingBot credentials found. Please authenticate using one of these methods:\n' +
308
355
  ' 1. Run "testingbot login" to authenticate via browser (recommended)\n' +
309
356
  ' 2. Use --api-key and --api-secret options\n' +
310
357
  ' 3. Set TB_KEY and TB_SECRET environment variables\n' +
package/dist/logger.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const colors_1 = __importDefault(require("colors"));
6
+ const picocolors_1 = __importDefault(require("picocolors"));
7
7
  const tracer_1 = __importDefault(require("tracer"));
8
8
  const logger = tracer_1.default.colorConsole({
9
9
  level: 'info',
@@ -11,9 +11,9 @@ const logger = tracer_1.default.colorConsole({
11
11
  dateformat: 'HH:MM:ss.L',
12
12
  filters: [
13
13
  {
14
- warn: colors_1.default.red,
15
- debug: colors_1.default.blue,
16
- error: [colors_1.default.red, colors_1.default.bold],
14
+ warn: picocolors_1.default.red,
15
+ debug: picocolors_1.default.blue,
16
+ error: (text) => picocolors_1.default.bold(picocolors_1.default.red(text)),
17
17
  },
18
18
  ],
19
19
  });
@@ -1,6 +1,12 @@
1
1
  export type TestSize = 'small' | 'medium' | 'large';
2
2
  export type ReportFormat = 'html' | 'junit';
3
3
  export type ThrottleNetwork = '4G' | '3G' | 'Edge' | 'airplane';
4
+ export interface RunMetadata {
5
+ commitSha?: string;
6
+ pullRequestId?: string;
7
+ repoName?: string;
8
+ repoOwner?: string;
9
+ }
4
10
  export interface CustomNetworkProfile {
5
11
  uploadSpeed: number;
6
12
  downloadSpeed: number;
@@ -59,6 +65,7 @@ export default class EspressoOptions {
59
65
  private _async;
60
66
  private _report?;
61
67
  private _reportOutputDir?;
68
+ private _metadata?;
62
69
  constructor(app: string, testApp: string, device?: string, options?: {
63
70
  version?: string;
64
71
  realDevice?: boolean;
@@ -83,6 +90,7 @@ export default class EspressoOptions {
83
90
  async?: boolean;
84
91
  report?: ReportFormat;
85
92
  reportOutputDir?: string;
93
+ metadata?: RunMetadata;
86
94
  });
87
95
  get app(): string;
88
96
  get testApp(): string;
@@ -110,6 +118,7 @@ export default class EspressoOptions {
110
118
  get async(): boolean;
111
119
  get report(): ReportFormat | undefined;
112
120
  get reportOutputDir(): string | undefined;
121
+ get metadata(): RunMetadata | undefined;
113
122
  getCapabilities(): EspressoCapabilities;
114
123
  getEspressoOptions(): EspressoRunOptions | undefined;
115
124
  }
@@ -1 +1 @@
1
- {"version":3,"file":"espresso_options.d.ts","sourceRoot":"","sources":["../../src/models/espresso_options.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAC5C,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,UAAU,CAAC;AAEhE,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,SAAS,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,IAAI,CAAC,EAA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I,MAAM,GAAG,SAAS,CAE1C;IAED,IAAW,KAAK,IAAI,MAAM,EAAE,GAAG,SAAS,CAEvC;IAED,IAAW,QAAQ,IAAI,MAAM,EAAE,GAAG,SAAS,CAE1C;IAED,IAAW,OAAO,IAAI,MAAM,EAAE,GAAG,SAAS,CAEzC;IAED,IAAW,UAAU,IAAI,MAAM,EAAE,GAAG,SAAS,CAE5C;IAED,IAAW,UAAU,IAAI,MAAM,EAAE,GAAG,SAAS,CAE5C;IAED,IAAW,aAAa,IAAI,MAAM,EAAE,GAAG,SAAS,CAE/C;IAED,IAAW,IAAI,IAAI,QAAQ,EAAE,GAAG,SAAS,CAExC;IAED,IAAW,QAAQ,IAAI,MAAM,GAAG,SAAS,CAExC;IAED,IAAW,MAAM,IAAI,MAAM,GAAG,SAAS,CAEtC;IAED,IAAW,QAAQ,IAAI,MAAM,GAAG,SAAS,CAExC;IAED,IAAW,WAAW,IAAI,MAAM,GAAG,SAAS,CAE3C;IAED,IAAW,eAAe,IACtB,eAAe,GACf,oBAAoB,GACpB,SAAS,CAEZ;IAED,IAAW,KAAK,IAAI,OAAO,CAE1B;IAED,IAAW,KAAK,IAAI,OAAO,CAE1B;IAED,IAAW,MAAM,IAAI,YAAY,GAAG,SAAS,CAE5C;IAED,IAAW,eAAe,IAAI,MAAM,GAAG,SAAS,CAE/C;IAED,IAAW,QAAQ,IAAI,WAAW,GAAG,SAAS,CAE7C;IAEM,eAAe,IAAI,oBAAoB;IAgBvC,kBAAkB,IAAI,kBAAkB,GAAG,SAAS;CA0B5D"}
@@ -1,5 +1,9 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ const testingbot_error_1 = __importDefault(require("./testingbot_error"));
3
7
  class EspressoOptions {
4
8
  _app;
5
9
  _testApp;
@@ -32,6 +36,8 @@ class EspressoOptions {
32
36
  _async;
33
37
  _report;
34
38
  _reportOutputDir;
39
+ // Metadata
40
+ _metadata;
35
41
  constructor(app, testApp, device, options) {
36
42
  this._app = app;
37
43
  this._testApp = testApp;
@@ -40,6 +46,10 @@ class EspressoOptions {
40
46
  this._realDevice = options?.realDevice ?? false;
41
47
  this._tabletOnly = options?.tabletOnly ?? false;
42
48
  this._phoneOnly = options?.phoneOnly ?? false;
49
+ // Validate contradictory options
50
+ if (this._tabletOnly && this._phoneOnly) {
51
+ throw new testingbot_error_1.default('Cannot specify both --phone-only and --tablet-only options');
52
+ }
43
53
  this._name = options?.name;
44
54
  this._build = options?.build;
45
55
  this._testRunner = options?.testRunner;
@@ -59,6 +69,7 @@ class EspressoOptions {
59
69
  this._async = options?.async ?? false;
60
70
  this._report = options?.report;
61
71
  this._reportOutputDir = options?.reportOutputDir;
72
+ this._metadata = options?.metadata;
62
73
  }
63
74
  get app() {
64
75
  return this._app;
@@ -138,6 +149,9 @@ class EspressoOptions {
138
149
  get reportOutputDir() {
139
150
  return this._reportOutputDir;
140
151
  }
152
+ get metadata() {
153
+ return this._metadata;
154
+ }
141
155
  getCapabilities() {
142
156
  const caps = {
143
157
  platformName: 'Android',
@@ -7,12 +7,18 @@ export interface MaestroConfig {
7
7
  export type Orientation = 'PORTRAIT' | 'LANDSCAPE';
8
8
  export type ThrottleNetwork = '4G' | '3G' | 'Edge' | 'airplane' | 'disable';
9
9
  export type ReportFormat = 'html' | 'junit';
10
+ export type ArtifactDownloadMode = 'all' | 'failed';
11
+ export interface RunMetadata {
12
+ commitSha?: string;
13
+ pullRequestId?: string;
14
+ repoName?: string;
15
+ repoOwner?: string;
16
+ }
10
17
  export interface MaestroCapabilities {
11
18
  platformName?: 'Android' | 'iOS';
12
19
  version?: string;
13
20
  deviceName: string;
14
21
  name?: string;
15
- build?: string;
16
22
  orientation?: Orientation;
17
23
  locale?: string;
18
24
  timeZone?: string;
@@ -27,6 +33,7 @@ export interface MaestroRunOptions {
27
33
  version?: string;
28
34
  }
29
35
  export default class MaestroOptions {
36
+ private static isIpaFile;
30
37
  private _app;
31
38
  private _flows;
32
39
  private _device?;
@@ -35,7 +42,6 @@ export default class MaestroOptions {
35
42
  private _platformName?;
36
43
  private _version?;
37
44
  private _name?;
38
- private _build?;
39
45
  private _orientation?;
40
46
  private _locale?;
41
47
  private _timeZone?;
@@ -48,15 +54,17 @@ export default class MaestroOptions {
48
54
  private _report?;
49
55
  private _reportOutputDir?;
50
56
  private _realDevice;
51
- private _downloadArtifacts;
57
+ private _downloadArtifacts?;
52
58
  private _artifactsOutputDir?;
59
+ private _ignoreChecksumCheck;
60
+ private _shardSplit?;
61
+ private _metadata?;
53
62
  constructor(app: string, flows: string | string[], device?: string, options?: {
54
63
  includeTags?: string[];
55
64
  excludeTags?: string[];
56
65
  platformName?: 'Android' | 'iOS';
57
66
  version?: string;
58
67
  name?: string;
59
- build?: string;
60
68
  orientation?: Orientation;
61
69
  locale?: string;
62
70
  timeZone?: string;
@@ -69,8 +77,11 @@ export default class MaestroOptions {
69
77
  report?: ReportFormat;
70
78
  reportOutputDir?: string;
71
79
  realDevice?: boolean;
72
- downloadArtifacts?: boolean;
80
+ downloadArtifacts?: ArtifactDownloadMode;
73
81
  artifactsOutputDir?: string;
82
+ ignoreChecksumCheck?: boolean;
83
+ shardSplit?: number;
84
+ metadata?: RunMetadata;
74
85
  });
75
86
  get app(): string;
76
87
  get flows(): string[];
@@ -80,7 +91,6 @@ export default class MaestroOptions {
80
91
  get platformName(): 'Android' | 'iOS' | undefined;
81
92
  get version(): string | undefined;
82
93
  get name(): string | undefined;
83
- get build(): string | undefined;
84
94
  get orientation(): Orientation | undefined;
85
95
  get locale(): string | undefined;
86
96
  get timeZone(): string | undefined;
@@ -93,8 +103,11 @@ export default class MaestroOptions {
93
103
  get report(): ReportFormat | undefined;
94
104
  get reportOutputDir(): string | undefined;
95
105
  get realDevice(): boolean;
96
- get downloadArtifacts(): boolean;
106
+ get downloadArtifacts(): ArtifactDownloadMode | undefined;
97
107
  get artifactsOutputDir(): string | undefined;
108
+ get ignoreChecksumCheck(): boolean;
109
+ get shardSplit(): number | undefined;
110
+ get metadata(): RunMetadata | undefined;
98
111
  getMaestroOptions(): MaestroRunOptions | undefined;
99
112
  getCapabilities(detectedPlatform?: 'Android' | 'iOS'): MaestroCapabilities;
100
113
  }
@@ -1 +1 @@
1
- {"version":3,"file":"maestro_options.d.ts","sourceRoot":"","sources":["../../src/models/maestro_options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;CACtC;AAED,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,WAAW,CAAC;AACnD,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;AAC5E,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAE5C,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,EA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GAAG,SAAS,CAE/D;IAED,IAAW,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAElD;IAED,IAAW,mBAAmB,IAAI,OAAO,CAExC;IAED,IAAW,UAAU,IAAI,MAAM,GAAG,SAAS,CAE1C;IAED,IAAW,QAAQ,IAAI,WAAW,GAAG,SAAS,CAE7C;IAEM,iBAAiB,IAAI,iBAAiB,GAAG,SAAS;IAmBlD,eAAe,CACpB,gBAAgB,CAAC,EAAE,SAAS,GAAG,KAAK,GACnC,mBAAmB;CAiCvB"}
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  class MaestroOptions {
4
+ static isIpaFile(app) {
5
+ return app?.toLowerCase().endsWith('.ipa') ?? false;
6
+ }
4
7
  _app;
5
8
  _flows;
6
9
  _device;
@@ -9,7 +12,6 @@ class MaestroOptions {
9
12
  _platformName;
10
13
  _version;
11
14
  _name;
12
- _build;
13
15
  _orientation;
14
16
  _locale;
15
17
  _timeZone;
@@ -24,6 +26,10 @@ class MaestroOptions {
24
26
  _realDevice;
25
27
  _downloadArtifacts;
26
28
  _artifactsOutputDir;
29
+ _ignoreChecksumCheck;
30
+ _shardSplit;
31
+ // Metadata
32
+ _metadata;
27
33
  constructor(app, flows, device, options) {
28
34
  this._app = app;
29
35
  this._flows = flows ? (Array.isArray(flows) ? flows : [flows]) : [];
@@ -33,7 +39,6 @@ class MaestroOptions {
33
39
  this._platformName = options?.platformName;
34
40
  this._version = options?.version;
35
41
  this._name = options?.name;
36
- this._build = options?.build;
37
42
  this._orientation = options?.orientation;
38
43
  this._locale = options?.locale;
39
44
  this._timeZone = options?.timeZone;
@@ -45,9 +50,13 @@ class MaestroOptions {
45
50
  this._async = options?.async ?? false;
46
51
  this._report = options?.report;
47
52
  this._reportOutputDir = options?.reportOutputDir;
48
- this._realDevice = options?.realDevice ?? false;
49
- this._downloadArtifacts = options?.downloadArtifacts ?? false;
53
+ // IPA files can only be tested on real iOS devices, so automatically enable realDevice
54
+ this._realDevice = MaestroOptions.isIpaFile(app) || (options?.realDevice ?? false);
55
+ this._downloadArtifacts = options?.downloadArtifacts;
50
56
  this._artifactsOutputDir = options?.artifactsOutputDir;
57
+ this._ignoreChecksumCheck = options?.ignoreChecksumCheck ?? false;
58
+ this._shardSplit = options?.shardSplit;
59
+ this._metadata = options?.metadata;
51
60
  }
52
61
  get app() {
53
62
  return this._app;
@@ -73,9 +82,6 @@ class MaestroOptions {
73
82
  get name() {
74
83
  return this._name;
75
84
  }
76
- get build() {
77
- return this._build;
78
- }
79
85
  get orientation() {
80
86
  return this._orientation;
81
87
  }
@@ -118,6 +124,15 @@ class MaestroOptions {
118
124
  get artifactsOutputDir() {
119
125
  return this._artifactsOutputDir;
120
126
  }
127
+ get ignoreChecksumCheck() {
128
+ return this._ignoreChecksumCheck;
129
+ }
130
+ get shardSplit() {
131
+ return this._shardSplit;
132
+ }
133
+ get metadata() {
134
+ return this._metadata;
135
+ }
121
136
  getMaestroOptions() {
122
137
  const opts = {};
123
138
  if (this._includeTags && this._includeTags.length > 0) {
@@ -156,8 +171,6 @@ class MaestroOptions {
156
171
  caps.version = this._version;
157
172
  if (this._name)
158
173
  caps.name = this._name;
159
- if (this._build)
160
- caps.build = this._build;
161
174
  if (this._orientation)
162
175
  caps.orientation = this._orientation;
163
176
  if (this._locale)
@@ -1,3 +1,6 @@
1
1
  export default class TestingBotError extends Error {
2
+ constructor(message: string, options?: {
3
+ cause?: unknown;
4
+ });
2
5
  }
3
6
  //# sourceMappingURL=testingbot_error.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"testingbot_error.d.ts","sourceRoot":"","sources":["../../src/models/testingbot_error.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,KAAK;CAAG"}
1
+ {"version":3,"file":"testingbot_error.d.ts","sourceRoot":"","sources":["../../src/models/testingbot_error.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,KAAK;gBACpC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAK3D"}
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  class TestingBotError extends Error {
4
+ constructor(message, options) {
5
+ super(message, options);
6
+ this.name = 'TestingBotError';
7
+ Object.setPrototypeOf(this, TestingBotError.prototype);
8
+ }
4
9
  }
5
10
  exports.default = TestingBotError;