@testingbot/mcp-server 1.0.2 โ†’ 1.1.0

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.
package/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![NPM Version](https://img.shields.io/npm/v/@testingbot/mcp-server)](https://www.npmjs.com/package/@testingbot/mcp-server)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![MCP Badge](https://lobehub.com/badge/mcp/testingbot-mcp-server)](https://lobehub.com/mcp/testingbot-mcp-server)
5
6
 
6
7
  TestingBot's official Model Context Protocol (MCP) server implementation. This server enables AI assistants to interact with TestingBot's testing infrastructure, allowing you to manage tests, browsers, devices, and more through conversational interfaces.
7
8
 
@@ -15,6 +16,7 @@ After install, set your credentials from [TestingBot account settings](https://t
15
16
 
16
17
  ## Features
17
18
 
19
+ - ๐Ÿ“ฑ **App Automate** - Run Maestro, Espresso, and XCUITest suites on real devices and emulators, straight from the agent
18
20
  - ๐Ÿ–ฅ๏ธ **Live Testing** - Start interactive manual testing sessions on real browsers and devices
19
21
  - ๐ŸŒ **Browser & Device Management** - Query available browsers and real devices
20
22
  - ๐Ÿงช **Test Management** - Create, retrieve, update, and delete tests with comprehensive details
@@ -57,17 +59,30 @@ credentials blank, and just ask the agent:
57
59
 
58
60
  > Log me in to TestingBot.
59
61
 
60
- The agent calls the **`tb_login`** tool, which prints a short URL and code:
62
+ The agent calls the **`tb_login`** tool. It uses OAuth-style browser
63
+ authentication โ€” no secret ever leaves the browser โ€” and picks the right
64
+ mechanism for your environment automatically:
61
65
 
62
- 1. Open the URL in your browser (e.g. `https://testingbot.com/device`).
63
- 2. Enter the code, sign in if needed, and click **Authorize**.
64
- 3. Tell the agent you've authorized โ€” it calls `tb_login` again to finish.
66
+ - **Browser (loopback, the default on a desktop):** your browser opens to a
67
+ TestingBot authorization page. Sign in if needed and click **Authorize**; the
68
+ credentials are captured on a local callback and the agent finishes the
69
+ sign-in. Nothing to type. (RFC 8252.)
70
+ - **Device code (automatic fallback on SSH / remote / dev containers / web):**
71
+ the tool prints a short URL and code instead:
72
+ 1. Open the URL in your browser (e.g. `https://testingbot.com/device`).
73
+ 2. Enter the code, sign in if needed, and click **Authorize**.
74
+ 3. Tell the agent you've authorized โ€” it calls `tb_login` again to finish.
75
+
76
+ (RFC 8628.)
77
+
78
+ You can force a mechanism by passing `mode: "loopback"` or `mode: "device"` to
79
+ `tb_login` (the default is `"auto"`).
65
80
 
66
81
  Your credentials are written to `~/.testingbot/credentials` (mode `0600`) and
67
- used by every subsequent tool call โ€” no restart, no JSON editing, and no secret
68
- ever leaves the browser. This works in any MCP client (VS Code, Cursor, Cline,
69
- Claude Desktop, โ€ฆ). To use a different account, set `TESTINGBOT_PROFILE`; to
70
- relocate the file, set `TESTINGBOT_CONFIG_DIR`.
82
+ used by every subsequent tool call โ€” no restart and no JSON editing. This works
83
+ in any MCP client (VS Code, Cursor, Cline, Claude Desktop, โ€ฆ). To use a different
84
+ account, set `TESTINGBOT_PROFILE`; to relocate the file, set
85
+ `TESTINGBOT_CONFIG_DIR`.
71
86
 
72
87
  #### Environment Variables
73
88
 
@@ -86,6 +101,21 @@ TESTINGBOT_KEY=your-api-key
86
101
  TESTINGBOT_SECRET=your-api-secret
87
102
  ```
88
103
 
104
+ The key also accepts the aliases `TB_KEY` / `TESTINGBOT_USERNAME`, and the secret
105
+ accepts `TB_SECRET` / `TESTINGBOT_ACCESS_KEY`.
106
+
107
+ #### How credentials are resolved
108
+
109
+ Credentials are resolved in this order, highest priority first:
110
+
111
+ 1. **Environment variables** (above) โ€” both a key and a secret must be set. This
112
+ lets CI and per-client config override everything else.
113
+ 2. **The `~/.testingbot/credentials` file** written by `tb_login`, for the active
114
+ profile (`default`, or `TESTINGBOT_PROFILE`).
115
+ 3. **Neither set:** the server starts in a degraded mode where every tool except
116
+ `tb_login` reports "Run tb_login to authenticate" โ€” so first run is
117
+ self-healing rather than a hard error.
118
+
89
119
  #### Claude Desktop
90
120
 
91
121
  Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%/Claude/claude_desktop_config.json` (Windows):
@@ -347,6 +377,108 @@ Delete a file from TestingBot storage.
347
377
  **Example prompt:**
348
378
  > "Delete app tb://app123 from storage"
349
379
 
380
+ ### App Automate โ€” Maestro
381
+
382
+ Run [Maestro](https://maestro.dev) flows on TestingBot real devices, emulators, and simulators. Runs are **asynchronous**: start one, poll its status, then fetch results โ€” the agent is never blocked while devices execute.
383
+
384
+ #### `uploadMaestroApp`
385
+ Upload the app under test (`.apk`, `.aab`, `.ipa`, or zipped `.app`). Uploads are deduplicated by checksum โ€” re-running with the same binary is instant.
386
+
387
+ **Parameters:**
388
+ - `localFilePath`: Local path to the app file
389
+
390
+ Returns a **Project ID** used by the other Maestro tools.
391
+
392
+ **Example prompt:**
393
+ > "Upload ./build/app.apk for Maestro testing"
394
+
395
+ #### `uploadMaestroFlows`
396
+ Upload the Maestro flow YAML files for a project. Accepts a directory (structure preserved, so `runFlow` subflows keep working), a pre-built `.zip`, or **inline YAML** written by the agent. Replaces previously uploaded flows.
397
+
398
+ **Parameters:**
399
+ - `projectId`: Project ID from `uploadMaestroApp`
400
+ - `flowsPath` (optional): Directory or `.zip` of flow YAML files
401
+ - `flows` (optional): Inline flows as `[{ fileName, content }]`
402
+
403
+ #### `runMaestroTest`
404
+ Start a Maestro run. Returns immediately with the run ID โ€” poll with `getMaestroRunStatus`.
405
+
406
+ **Parameters:**
407
+ - `projectId`: Project ID
408
+ - `platformName`: "Android" or "iOS"
409
+ - `deviceName` (optional): Device name, wildcards/regex supported (e.g. `"Pixel 8"`, `"iPhone 1[4-6]"`, `"*"`)
410
+ - `version` (optional): OS version
411
+ - `realDevice` (optional): Run on a physical device (required for `.ipa`)
412
+ - `name` (optional): Run name shown in the dashboard
413
+ - `env` (optional): Environment variables passed to the flows
414
+ - `includeTags` / `excludeTags` (optional): Filter flows by Maestro tags
415
+ - `shardSplit` (optional): Split flows across parallel devices
416
+ - `otherApps` (optional): Up to 4 companion app URLs to install alongside the app
417
+
418
+ **Example prompt:**
419
+ > "Run my Maestro flows on a real Pixel 8 with Android 14"
420
+
421
+ #### `getMaestroRunStatus`
422
+ Poll run progress. Lists per-flow statuses (WAITING, READY, DONE, FAILED, CANCELLED), failures first.
423
+
424
+ #### `getMaestroRunResults`
425
+ Final results of a completed run: per-flow outcomes plus the JUnit XML report.
426
+
427
+ #### `getMaestroFlowDetails`
428
+ Deep-dive into one flow: error messages, step-level JUnit report, and links to the video, screenshots, and device logs. This is the debugging tool โ€” fetch it for a failed flow, fix the YAML, then retry.
429
+
430
+ **Parameters:** `projectId`, `runId`, `flowId`
431
+
432
+ #### `cancelMaestroRun` / `retryMaestroRun`
433
+ Cancel a running run, or retry a run โ€” pass `flowId` to retry only a single failed flow.
434
+
435
+ #### `uploadMaestroCompanionApp`
436
+ Upload a supplementary app installed alongside the app under test. Returns a `tb://` URL for `runMaestroTest`'s `otherApps`.
437
+
438
+ #### `listMaestroProjects` / `listMaestroRuns`
439
+ Discover existing projects (app, flows, run IDs) and runs across the account. `listMaestroRuns` accepts a `buildName` to look up runs by name โ€” e.g. "rerun whatever failed in last night's `nightly` build".
440
+
441
+ #### `maestroCheatSheet`
442
+ Returns a Maestro YAML syntax reference (commands, selectors, flow structure, and the TestingBot workflow). Agents call this before writing or fixing flows.
443
+
444
+ **Example workflow:**
445
+ ```
446
+ User: "Run the Maestro flows in ./flows against ./app.apk on a real Pixel 8. Fix any failures."
447
+ Assistant: [uploadMaestroApp โ†’ uploadMaestroFlows โ†’ runMaestroTest]
448
+ Assistant: [polls getMaestroRunStatus until complete]
449
+ Assistant: [getMaestroFlowDetails for the failed flow, reads the error + screenshots]
450
+ Assistant: [fixes the flow YAML, uploadMaestroFlows, retryMaestroRun]
451
+ ```
452
+
453
+ ### App Automate โ€” Espresso & XCUITest
454
+
455
+ Run pre-built Espresso (Android) and XCUITest (iOS) suites on TestingBot devices. Same async pattern: start, poll, fetch results.
456
+
457
+ #### `uploadAppAutomateApp`
458
+ Upload the app under test: `.apk`/`.aab` for Espresso, `.ipa` for XCUITest.
459
+
460
+ **Parameters:** `framework` ("espresso" or "xcuitest"), `localFilePath`
461
+
462
+ #### `uploadAppAutomateTests`
463
+ Upload the test suite: the instrumented test `.apk` for Espresso, or the zipped XCUITest runner bundle.
464
+
465
+ **Parameters:** `framework`, `projectId`, `localFilePath`
466
+
467
+ #### `runAppAutomateTest`
468
+ Start a run. Returns immediately with the run ID.
469
+
470
+ **Parameters:**
471
+ - `framework`, `projectId`
472
+ - `deviceName`, `version`, `realDevice`, `name`, `build` (optional): device selection and metadata
473
+ - `testClasses`, `skipTestClasses`, `packages`, `annotations`, `testRunner` (optional, Espresso only): test filtering
474
+ - `locale`, `timeZone` (optional)
475
+
476
+ **Example prompt:**
477
+ > "Run the Espresso suite on a real Galaxy S23, only the com.example.LoginTest class"
478
+
479
+ #### `getAppAutomateRunStatus` / `getAppAutomateRunResults`
480
+ Poll run progress, then fetch per-run outcomes and the JUnit XML report. Each run's Appium session ID is surfaced, so `getTestDetails` / `getFailureLogs` work for logs and video.
481
+
350
482
  ### Screenshot Testing
351
483
 
352
484
  #### `takeScreenshot`
@@ -497,7 +629,22 @@ User: "Show me the last 10 tests"
497
629
  Assistant: [Shows recent test results]
498
630
  ```
499
631
 
500
- ### Example 3: Build Management
632
+ ### Example 3: Agent-Driven Maestro Testing on Real Devices
633
+
634
+ ```
635
+ User: "Write a Maestro flow that logs into my app and run it on a real Pixel 8"
636
+ Assistant: [maestroCheatSheet for syntax, writes the flow YAML]
637
+ Assistant: [uploadMaestroApp ./app.apk โ†’ project 42]
638
+ Assistant: [uploadMaestroFlows with the inline flow]
639
+ Assistant: [runMaestroTest on Pixel 8 with realDevice: true โ†’ run 101]
640
+ Assistant: [polls getMaestroRunStatus, then getMaestroRunResults]
641
+
642
+ User: "The checkout flow failed โ€” figure out why and fix it"
643
+ Assistant: [getMaestroFlowDetails โ†’ reads error + screenshots + video]
644
+ Assistant: [fixes the YAML, uploadMaestroFlows, retryMaestroRun]
645
+ ```
646
+
647
+ ### Example 4: Build Management
501
648
 
502
649
  ```
503
650
  User: "Show me my recent builds"
@@ -510,7 +657,7 @@ User: "Mark test xyz789 as passed with build name 'Release 1.0'"
510
657
  Assistant: [Updates test]
511
658
  ```
512
659
 
513
- ### Example 4: Team & Tunnel Management
660
+ ### Example 5: Team & Tunnel Management
514
661
 
515
662
  ```
516
663
  User: "Show me my team information"
@@ -523,7 +670,7 @@ User: "Show me all active tunnels"
523
670
  Assistant: [Lists active TestingBot tunnels]
524
671
  ```
525
672
 
526
- ### Example 5: CDP Automation
673
+ ### Example 6: CDP Automation
527
674
 
528
675
  ```
529
676
  User: "Create a CDP session on Chrome latest with Windows 11"
@@ -673,8 +820,11 @@ testingbot-mcp-server/
673
820
  โ”‚ โ”‚ โ”œโ”€โ”€ error.ts # Error classes
674
821
  โ”‚ โ”‚ โ”œโ”€โ”€ logger.ts # Logging setup
675
822
  โ”‚ โ”‚ โ”œโ”€โ”€ utils.ts # Utility functions
676
- โ”‚ โ”‚ โ””โ”€โ”€ get-auth.ts # Authentication helpers
823
+ โ”‚ โ”‚ โ”œโ”€โ”€ get-auth.ts # Authentication helpers
824
+ โ”‚ โ”‚ โ””โ”€โ”€ app-automate-client.ts # REST client for Maestro/Espresso/XCUITest
677
825
  โ”‚ โ””โ”€โ”€ tools/
826
+ โ”‚ โ”œโ”€โ”€ maestro.ts # Maestro run tools (upload, run, poll, diagnose)
827
+ โ”‚ โ”œโ”€โ”€ app-automate.ts # Espresso & XCUITest run tools
678
828
  โ”‚ โ”œโ”€โ”€ browsers.ts # Browser & device tools
679
829
  โ”‚ โ”œโ”€โ”€ tests.ts # Test management tools
680
830
  โ”‚ โ”œโ”€โ”€ builds.ts # Build management tools
@@ -0,0 +1,201 @@
1
+ import { TestingBotConfig } from "./types.js";
2
+ export type AppAutomateFramework = "espresso" | "xcuitest";
3
+ export interface MaestroCapabilities {
4
+ deviceName: string;
5
+ platformName: "Android" | "iOS";
6
+ version?: string;
7
+ name?: string;
8
+ realDevice?: string;
9
+ [key: string]: unknown;
10
+ }
11
+ export interface MaestroRunOptions {
12
+ env?: Record<string, string>;
13
+ includeTags?: string[];
14
+ excludeTags?: string[];
15
+ version?: string;
16
+ }
17
+ export interface MaestroFlowInfo {
18
+ id: number;
19
+ name: string;
20
+ status: "WAITING" | "READY" | "DONE" | "FAILED" | "CANCELLED";
21
+ success?: number;
22
+ shard_index?: number;
23
+ error_messages?: string[];
24
+ assets?: {
25
+ logs?: Record<string, string> | string;
26
+ video?: string | false;
27
+ screenshots?: string[];
28
+ };
29
+ }
30
+ export interface MaestroRunInfo {
31
+ id: number;
32
+ status: "WAITING" | "READY" | "DONE" | "FAILED" | "CANCELLED";
33
+ capabilities?: {
34
+ deviceName: string;
35
+ platformName: string;
36
+ version?: string;
37
+ };
38
+ environment?: {
39
+ device?: string;
40
+ name?: string;
41
+ version?: string;
42
+ };
43
+ success: number;
44
+ flows?: MaestroFlowInfo[];
45
+ error_messages?: string[];
46
+ }
47
+ export interface MaestroProjectStatus {
48
+ runs: MaestroRunInfo[];
49
+ success: boolean;
50
+ completed: boolean;
51
+ }
52
+ export interface MaestroRunDetails extends MaestroRunInfo {
53
+ completed: boolean;
54
+ }
55
+ export interface MaestroFlowResult extends MaestroFlowInfo {
56
+ maestro_flow_id?: number;
57
+ test_case_id?: number;
58
+ report?: string;
59
+ requested_at?: string;
60
+ completed_at?: string;
61
+ test?: {
62
+ sessionId?: string;
63
+ environment?: {
64
+ name?: string;
65
+ os?: string;
66
+ version?: string;
67
+ };
68
+ };
69
+ assets_synced?: boolean;
70
+ }
71
+ export interface MaestroProjectSummary {
72
+ id: number;
73
+ name?: string;
74
+ created_at?: string;
75
+ updated_at?: string;
76
+ completed: boolean;
77
+ app?: {
78
+ app_url?: string;
79
+ icon_url?: string;
80
+ app_version?: string;
81
+ bundle_id?: string;
82
+ };
83
+ flows?: Array<{
84
+ id: number;
85
+ name?: string;
86
+ }>;
87
+ runs?: number[];
88
+ }
89
+ export interface MaestroRunSummary {
90
+ id: number;
91
+ project_id: number;
92
+ name?: string;
93
+ status: string;
94
+ success?: number;
95
+ capabilities?: Record<string, unknown>;
96
+ created_at?: string;
97
+ completed_at?: string;
98
+ }
99
+ export interface PaginationMeta {
100
+ offset: number;
101
+ count: number;
102
+ total: number;
103
+ }
104
+ export interface MaestroRunStarted {
105
+ success: boolean;
106
+ id: number;
107
+ runs?: Array<{
108
+ id: number;
109
+ capabilities?: Record<string, unknown>;
110
+ flows?: MaestroFlowInfo[];
111
+ }>;
112
+ }
113
+ export interface FrameworkCapabilities {
114
+ deviceName: string;
115
+ platformName: "Android" | "iOS";
116
+ version?: string;
117
+ name?: string;
118
+ build?: string;
119
+ realDevice?: string;
120
+ [key: string]: unknown;
121
+ }
122
+ export interface FrameworkRunInfo {
123
+ id: number;
124
+ created_at?: string;
125
+ status: string;
126
+ capabilities?: Record<string, unknown>;
127
+ success: boolean;
128
+ report?: string;
129
+ test?: {
130
+ sessionId?: string;
131
+ environment?: {
132
+ name?: string;
133
+ os?: string;
134
+ version?: string;
135
+ };
136
+ };
137
+ }
138
+ export interface FrameworkProjectStatus {
139
+ runs: FrameworkRunInfo[];
140
+ success: boolean;
141
+ completed: boolean;
142
+ }
143
+ export interface FrameworkRunStarted {
144
+ success: boolean;
145
+ id: number;
146
+ runs: Array<{
147
+ id: number;
148
+ capabilities?: Record<string, unknown>;
149
+ }>;
150
+ }
151
+ export declare class AppAutomateClient {
152
+ private authHeader;
153
+ constructor(config: TestingBotConfig);
154
+ static md5Checksum(filePath: string): Promise<string>;
155
+ findAppByChecksum(checksum: string): Promise<number | null>;
156
+ uploadApp(filePath: string): Promise<{
157
+ id: number;
158
+ }>;
159
+ uploadOtherApp(filePath: string): Promise<{
160
+ id: number;
161
+ app_url: string;
162
+ }>;
163
+ uploadFlowsZip(projectId: number, zipBuffer: Buffer, fileName: string): Promise<unknown>;
164
+ startRun(projectId: number, capabilities: MaestroCapabilities, maestroOptions?: MaestroRunOptions, shardSplit?: number, otherApps?: string[]): Promise<MaestroRunStarted>;
165
+ getProjectStatus(projectId: number): Promise<MaestroProjectStatus>;
166
+ getRun(projectId: number, runId: number): Promise<MaestroRunDetails>;
167
+ getJunitReport(projectId: number, runId: number): Promise<string>;
168
+ cancelRun(projectId: number, runId: number): Promise<void>;
169
+ listProjects(offset?: number, count?: number): Promise<{
170
+ data: MaestroProjectSummary[];
171
+ meta: PaginationMeta;
172
+ }>;
173
+ listRuns(offset?: number, count?: number): Promise<{
174
+ data: MaestroRunSummary[];
175
+ meta: PaginationMeta;
176
+ }>;
177
+ findRunsByBuildName(buildName: string): Promise<{
178
+ data: MaestroRunSummary[];
179
+ }>;
180
+ getFlowResult(projectId: number, runId: number, flowId: number): Promise<MaestroFlowResult>;
181
+ retryRun(projectId: number, runId: number): Promise<unknown>;
182
+ retryFlow(projectId: number, runId: number, flowId: number): Promise<unknown>;
183
+ uploadFrameworkApp(framework: AppAutomateFramework, filePath: string): Promise<{
184
+ id: number;
185
+ }>;
186
+ uploadFrameworkTests(framework: AppAutomateFramework, projectId: number, filePath: string): Promise<{
187
+ id: number;
188
+ }>;
189
+ startFrameworkRun(framework: AppAutomateFramework, projectId: number, capabilities: FrameworkCapabilities, options?: Record<string, unknown>): Promise<FrameworkRunStarted>;
190
+ getFrameworkProject(framework: AppAutomateFramework, projectId: number): Promise<FrameworkProjectStatus>;
191
+ getFrameworkRun(framework: AppAutomateFramework, projectId: number, runId: number): Promise<FrameworkRunInfo>;
192
+ getFrameworkProjectReport(framework: AppAutomateFramework, projectId: number): Promise<string>;
193
+ getXcuitestRunJunitReport(projectId: number, runId: number): Promise<string>;
194
+ private contentTypeFor;
195
+ private uploadFile;
196
+ private submitForm;
197
+ private requestJson;
198
+ private rawRequest;
199
+ private parseResponse;
200
+ }
201
+ //# sourceMappingURL=app-automate-client.d.ts.map
@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AAM,GAChB,OAAO,CAAC,MAAM,CAAC;IAUZ,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKlF,OAAO,CAAC,cAAc;YAOR,UAAU;YAeV,UAAU;YAUV,WAAW;YAKX,UAAU;YAuBV,aAAa;CAY5B"}
@@ -0,0 +1,179 @@
1
+ import crypto from "crypto";
2
+ import fs from "fs";
3
+ import path from "path";
4
+ import { getAuth } from "./get-auth.js";
5
+ // Minimal REST client for TestingBot's App Automate (Maestro, Espresso,
6
+ // XCUITest) API. These endpoints are not covered by the testingbot-api npm
7
+ // package, so we call them directly. Endpoint contract mirrors
8
+ // testingbotctl's providers (https://github.com/testingbot/testingbotctl).
9
+ const APP_AUTOMATE_URL = "https://api.testingbot.com/v1/app-automate";
10
+ const JSON_TIMEOUT_MS = 30_000;
11
+ const UPLOAD_TIMEOUT_MS = 600_000;
12
+ export class AppAutomateClient {
13
+ authHeader;
14
+ constructor(config) {
15
+ const { username, password } = getAuth(config);
16
+ this.authHeader = "Basic " + Buffer.from(`${username}:${password}`).toString("base64");
17
+ }
18
+ static md5Checksum(filePath) {
19
+ return new Promise((resolve, reject) => {
20
+ const hash = crypto.createHash("md5");
21
+ const stream = fs.createReadStream(filePath);
22
+ stream.on("data", (chunk) => hash.update(chunk));
23
+ stream.on("end", () => resolve(hash.digest("base64")));
24
+ stream.on("error", reject);
25
+ });
26
+ }
27
+ // POST /app/checksum โ€” returns the existing project id if this exact app
28
+ // binary was uploaded before, so re-runs skip the upload entirely.
29
+ async findAppByChecksum(checksum) {
30
+ try {
31
+ const result = await this.requestJson("POST", `/maestro/app/checksum`, { checksum });
32
+ return result.app_exists && result.id ? Number(result.id) : null;
33
+ }
34
+ catch {
35
+ return null; // checksum check is an optimization; fall back to upload
36
+ }
37
+ }
38
+ async uploadApp(filePath) {
39
+ return this.uploadFile(`/maestro/app`, filePath, this.contentTypeFor(filePath));
40
+ }
41
+ // Companion apps installed alongside the app under test; the returned
42
+ // tb:// app_url goes into the run's otherApps list.
43
+ async uploadOtherApp(filePath) {
44
+ return this.uploadFile(`/maestro/other-apps`, filePath, this.contentTypeFor(filePath));
45
+ }
46
+ async uploadFlowsZip(projectId, zipBuffer, fileName) {
47
+ const form = new FormData();
48
+ form.append("file", new Blob([new Uint8Array(zipBuffer)], { type: "application/zip" }), fileName);
49
+ return this.submitForm(`/maestro/${projectId}/tests`, form);
50
+ }
51
+ async startRun(projectId, capabilities, maestroOptions, shardSplit, otherApps) {
52
+ return this.requestJson("POST", `/maestro/${projectId}/run`, {
53
+ capabilities: [capabilities],
54
+ ...(maestroOptions && Object.keys(maestroOptions).length > 0 && { maestroOptions }),
55
+ ...(shardSplit && { shardSplit }),
56
+ ...(otherApps && otherApps.length > 0 && { otherApps }),
57
+ });
58
+ }
59
+ async getProjectStatus(projectId) {
60
+ return this.requestJson("GET", `/maestro/${projectId}`);
61
+ }
62
+ async getRun(projectId, runId) {
63
+ return this.requestJson("GET", `/maestro/${projectId}/${runId}`);
64
+ }
65
+ async getJunitReport(projectId, runId) {
66
+ const response = await this.rawRequest("GET", `/maestro/${projectId}/${runId}/junit_report`, undefined, JSON_TIMEOUT_MS);
67
+ return response.text();
68
+ }
69
+ async cancelRun(projectId, runId) {
70
+ const response = await this.rawRequest("POST", `/maestro/${projectId}/${runId}/cancel`, {}, JSON_TIMEOUT_MS, true);
71
+ // 409 means the run already reached a terminal state โ€” treat as success.
72
+ if (!response.ok && response.status !== 409) {
73
+ throw new Error(`Cancel failed with HTTP ${response.status}: ${await response.text()}`);
74
+ }
75
+ }
76
+ async listProjects(offset = 0, count = 10) {
77
+ return this.requestJson("GET", `/maestro?offset=${offset}&count=${count}`);
78
+ }
79
+ async listRuns(offset = 0, count = 10) {
80
+ return this.requestJson("GET", `/maestro/runs?offset=${offset}&count=${count}`);
81
+ }
82
+ async findRunsByBuildName(buildName) {
83
+ return this.requestJson("GET", `/maestro/runs/${encodeURIComponent(buildName)}`);
84
+ }
85
+ async getFlowResult(projectId, runId, flowId) {
86
+ return this.requestJson("GET", `/maestro/${projectId}/${runId}/flow/${flowId}`);
87
+ }
88
+ async retryRun(projectId, runId) {
89
+ return this.requestJson("POST", `/maestro/${projectId}/${runId}/retry`, {});
90
+ }
91
+ async retryFlow(projectId, runId, flowId) {
92
+ return this.requestJson("POST", `/maestro/${projectId}/${runId}/${flowId}/retry`, {});
93
+ }
94
+ // --- Espresso / XCUITest (shared endpoint shape, no checksum/cancel/retry) ---
95
+ async uploadFrameworkApp(framework, filePath) {
96
+ return this.uploadFile(`/${framework}/app`, filePath, this.contentTypeFor(filePath));
97
+ }
98
+ async uploadFrameworkTests(framework, projectId, filePath) {
99
+ return this.uploadFile(`/${framework}/${projectId}/tests`, filePath, this.contentTypeFor(filePath));
100
+ }
101
+ // Espresso expects its options under `espressoOptions`; XCUITest under `options`.
102
+ async startFrameworkRun(framework, projectId, capabilities, options) {
103
+ const optionsKey = framework === "espresso" ? "espressoOptions" : "options";
104
+ return this.requestJson("POST", `/${framework}/${projectId}/run`, {
105
+ capabilities: [capabilities],
106
+ ...(options && Object.keys(options).length > 0 && { [optionsKey]: options }),
107
+ });
108
+ }
109
+ async getFrameworkProject(framework, projectId) {
110
+ return this.requestJson("GET", `/${framework}/${projectId}`);
111
+ }
112
+ async getFrameworkRun(framework, projectId, runId) {
113
+ return this.requestJson("GET", `/${framework}/${projectId}/${runId}`);
114
+ }
115
+ // Project-level JUnit XML report (all runs). XCUITest additionally has a
116
+ // per-run junit_report endpoint; Espresso does not.
117
+ async getFrameworkProjectReport(framework, projectId) {
118
+ const response = await this.rawRequest("GET", `/${framework}/${projectId}/report`, undefined, JSON_TIMEOUT_MS);
119
+ return response.text();
120
+ }
121
+ async getXcuitestRunJunitReport(projectId, runId) {
122
+ const result = await this.requestJson("GET", `/xcuitest/${projectId}/${runId}/junit_report`);
123
+ return result.junit_report ?? "";
124
+ }
125
+ contentTypeFor(filePath) {
126
+ const ext = path.extname(filePath).toLowerCase();
127
+ if (ext === ".apk")
128
+ return "application/vnd.android.package-archive";
129
+ if (ext === ".zip")
130
+ return "application/zip";
131
+ return "application/octet-stream";
132
+ }
133
+ async uploadFile(endpoint, filePath, contentType) {
134
+ const buffer = await fs.promises.readFile(filePath);
135
+ const form = new FormData();
136
+ form.append("file", new Blob([new Uint8Array(buffer)], { type: contentType }), path.basename(filePath));
137
+ return this.submitForm(endpoint, form);
138
+ }
139
+ async submitForm(endpoint, form) {
140
+ const response = await fetch(`${APP_AUTOMATE_URL}${endpoint}`, {
141
+ method: "POST",
142
+ headers: { Authorization: this.authHeader },
143
+ body: form,
144
+ signal: AbortSignal.timeout(UPLOAD_TIMEOUT_MS),
145
+ });
146
+ return this.parseResponse(response);
147
+ }
148
+ async requestJson(method, endpoint, body) {
149
+ const response = await this.rawRequest(method, endpoint, body, JSON_TIMEOUT_MS);
150
+ return this.parseResponse(response);
151
+ }
152
+ async rawRequest(method, endpoint, body, timeoutMs, allowErrorStatus = false) {
153
+ const response = await fetch(`${APP_AUTOMATE_URL}${endpoint}`, {
154
+ method,
155
+ headers: {
156
+ Authorization: this.authHeader,
157
+ ...(body !== undefined && { "Content-Type": "application/json" }),
158
+ },
159
+ ...(body !== undefined && { body: JSON.stringify(body) }),
160
+ signal: AbortSignal.timeout(timeoutMs),
161
+ });
162
+ if (!response.ok && !allowErrorStatus) {
163
+ const text = await response.text().catch(() => "");
164
+ throw new Error(`TestingBot API returned HTTP ${response.status}: ${text.slice(0, 500)}`);
165
+ }
166
+ return response;
167
+ }
168
+ async parseResponse(response) {
169
+ const result = await response.json();
170
+ // The API can report failures inside a 200 body as { success: false, errors: [...] }.
171
+ // Note: status endpoints also carry a `success` field meaning "all runs
172
+ // passed" โ€” only treat it as an error when an error payload accompanies it.
173
+ if (result && result.success === false && (result.errors || result.error)) {
174
+ throw new Error(result.errors?.join("\n") || result.error || "TestingBot API reported failure");
175
+ }
176
+ return result;
177
+ }
178
+ }
179
+ //# sourceMapping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