digital-ai-testing-mcp 1.2.8 → 2.0.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 +147 -46
- package/dist/api/browser-inspection.d.ts.map +1 -1
- package/dist/api/browser-inspection.js +14 -15
- package/dist/api/browser-inspection.js.map +1 -1
- package/dist/api/client.d.ts +7 -0
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +9 -0
- package/dist/api/client.js.map +1 -1
- package/dist/api/projects.d.ts +16 -3
- package/dist/api/projects.d.ts.map +1 -1
- package/dist/api/projects.js +60 -18
- package/dist/api/projects.js.map +1 -1
- package/dist/api/reporting.d.ts +91 -0
- package/dist/api/reporting.d.ts.map +1 -1
- package/dist/api/reporting.js +178 -6
- package/dist/api/reporting.js.map +1 -1
- package/dist/api/test-orchestrator.d.ts +59 -0
- package/dist/api/test-orchestrator.d.ts.map +1 -0
- package/dist/api/test-orchestrator.js +126 -0
- package/dist/api/test-orchestrator.js.map +1 -0
- package/dist/api/test-runs.d.ts +80 -0
- package/dist/api/test-runs.d.ts.map +1 -0
- package/dist/api/test-runs.js +209 -0
- package/dist/api/test-runs.js.map +1 -0
- package/dist/api/test-views.d.ts.map +1 -1
- package/dist/api/test-views.js +5 -1
- package/dist/api/test-views.js.map +1 -1
- package/dist/api/transactions.d.ts +6 -0
- package/dist/api/transactions.d.ts.map +1 -1
- package/dist/api/transactions.js +19 -3
- package/dist/api/transactions.js.map +1 -1
- package/dist/api/usage-reports.d.ts.map +1 -1
- package/dist/api/usage-reports.js +3 -3
- package/dist/api/usage-reports.js.map +1 -1
- package/dist/api/webdriver.d.ts +39 -1
- package/dist/api/webdriver.d.ts.map +1 -1
- package/dist/api/webdriver.js +169 -65
- package/dist/api/webdriver.js.map +1 -1
- package/dist/index.js +79 -32
- package/dist/index.js.map +1 -1
- package/dist/tools/agent-tools.js +2 -2
- package/dist/tools/agent-tools.js.map +1 -1
- package/dist/tools/application-tools.d.ts.map +1 -1
- package/dist/tools/application-tools.js +5 -4
- package/dist/tools/application-tools.js.map +1 -1
- package/dist/tools/boilerplate-tools.d.ts +3 -0
- package/dist/tools/boilerplate-tools.d.ts.map +1 -1
- package/dist/tools/boilerplate-tools.js +301 -20
- package/dist/tools/boilerplate-tools.js.map +1 -1
- package/dist/tools/browser-tools.d.ts.map +1 -1
- package/dist/tools/browser-tools.js +8 -5
- package/dist/tools/browser-tools.js.map +1 -1
- package/dist/tools/device-group-tools.js +5 -5
- package/dist/tools/device-group-tools.js.map +1 -1
- package/dist/tools/device-tools.d.ts.map +1 -1
- package/dist/tools/device-tools.js +5 -4
- package/dist/tools/device-tools.js.map +1 -1
- package/dist/tools/health-tools.d.ts.map +1 -1
- package/dist/tools/health-tools.js +5 -4
- package/dist/tools/health-tools.js.map +1 -1
- package/dist/tools/inspection-tools.d.ts.map +1 -1
- package/dist/tools/inspection-tools.js +110 -10
- package/dist/tools/inspection-tools.js.map +1 -1
- package/dist/tools/meta-tools.d.ts +4 -1
- package/dist/tools/meta-tools.d.ts.map +1 -1
- package/dist/tools/meta-tools.js +59 -36
- package/dist/tools/meta-tools.js.map +1 -1
- package/dist/tools/performance-tools.d.ts.map +1 -1
- package/dist/tools/performance-tools.js +1 -7
- package/dist/tools/performance-tools.js.map +1 -1
- package/dist/tools/project-tools.d.ts.map +1 -1
- package/dist/tools/project-tools.js +38 -19
- package/dist/tools/project-tools.js.map +1 -1
- package/dist/tools/provisioning-profile-tools.d.ts.map +1 -1
- package/dist/tools/provisioning-profile-tools.js +5 -4
- package/dist/tools/provisioning-profile-tools.js.map +1 -1
- package/dist/tools/remediation-tools.d.ts +7 -0
- package/dist/tools/remediation-tools.d.ts.map +1 -0
- package/dist/tools/remediation-tools.js +50 -0
- package/dist/tools/remediation-tools.js.map +1 -0
- package/dist/tools/reporting-tools.d.ts.map +1 -1
- package/dist/tools/reporting-tools.js +334 -134
- package/dist/tools/reporting-tools.js.map +1 -1
- package/dist/tools/repository-tools.d.ts.map +1 -1
- package/dist/tools/repository-tools.js +5 -4
- package/dist/tools/repository-tools.js.map +1 -1
- package/dist/tools/reservation-tools.js +2 -2
- package/dist/tools/reservation-tools.js.map +1 -1
- package/dist/tools/test-run-tools.d.ts +3 -0
- package/dist/tools/test-run-tools.d.ts.map +1 -0
- package/dist/tools/test-run-tools.js +284 -0
- package/dist/tools/test-run-tools.js.map +1 -0
- package/dist/tools/test-view-tools.d.ts.map +1 -1
- package/dist/tools/test-view-tools.js +11 -11
- package/dist/tools/test-view-tools.js.map +1 -1
- package/dist/tools/toolset-tools.d.ts +8 -0
- package/dist/tools/toolset-tools.d.ts.map +1 -0
- package/dist/tools/toolset-tools.js +40 -0
- package/dist/tools/toolset-tools.js.map +1 -0
- package/dist/tools/transaction-tools.d.ts.map +1 -1
- package/dist/tools/transaction-tools.js +17 -7
- package/dist/tools/transaction-tools.js.map +1 -1
- package/dist/tools/usage-report-tools.d.ts.map +1 -1
- package/dist/tools/usage-report-tools.js +43 -15
- package/dist/tools/usage-report-tools.js.map +1 -1
- package/dist/tools/user-tools.js +2 -2
- package/dist/tools/user-tools.js.map +1 -1
- package/dist/tools/web-inspection-tools.d.ts.map +1 -1
- package/dist/tools/web-inspection-tools.js +39 -26
- package/dist/tools/web-inspection-tools.js.map +1 -1
- package/dist/tools/workflow-tools.js +1 -1
- package/dist/types/digital-ai.d.ts +14 -1
- package/dist/types/digital-ai.d.ts.map +1 -1
- package/dist/utils/browser-name.d.ts +2 -0
- package/dist/utils/browser-name.d.ts.map +1 -0
- package/dist/utils/browser-name.js +19 -0
- package/dist/utils/browser-name.js.map +1 -0
- package/dist/utils/command-payload.d.ts +19 -0
- package/dist/utils/command-payload.d.ts.map +1 -0
- package/dist/utils/command-payload.js +13 -0
- package/dist/utils/command-payload.js.map +1 -0
- package/dist/utils/csv.d.ts +6 -0
- package/dist/utils/csv.d.ts.map +1 -1
- package/dist/utils/csv.js +28 -2
- package/dist/utils/csv.js.map +1 -1
- package/dist/utils/locality.d.ts +7 -0
- package/dist/utils/locality.d.ts.map +1 -1
- package/dist/utils/locality.js +19 -0
- package/dist/utils/locality.js.map +1 -1
- package/dist/utils/maestro-flow.d.ts +38 -0
- package/dist/utils/maestro-flow.d.ts.map +1 -0
- package/dist/utils/maestro-flow.js +114 -0
- package/dist/utils/maestro-flow.js.map +1 -0
- package/dist/utils/metric-semantics.d.ts +22 -0
- package/dist/utils/metric-semantics.d.ts.map +1 -0
- package/dist/utils/metric-semantics.js +24 -0
- package/dist/utils/metric-semantics.js.map +1 -0
- package/dist/utils/pagination.d.ts +11 -0
- package/dist/utils/pagination.d.ts.map +1 -1
- package/dist/utils/pagination.js +16 -0
- package/dist/utils/pagination.js.map +1 -1
- package/dist/utils/remediation.d.ts +113 -0
- package/dist/utils/remediation.d.ts.map +1 -0
- package/dist/utils/remediation.js +392 -0
- package/dist/utils/remediation.js.map +1 -0
- package/dist/utils/report-ref.d.ts +23 -0
- package/dist/utils/report-ref.d.ts.map +1 -0
- package/dist/utils/report-ref.js +31 -0
- package/dist/utils/report-ref.js.map +1 -0
- package/dist/utils/response-formatter.d.ts +2 -1
- package/dist/utils/response-formatter.d.ts.map +1 -1
- package/dist/utils/response-formatter.js +32 -21
- package/dist/utils/response-formatter.js.map +1 -1
- package/dist/utils/test-orchestrator.d.ts +102 -0
- package/dist/utils/test-orchestrator.d.ts.map +1 -0
- package/dist/utils/test-orchestrator.js +236 -0
- package/dist/utils/test-orchestrator.js.map +1 -0
- package/dist/utils/test-status.d.ts +48 -0
- package/dist/utils/test-status.d.ts.map +1 -0
- package/dist/utils/test-status.js +92 -0
- package/dist/utils/test-status.js.map +1 -0
- package/dist/utils/tool-catalog.d.ts +6 -0
- package/dist/utils/tool-catalog.d.ts.map +1 -0
- package/dist/utils/tool-catalog.js +15 -0
- package/dist/utils/tool-catalog.js.map +1 -0
- package/dist/utils/toolsets.d.ts +79 -0
- package/dist/utils/toolsets.d.ts.map +1 -0
- package/dist/utils/toolsets.js +156 -0
- package/dist/utils/toolsets.js.map +1 -0
- package/dist/utils/usage-report-guard.d.ts +7 -0
- package/dist/utils/usage-report-guard.d.ts.map +1 -1
- package/dist/utils/usage-report-guard.js +18 -1
- package/dist/utils/usage-report-guard.js.map +1 -1
- package/dist/utils/usage-report-summary.d.ts +12 -0
- package/dist/utils/usage-report-summary.d.ts.map +1 -1
- package/dist/utils/usage-report-summary.js +25 -6
- package/dist/utils/usage-report-summary.js.map +1 -1
- package/package.json +40 -4
- package/resources/boilerplate/Android-Native/Java JUnit5/gradle +6 -1
- package/resources/boilerplate/Android-Native/Java JUnit5/gradle-oss +6 -1
- package/resources/boilerplate/Android-Native/java TestNG/AndroidNative-oss.java +2 -2
- package/resources/boilerplate/Android-Native/java TestNG/AndroidNative.java +2 -2
- package/resources/boilerplate/Android-Native/java TestNG/gradle +1 -1
- package/resources/boilerplate/Android-Native/java TestNG/gradle-oss +1 -1
- package/resources/boilerplate/iOS-Native/java-JUnit5/gradle +6 -1
- package/resources/boilerplate/iOS-Native/java-JUnit5/gradle-oss +6 -1
- package/resources/boilerplate/iOS-Native/java-TestNG/gradle +1 -1
- package/resources/boilerplate/iOS-Native/java-TestNG/gradle-oss +1 -1
- package/resources/boilerplate/iOS-Native/java-TestNG/iOSNative-oss.java +2 -2
- package/resources/boilerplate/iOS-Native/java-TestNG/iOSNative.java +2 -2
- package/resources/test-orchestrator/agent.json +19 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Digital.ai Testing — MCP Server
|
|
8
8
|
|
|
9
|
-
An MCP (Model Context Protocol) server that connects AI assistants to a Digital.ai Testing device farm. The server exposes **
|
|
9
|
+
An MCP (Model Context Protocol) server that connects AI assistants to a Digital.ai Testing device farm. The server exposes **202 tools**, **2 resources**, and **7 prompts** covering 27 capability areas: device management, test execution (including Espresso, XCUITest and Maestro test runs), app lifecycle, reporting and root-cause analysis, analytics, performance, project administration, interactive mobile inspection, interactive browser inspection, and more.
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -53,6 +53,8 @@ Then ask: *"Show me the overall health of the device farm."*
|
|
|
53
53
|
- [Access Keys](#access-keys)
|
|
54
54
|
- [Installation](#installation)
|
|
55
55
|
- [Configuration](#configuration)
|
|
56
|
+
- [Toolsets](#toolsets-reducing-context-size)
|
|
57
|
+
- [Debug mode](#debug-mode-remediation-notes)
|
|
56
58
|
- [Connecting AI Clients](#connecting-ai-clients)
|
|
57
59
|
- [Claude Desktop](#claude-desktop)
|
|
58
60
|
- [Claude Code (VS Code)](#claude-code-vs-code)
|
|
@@ -66,11 +68,13 @@ Then ask: *"Show me the overall health of the device farm."*
|
|
|
66
68
|
- [Project Lifecycle](#project-lifecycle)
|
|
67
69
|
- [Boilerplate Generation](#boilerplate-generation)
|
|
68
70
|
- [Recommended agent guardrails](docs/recommended-agent-guardrails.md)
|
|
71
|
+
- [Performance Comparison Reports](#performance-comparison-reports)
|
|
69
72
|
- [Reference](#reference)
|
|
70
73
|
- [Response Format](#response-format)
|
|
71
74
|
- [Understanding maxResults](#understanding-maxresults)
|
|
72
75
|
- [List Filters & Sorting](#list-filters--sorting)
|
|
73
76
|
- [Test Reporting Schema](#test-reporting-schema)
|
|
77
|
+
- [Local File Transfer](#local-file-transfer-docker--remote-deployments-only)
|
|
74
78
|
- [Safety Guards](#safety-guards)
|
|
75
79
|
- [Development](#development)
|
|
76
80
|
- [Troubleshooting](#troubleshooting)
|
|
@@ -95,7 +99,7 @@ Your Digital.ai access key determines what the MCP server can do on your behalf.
|
|
|
95
99
|
|---|---|
|
|
96
100
|
| **Cloud Admin** | All tools: device management, user provisioning, project administration, infrastructure, performance data |
|
|
97
101
|
| **Project Admin** | Scoped to one project. Can manage device tags, view project admin settings, list users. v2 API tools (agents, regions, license data) return 403. |
|
|
98
|
-
| **Project User** | Scoped to one project. Read/test operations only. Cannot manage tags
|
|
102
|
+
| **Project User** | Scoped to one project. Read/test operations only. Cannot manage tags or access admin settings; deleting reports requires the project's `allowUsersDeleteTests` setting. |
|
|
99
103
|
|
|
100
104
|
> **The key format does not tell you the access level.** Older keys are long `eyJ…` tokens; since Digital.ai 24.11 newly generated keys use a shorter `aut_1_…` token, and that applies to Cloud Admins too. The MCP server therefore detects your access level from the API (`GET /api/v1/users/my-account-info` → `Admin` / `ProjectAdmin` / `User`) and never from the key's prefix. `get_server_info` and `list_environments` show what was detected for each profile.
|
|
101
105
|
|
|
@@ -227,9 +231,78 @@ docker build -t digital-ai-testing-mcp:latest .
|
|
|
227
231
|
| `MCP_DEPLOYMENT_MODE` | Optional | `docker` | `docker` (default) or `local` — set to `local` when running via the npm package ([Option A](#option-a--install-via-npm-recommended)) so tool descriptions and upload/download behavior reflect that the server's filesystem is your own machine, not a container's |
|
|
228
232
|
| `REQUEST_TIMEOUT_MS` | Optional | `30000` | API request timeout in milliseconds |
|
|
229
233
|
| `UPLOAD_TIMEOUT_MS` | Optional | `120000` | File upload timeout in milliseconds |
|
|
234
|
+
| `MCP_TOOLSETS` | Optional | all | Comma-separated toolsets to load in full: `devices`, `apps`, `reporting`, `performance`, `inspection`, `authoring`, `browsers`, `admin` (or `all`, or `core` for only the always-loaded core). See [Toolsets](#toolsets-reducing-context-size) |
|
|
235
|
+
| `MCP_DEBUG_MODE` | Optional | `false` | `true` records remediation notes and a tool-call event log to help improve this MCP. See [Debug mode](#debug-mode-remediation-notes) |
|
|
236
|
+
| `MCP_REMEDIATION_DIR` | Optional | — | Debug mode only: folder to write remediation files to (overrides project detection) |
|
|
237
|
+
| `AXE_DEVTOOLS_API_KEY` | Optional | — | Deque Axe DevTools Mobile key used by `includeAxeScan` boilerplate |
|
|
238
|
+
| `TEST_ORCHESTRATOR_JAR_URL` / `TEST_ORCHESTRATOR_JAR_SHA256` | Optional | pinned | Override the Test Orchestrator agent download location; both are required |
|
|
239
|
+
| `ACCESS_PROBE_TIMEOUT_MS` | Optional | `8000` | Timeout for the access-level detection call |
|
|
230
240
|
|
|
231
241
|
Additional `DAI_PROFILE_{NAME}_URL` / `DAI_PROFILE_{NAME}_KEY` pairs configure named profiles for multi-project or multi-environment use. See [Access Keys](#access-keys) and `.env.example` for examples.
|
|
232
242
|
|
|
243
|
+
### Toolsets (reducing context size)
|
|
244
|
+
|
|
245
|
+
All 202 tool definitions add up to roughly 68K tokens of context. If your AI client is short on context — or runs several MCP servers — set `MCP_TOOLSETS` to the areas you use, e.g. `MCP_TOOLSETS=reporting` (about 25K tokens) or `MCP_TOOLSETS=inspection,authoring` (about 32K).
|
|
246
|
+
|
|
247
|
+
Nothing becomes unavailable. Tools outside the chosen toolsets are still listed, with a one-line description. When the AI calls one, the server loads that whole toolset and replies with the tool's full description and parameter guidance, then the AI calls it again — so the detailed usage guidance is always seen before the tool runs. The AI can also load toolsets up front with `enable_toolset`. Leave `MCP_TOOLSETS` unset (the default) to load everything in full, exactly as before.
|
|
248
|
+
|
|
249
|
+
| Toolset | Covers |
|
|
250
|
+
|---|---|
|
|
251
|
+
| `devices` | Devices, device groups, reservations, health, agents, regions |
|
|
252
|
+
| `apps` | Application repository, file repository, provisioning profiles |
|
|
253
|
+
| `reporting` | Test reports, analytics, root-cause analysis, test views, coverage |
|
|
254
|
+
| `performance` | Performance transactions and comparisons, NV servers |
|
|
255
|
+
| `inspection` | Live device and browser inspection, Android Auto / CarPlay, remote debug |
|
|
256
|
+
| `authoring` | Test boilerplate, Espresso / XCUITest / Maestro test runs |
|
|
257
|
+
| `browsers` | Browser listing and Selenium sessions |
|
|
258
|
+
| `admin` | Users, projects, backups, usage reports, POC and project workflows |
|
|
259
|
+
|
|
260
|
+
Always loaded in full: environment and connection tools (`get_server_info`, `switch_environment`, …), `enable_toolset`, and `validate_test_script`.
|
|
261
|
+
|
|
262
|
+
### Debug mode (remediation notes)
|
|
263
|
+
|
|
264
|
+
Set `MCP_DEBUG_MODE=true` while evaluating or developing the MCP to collect feedback for improving it. With the default `false`, nothing changes.
|
|
265
|
+
|
|
266
|
+
When it is on:
|
|
267
|
+
|
|
268
|
+
- **The AI records notes.** The server asks the AI client to call `record_remediation_note` (a tool that exists only in debug mode) whenever it:
|
|
269
|
+
- hits an error;
|
|
270
|
+
- wastes calls because guidance was unclear;
|
|
271
|
+
- is corrected or stopped by you;
|
|
272
|
+
- gives up;
|
|
273
|
+
- finds a better path than the one recommended;
|
|
274
|
+
- spots a way to make things cleaner or cheaper.
|
|
275
|
+
|
|
276
|
+
It records each note once the situation is resolved or abandoned, not in the middle of your task.
|
|
277
|
+
- **The server logs what it sees.** Every tool call is logged with its duration, response size and outcome (ok, error or guard), with flags for retries and repeated calls. This is objective data the AI can't under-report.
|
|
278
|
+
- **Errors get a reminder.** The first time a tool returns an error or a guard, the response ends with a one-line reminder to record a note.
|
|
279
|
+
|
|
280
|
+
Where the files go: a `remediation/` folder in the root of **the project the AI is working in**, so each note sits next to the app and tests it's about.
|
|
281
|
+
|
|
282
|
+
| Install | Notes | Event log |
|
|
283
|
+
|---|---|---|
|
|
284
|
+
| npm (`MCP_DEPLOYMENT_MODE=local`) | The server writes `<project>/remediation/<yyyymmddhhmmss>-<id>.md` | The server writes `<project>/remediation/<yyyymmddhhmmss>-<id>.events.jsonl` |
|
|
285
|
+
| Docker | Returned to the AI, which saves them to `remediation/` in its project if it can write files (Claude Code can; Claude Desktop needs a filesystem tool) | Kept in server memory; a summary is included in every note |
|
|
286
|
+
|
|
287
|
+
With the npm install, the server finds the project in this order, and records the step it used as `location:` in each file:
|
|
288
|
+
1. `MCP_REMEDIATION_DIR`, if set (files go directly into that folder);
|
|
289
|
+
2. the workspace folder the AI client reports;
|
|
290
|
+
3. the folder the server was started in, if it looks like a project;
|
|
291
|
+
4. `~/remediation`.
|
|
292
|
+
|
|
293
|
+
The `remediation/` folder contains its own `.gitignore` (`*`), so it is never committed to the project it lives in. There is one file per session; the `<id>` suffix keeps parallel sessions apart, and each file records the machine and user, so files collected from several machines can be merged. Keys, tokens, emails and signed-URL parameters are redacted before anything is written or returned.
|
|
294
|
+
|
|
295
|
+
Debug mode costs extra tokens (the instructions and the notes). Leave it off for normal use, and don't use debug sessions as token baselines.
|
|
296
|
+
|
|
297
|
+
To process a batch, collect the `remediation/` folders you want to analyse, from one machine or several, and run `npm run remediation:digest -- --dir <folder> --dir <folder>` in a clone of this repository (the npm package doesn't include it). With no `--dir`, it reads `$MCP_REMEDIATION_DIR`, or else `./remediation` and `~/remediation`. It condenses every unprocessed file into one summary, so the development agent reads a few KB instead of every raw note:
|
|
298
|
+
- notes by category, and issues that recur across sessions;
|
|
299
|
+
- per-tool errors, guards, retries, response sizes and latency;
|
|
300
|
+
- every note in a table.
|
|
301
|
+
|
|
302
|
+
Useful options:
|
|
303
|
+
- `--out <file>` writes the summary to a file; `--since YYYY-MM-DD` limits it to recent sessions; `--json` gives machine-readable output.
|
|
304
|
+
- `--archive <session…>` or `--archive-all` moves handled files into `processed/<date>/` inside the folder they came from. Nothing is deleted.
|
|
305
|
+
|
|
233
306
|
---
|
|
234
307
|
|
|
235
308
|
## Connecting AI Clients
|
|
@@ -420,7 +493,7 @@ Once connected, talk to the server in plain language — no tool names needed:
|
|
|
420
493
|
- *"Find an available Android phone, then generate a Java JUnit5 test boilerplate"*
|
|
421
494
|
- *"Show the pass/fail breakdown by OS — are Android and iOS failing at different rates?"*
|
|
422
495
|
- *"Did the latest release introduce a CPU regression? Compare version 10553 vs 10554 on Android."*
|
|
423
|
-
- *"Set up a new POC for Acme Corp — 6 devices in US2, 3 iOS and 3 Android,
|
|
496
|
+
- *"Set up a new POC for Acme Corp — 6 devices in US2, 3 iOS and 3 Android, for the next 4 weeks"*
|
|
424
497
|
|
|
425
498
|
**[→ docs/examples.md](docs/examples.md)** has 200+ prompts organized by scenario: farm health, device groups, regression sign-off, test analytics, performance, usage reports, interactive inspection, POC lifecycle, and more.
|
|
426
499
|
|
|
@@ -428,7 +501,7 @@ Once connected, talk to the server in plain language — no tool names needed:
|
|
|
428
501
|
|
|
429
502
|
## Capabilities
|
|
430
503
|
|
|
431
|
-
|
|
504
|
+
202 tools across 27 capability domains. The complete per-tool reference — descriptions, filters, auth requirements, and usage notes — lives in **[docs/tools.md](docs/tools.md)**.
|
|
432
505
|
|
|
433
506
|
| Domain | Tools | Highlights |
|
|
434
507
|
|---|---|---|
|
|
@@ -444,21 +517,22 @@ Once connected, talk to the server in plain language — no tool names needed:
|
|
|
444
517
|
| [Backup](docs/tools.md#backup) | 1 | Trigger a system backup |
|
|
445
518
|
| [Health & Diagnostics](docs/tools.md#health--diagnostics) | 11 | Farm health, readiness checks, license utilization |
|
|
446
519
|
| [Coverage Analytics](docs/tools.md#coverage-analytics) | 2 | Tested-vs-available device gap analysis |
|
|
447
|
-
| [Reporting](docs/tools.md#reporting) |
|
|
520
|
+
| [Reporting](docs/tools.md#reporting) | 23 | Search/filter test reports, root-cause analysis, failure summarization, stability, trends, logs, video download (byte ranges), share links, attachment download command, cleanup |
|
|
521
|
+
| [Test Runs](docs/tools.md#test-runs-espresso--xcuitest--maestro) | 5 | Run Espresso, XCUITest and Maestro suites on the platform; status, cancel, local command; generate Maestro flows |
|
|
448
522
|
| [Test Views](docs/tools.md#test-views) | 7 | Dashboard view groups |
|
|
449
|
-
| [Transactions & Performance](docs/tools.md#transactions--performance) | 4 | CPU/memory/battery/Speed Index analytics
|
|
523
|
+
| [Transactions & Performance](docs/tools.md#transactions--performance) | 4 | CPU/memory/battery/Speed Index analytics |
|
|
450
524
|
| [Agents](docs/tools.md#agents) | 2 | Host machine status *(Cloud Admin)* |
|
|
451
525
|
| [Regions](docs/tools.md#regions) | 2 | Region status and infrastructure topology *(Cloud Admin)* |
|
|
452
526
|
| [NV Servers](docs/tools.md#nv-servers) | 2 | Network Virtualization servers *(Cloud Admin)* |
|
|
453
527
|
| [Environment Management](docs/tools.md#environment-management) | 2 | Named connection profiles, runtime switching |
|
|
454
528
|
| [Workflows](docs/tools.md#workflows) | 6 | POC and project lifecycle orchestration |
|
|
455
|
-
| [Boilerplate Generation](docs/tools.md#boilerplate-generation) |
|
|
529
|
+
| [Boilerplate Generation](docs/tools.md#boilerplate-generation) | 4 | Ready-to-run Appium and Selenium test scripts in 4 languages, Test Orchestrator agent install; validate scripts before delivery |
|
|
456
530
|
| [Remote Debug](docs/tools.md#remote-debug) | 1 | Connect a cloud device as a local ADB device |
|
|
457
|
-
| [Mobile Inspection Sessions](docs/tools.md#mobile-inspection-sessions) |
|
|
531
|
+
| [Mobile Inspection Sessions](docs/tools.md#mobile-inspection-sessions) | 24 | AI-driven live device interaction — screenshots, element discovery, full gesture set, keys, app/device control, Android Auto / CarPlay projection, mock biometric authentication |
|
|
458
532
|
| [Web Inspection Sessions](docs/tools.md#web-inspection-sessions) | 8 | AI-driven live browser interaction — navigate, Shadow DOM element discovery, CSS selector verification, browser-neutral Selenium script generation |
|
|
459
|
-
| [Performance Comparison](docs/tools.md#performance-comparison) | 4 | Two-set Speed Index comparison with confound detection, MAD outlier exclusion, and fresh-sample generation
|
|
460
|
-
| [Usage Reports](docs/tools.md#usage-reports) | 3 | Platform usage-report CSV export and in-memory aggregation — device reservations, users/devices/browser usage, license usage *(Cloud Admin)* |
|
|
461
|
-
| [Resources & Prompts](docs/tools.md#resources--prompts) | — | 2 ambient resources,
|
|
533
|
+
| [Performance Comparison](docs/tools.md#performance-comparison) | 4 | Two-set Speed Index comparison with confound detection, MAD outlier exclusion, and fresh-sample generation |
|
|
534
|
+
| [Usage Reports](docs/tools.md#usage-reports) | 3 | Platform usage-report CSV export and in-memory aggregation — device reservations, users/devices/browser usage, license usage; multi-section CSVs with a User Tag column, about 2 years of retention; large unfiltered exports run only after you explicitly agree (`confirmLargeExport`) *(Cloud Admin)* |
|
|
535
|
+
| [Resources & Prompts](docs/tools.md#resources--prompts) | — | 2 ambient resources, 7 guided prompts |
|
|
462
536
|
|
|
463
537
|
---
|
|
464
538
|
|
|
@@ -481,7 +555,7 @@ Collects all parameters upfront, presents a confirmation summary to the operator
|
|
|
481
555
|
7. Remove devices from the Default group — done only after the project exists, so a project-creation failure never strands devices
|
|
482
556
|
8. Locate the Default project
|
|
483
557
|
9. Create users, assign to the POC project, remove from Default, and tag each account with the POC tag. Cloud Admin access is never granted through this workflow.
|
|
484
|
-
10. Assign ExperiBank (or
|
|
558
|
+
10. Assign ExperiBank (or the app identified by `androidPackageName` / `iosBundleId`) to the POC project — if a binary isn't in the repository, the summary reports it as a manual upload and the workflow continues
|
|
485
559
|
|
|
486
560
|
If any step fails, the workflow stops, reports which steps completed with all created resource IDs, and offers resume (re-invoke — existing resources are detected and reused) or unwind (`delete_poc`) paths.
|
|
487
561
|
|
|
@@ -492,7 +566,7 @@ If any step fails, the workflow stops, reports which steps completed with all cr
|
|
|
492
566
|
| `customerName` | e.g. `"Acme Corp"` → derives project `"Acme Corp POC"` and tag `"acmecorppoc"` |
|
|
493
567
|
| `region` | Testing region, e.g. `"US2"`, `"EU"`, `"SG"` |
|
|
494
568
|
| `salesforceUrl` | Salesforce Opportunity URL — recorded in project notes |
|
|
495
|
-
| `endDate` | Accepts ISO (`"
|
|
569
|
+
| `endDate` | Accepts ISO (`"YYYY-MM-DD"`), relative offsets (`"+14d"`, `"+2w"`), or natural language (`"in 2 weeks"`) |
|
|
496
570
|
| `users` | Array of `{email, firstName, lastName, role}` — role must be `"User"` or `"ProjectAdmin"` |
|
|
497
571
|
|
|
498
572
|
**Optional parameters:**
|
|
@@ -504,7 +578,8 @@ If any step fails, the workflow stops, reports which steps completed with all cr
|
|
|
504
578
|
| `androidCount` | `floor(deviceCount / 2)` |
|
|
505
579
|
| `automationType` | `"appium-server"` (alternative: `"appium-grid"`) |
|
|
506
580
|
| `appName` | `"ExperiBank"` |
|
|
507
|
-
| `
|
|
581
|
+
| `androidPackageName` | `"com.experitest.ExperiBank"` |
|
|
582
|
+
| `iosBundleId` | `"com.experitest.ExperiBank"` |
|
|
508
583
|
|
|
509
584
|
Steps 1 and 6 check for an existing group/project by name before creating — safe to re-run after a partial failure.
|
|
510
585
|
|
|
@@ -546,7 +621,7 @@ At the start, the workflow asks whether to create a **simple** project record on
|
|
|
546
621
|
|
|
547
622
|
Full setup steps:
|
|
548
623
|
|
|
549
|
-
1. Create (or reuse) the project with the specified name and automation type; record
|
|
624
|
+
1. Create (or reuse) the project with the specified name and automation type; record `projectMemo` in project notes
|
|
550
625
|
2. Create (or reuse) a device group and link it to the project
|
|
551
626
|
3. Pre-flight check that the target app exists in the repository
|
|
552
627
|
4. Select available devices matching the target OS and region — presented to the operator for confirmation
|
|
@@ -573,8 +648,10 @@ Full setup steps:
|
|
|
573
648
|
| `automationType` | `"appium-server"` | `"appium-server"` or `"appium-grid"` |
|
|
574
649
|
| `isolateDevices` | `false` | Remove devices from all other groups before assignment |
|
|
575
650
|
| `users` | `[]` | Array of `{email, firstName, lastName, role}` |
|
|
576
|
-
| `appName` |
|
|
577
|
-
| `
|
|
651
|
+
| `appName` | `"ExperiBank"` | App to assign to the project |
|
|
652
|
+
| `androidPackageName` | `"com.experitest.ExperiBank"` | Android package used to find the app |
|
|
653
|
+
| `iosBundleId` | `"com.experitest.ExperiBank"` | iOS bundle ID used to find the app |
|
|
654
|
+
| `projectMemo` | _(none)_ | Notes to record on the project |
|
|
578
655
|
|
|
579
656
|
---
|
|
580
657
|
|
|
@@ -622,6 +699,20 @@ The server supports two test-creation modes for both mobile and web, and the age
|
|
|
622
699
|
|
|
623
700
|
Generates a complete, pre-configured Appium test script. The Digital.ai server URL and access key are pre-filled from the active connection profile — switch profiles with `switch_environment` first to generate scripts carrying a project-scoped key instead of your admin key.
|
|
624
701
|
|
|
702
|
+
#### Test Orchestrator (default for Java on Appium Server)
|
|
703
|
+
|
|
704
|
+
For **Java (JUnit 5 / TestNG) on an Appium Server project**, the generated project is wired for the **Digital.ai Test Orchestrator** (the Smart Agent): failed tests are retried automatically, each attempt is reported separately, the real pass/fail is synced to Reporter, and runs are grouped by Build ID — with no change to the test code. Appium Grid, Python and NodeJS projects get the classic boilerplate. Pass `orchestration: "off"` to get the classic boilerplate for Java too.
|
|
705
|
+
|
|
706
|
+
| Step | What happens |
|
|
707
|
+
|---|---|
|
|
708
|
+
| 1. `get_test_boilerplate` | Adds conditional agent wiring to `build.gradle` / `pom.xml`, an `orchestrator/config.template.yml` (retries default to 2; 0 for placeholder or performance tests), plus `orchestrator/.gitignore` and `lib/.gitignore` so the rendered key and the agent JAR can never be committed. No root `.gitignore` is written (it would overwrite yours). |
|
|
709
|
+
| 2. `install_test_orchestrator_agent(projectDir)` | Downloads the agent on demand, verifies its SHA-256 and places it at `lib/smart-agent.jar`. Under Docker it returns a download command (bash and PowerShell) that does the same and deletes the file on a checksum mismatch. If the download fails, the response gives the URL, the checksum and the target path for a manual install. |
|
|
710
|
+
| 3. Set `DIGITAL_AI_ACCESS_KEY` and run `gradle test` / `mvn test` | The agent attaches only when the JAR is present **and** the key is set; the key is rendered into the git-ignored `orchestrator/rendered/` at build time, never into a tracked file, and Java 17 is required only in that case. Otherwise the project builds and runs exactly like the classic boilerplate (Gradle prints why the agent was not attached). Set `BUILD_ID` to group a CI build's results. |
|
|
711
|
+
|
|
712
|
+
Requirements: a **Java 17 or 21** JDK with a current truststore, JUnit 5 or TestNG 7+, Appium java-client 8–10. See [Limitations](docs/limitations.md#17-test-orchestrator-known-issues) for known issues.
|
|
713
|
+
|
|
714
|
+
The agent JAR is **not** shipped with this server. By default it is downloaded from the [Digital.ai Test Orchestrator sample repository](https://github.com/raheekhandigitalai/Digital.ai-Testing-Test-Orchestrator), pinned to a fixed commit and verified by SHA-256 (see `resources/test-orchestrator/agent.json`). To use a different location — for example an internal mirror — set `TEST_ORCHESTRATOR_JAR_URL` **and** `TEST_ORCHESTRATOR_JAR_SHA256` (both required; a URL without a checksum is refused).
|
|
715
|
+
|
|
625
716
|
| Parameter | Values | Default |
|
|
626
717
|
|---|---|---|
|
|
627
718
|
| `platform` | `android` \| `ios` | _(required)_ |
|
|
@@ -637,23 +728,25 @@ Generates a complete, pre-configured Appium test script. The Digital.ai server U
|
|
|
637
728
|
| `includePerformanceTransactions` | `true` \| `false` | `false` |
|
|
638
729
|
| `includeAxeScan` | `true` \| `false` | `false` |
|
|
639
730
|
| `confirmSelectorsVerified` | `true` \| `false` | _(optional)_ |
|
|
731
|
+
| `orchestration` | `auto` \| `on` \| `off` | `auto` |
|
|
732
|
+
| `orchestrationMaxRetries` | `0`–`5` | `2` (`0` for placeholder or performance tests) |
|
|
733
|
+
| `automotiveProjection` | Android Auto / CarPlay resolution | _(optional)_ |
|
|
640
734
|
| `outputFormat` | `json` \| `human` | `json` |
|
|
641
735
|
|
|
642
|
-
> **Inspection gate
|
|
736
|
+
> **Inspection gate:** when you target a real app (`appId`/`packageName`/`bundleIdentifier`), this tool returns **no code** and a structured `{ status: "blocked", reason: "no_verified_selectors" }` error UNLESS a live inspection session exists in the MCP process, or you set `confirmSelectorsVerified: true` (escape hatch for selectors already captured via rdb/UIAutomator, `open_mobile_studio`, or authoritative source). The built-in ExperiBank demo (no app identifiers) is never gated. This makes it structurally impossible to receive a placeholder scaffold and pass it off as a finished test.
|
|
643
737
|
|
|
644
738
|
**Recommended workflow** for building a new test:
|
|
645
739
|
|
|
646
740
|
1. `get_application_info` — confirm package name, launch activity, and app ID
|
|
647
|
-
2. `
|
|
648
|
-
3. `
|
|
649
|
-
4. `
|
|
650
|
-
5. `
|
|
651
|
-
6.
|
|
652
|
-
7. `release_device` — explicit cleanup
|
|
741
|
+
2. `find_available_device` — select a healthy device and read its `region`
|
|
742
|
+
3. `start_inspection_session` (or `open_mobile_studio`) — capture real element IDs
|
|
743
|
+
4. `get_test_boilerplate(appId, region, …)` — generates code while the inspection session is live, or with `confirmSelectorsVerified: true`
|
|
744
|
+
5. `validate_test_script` — before saving or presenting the test
|
|
745
|
+
6. Run the test, then `release_device` — explicit cleanup
|
|
653
746
|
|
|
654
747
|
**Performance transactions:** Pass `includePerformanceTransactions: true` to bracket the test body with `startPerformanceTransaction` / `endPerformanceTransaction` calls. The start arg is the NV network profile (defaults to `"Monitor"` — observe without throttling); the end arg is the transaction name. The platform records CPU, memory, battery, and Speed Index metrics; results appear in the reporter Transactions tab (~1 min after `endPerformanceTransaction`) and are queryable via `list_transactions`. Pre-requisite: an NV server must be ONLINE and tunnel-connected in the device region (`list_nv_servers`). Note: a throttling profile activates NV shaping immediately; `"Monitor"` is pass-through and carries no ANR risk.
|
|
655
748
|
|
|
656
|
-
**Accessibility scanning:** Pass `includeAxeScan: true` to inject a Deque Axe DevTools Mobile accessibility scan (`mobile: axeScan` executeScript call). Sets the required `appium:automationName` capability automatically (`AxeUiAutomator2` for Android, `AxeXCUITest` for iOS).
|
|
749
|
+
**Accessibility scanning:** Pass `includeAxeScan: true` to inject a Deque Axe DevTools Mobile accessibility scan (`mobile: axeScan` executeScript call). Sets the required `appium:automationName` capability automatically (`AxeUiAutomator2` for Android, `AxeXCUITest` for iOS). Also pins `appiumVersion` to 2.16.2 (the Axe driver is unavailable on Appium Server 3.3.0+; don't raise it). The key comes from `AXE_DEVTOOLS_API_KEY`; if that's unset, a placeholder is written.
|
|
657
750
|
|
|
658
751
|
Both flags can be combined — the Axe scan runs inside the performance transaction boundary.
|
|
659
752
|
|
|
@@ -663,7 +756,7 @@ Both flags can be combined — the Axe scan runs inside the performance transact
|
|
|
663
756
|
|
|
664
757
|
### `validate_test_script`
|
|
665
758
|
|
|
666
|
-
Delivery backstop
|
|
759
|
+
Delivery backstop for the case the `get_test_boilerplate` gate cannot catch — a test written by hand with guessed selectors. Pass the full `scriptContent` before presenting or saving any test; it scans for unreplaced `<…>` placeholder selectors, the deliberate scaffold fail-guard, placeholder/fabricated credentials, and known fabricated resource IDs. Returns `isError` with a `fail` verdict when any high-severity pattern is found, so a non-functional test cannot be delivered as finished. A `pass` is necessary but not sufficient — it confirms obvious placeholders are gone, not that selectors are real; a live inspection remains the authoritative source.
|
|
667
760
|
|
|
668
761
|
| Parameter | Values | Default |
|
|
669
762
|
|---|---|---|
|
|
@@ -678,7 +771,7 @@ Delivery backstop (v43) for the case the `get_test_boilerplate` gate cannot catc
|
|
|
678
771
|
| Language | Files |
|
|
679
772
|
|---|---|
|
|
680
773
|
| `java-junit5` / `java-testng` | `AndroidNative.java` or `iOSNative.java` + `build.gradle` + `pom.xml` |
|
|
681
|
-
| `nodejs` | `wdio.conf.js` + test file + setup shell steps |
|
|
774
|
+
| `nodejs` | `wdio.conf.js` + test file + setup shell steps (WebdriverIO 7.40 for Appium Grid projects, WebdriverIO 9 for Appium Server) |
|
|
682
775
|
| `python` | Test file + `requirements.txt` |
|
|
683
776
|
|
|
684
777
|
All boilerplate defaults to the ExperiBank demo app as the starting point. ExperiBank is available on most farm devices and can verify connectivity before switching to your own app.
|
|
@@ -691,15 +784,15 @@ Generates a complete, pre-configured Selenium test script for browser testing. T
|
|
|
691
784
|
|---|---|---|
|
|
692
785
|
| `language` | `java-junit5` \| `java-testng` \| `nodejs` \| `python` | _(required)_ |
|
|
693
786
|
| `url` | URL of the page being tested | _(optional)_ |
|
|
694
|
-
| `testName` | Any string | `"
|
|
695
|
-
| `targetBrowser` | `chrome` \| `firefox` \| `
|
|
787
|
+
| `testName` | Any string | `"WebTest"` |
|
|
788
|
+
| `targetBrowser` | `chrome` \| `firefox` \| `MicrosoftEdge` \| `safari` \| `opera` (names as `list_available_browsers` returns them; `edge` is accepted for `MicrosoftEdge`) | _(optional)_ |
|
|
696
789
|
| `shadowDomSupport` | `auto` \| `always` \| `never` | `auto` |
|
|
697
790
|
| `confirmSelectorsVerified` | `true` \| `false` | _(optional)_ |
|
|
698
791
|
| `outputFormat` | `json` \| `human` | `json` |
|
|
699
792
|
|
|
700
793
|
> **Inspection gate:** when you target a real URL (`url` provided), this tool returns **no code** and a structured `{ status: "blocked", reason: "no_verified_selectors" }` error UNLESS a live browser inspection session exists in the MCP process, or you set `confirmSelectorsVerified: true` (escape hatch for selectors captured via a prior `start_browser_inspection_session` session). This mirrors the mobile boilerplate gate.
|
|
701
794
|
|
|
702
|
-
**Browser-neutral by default:** when `targetBrowser` is omitted, the generated script reads the browser name at runtime from an environment variable (`BROWSER`). This means the same script runs on Chrome, Firefox, Edge, and
|
|
795
|
+
**Browser-neutral by default:** when `targetBrowser` is omitted, the generated script reads the browser name at runtime from an environment variable (`BROWSER`). This means the same script runs on Chrome, Firefox, Microsoft Edge, Safari and Opera without modification — just change the env var or CI matrix. Specify `targetBrowser` only when you need browser-specific options (e.g. Safari-only session setup).
|
|
703
796
|
|
|
704
797
|
**Shadow DOM support:** when `shadowDomSupport` is `auto` (the default) or `always`, the generated script includes a `shadowQuery(host, cssSelector)` helper that traverses into shadow roots using `executeScript`. Use this for apps built with Web Components, Lit, Polymer, or other shadow-DOM frameworks. `get_page_dom` detects shadow DOM automatically during inspection and reports `hasShadowDom: true` when present.
|
|
705
798
|
|
|
@@ -728,7 +821,7 @@ The headline metric is reported three ways every time — **trimmed mean, median
|
|
|
728
821
|
| `detect_performance_outliers` | Robust median/MAD outlier flagging on a single set; returns the kept set and recommended exclusions/re-runs. |
|
|
729
822
|
| `performance_transaction_control` | Phase 2: generate fresh samples inside an inspection session — `start` (with an NV profile) → run the verified flow → `end` (names the record). Records appear in the reporter ~1 min later. |
|
|
730
823
|
|
|
731
|
-
> **Why the confound check matters:** comparing transactions
|
|
824
|
+
> **Why the confound check matters:** comparing two transactions with Speed Index 1015 vs 1000 looks like a 1.5% version delta — but if they ran on *different device models, different OS versions, and different projects*, and one has no CPU/memory telemetry, `assess_comparison_confounds` returns **confounded** and names each cause, so the delta is never misread as a version regression.
|
|
732
825
|
|
|
733
826
|
The **`performance_comparison_report` prompt** orchestrates the full workflow end to end: define the axis → scrub confounds → negotiate sample size → **require explicit plan confirmation with a time estimate** → run the series with outlier-driven re-runs → report the delta with root-cause reasoning. True host/background interference is not directly observable; the report approximates device quietness (idle, healthy status, no concurrent reservation) and states that limit explicitly.
|
|
734
827
|
|
|
@@ -773,15 +866,15 @@ Use filters to narrow results rather than raising `maxResults`. When results are
|
|
|
773
866
|
| Tool | Available Filters | Available `sortBy` values |
|
|
774
867
|
|---|---|---|
|
|
775
868
|
| `list_users` | firstName, lastName, email, authenticationType, isCloudAdmin, tag | firstName, lastName, email, userName, authenticationType |
|
|
776
|
-
| `list_devices` | query (@-syntax), region, model | deviceName, deviceOs, osVersion, manufacturer, displayStatus, agentName, region |
|
|
869
|
+
| `list_devices` | query (@-syntax), os, region, model | deviceName, deviceOs, osVersion, manufacturer, displayStatus, agentName, region |
|
|
777
870
|
| `get_devices_in_group` | osType, status, category, excludeTags, requireTags | _(none)_ |
|
|
778
871
|
| `list_reservations` | username, project, deviceUid | reservationStart, reservationEnd, username, project, deviceUid |
|
|
779
872
|
| `list_projects` | name (partial match) | name, id |
|
|
780
|
-
| `list_project_users` | username (partial), role (exact) |
|
|
781
|
-
| `list_applications` | nameContains, osType, packageName, bundleIdentifier, fileType, isForSimulator | applicationName,
|
|
873
|
+
| `list_project_users` | username (partial), role (exact) | username, role |
|
|
874
|
+
| `list_applications` | nameContains, osType, packageName, bundleIdentifier, uniqueName, fileType, isForSimulator | applicationName, releaseVersion, buildVersion, createdAt (default), osType, fileType |
|
|
782
875
|
| `list_test_reports` | status, name, has_attachment, success; startDate/endDate (date range) | start_time |
|
|
783
876
|
|
|
784
|
-
All list tools accept `sortOrder: "asc" | "desc"` (default
|
|
877
|
+
All list tools accept `sortOrder: "asc" | "desc"` (default `"asc"`, except `list_applications`, which defaults to `"desc"`, newest first).
|
|
785
878
|
|
|
786
879
|
`list_test_reports` sorting is performed by the platform for every access level. If the platform ever refuses it for a credential, the server transparently falls back to a client-side scan (up to 5,000 records) so "newest first" results stay correct, just slower on large report sets.
|
|
787
880
|
|
|
@@ -821,8 +914,8 @@ To diagnose a failure, list with `list_test_reports`, then call `get_test_report
|
|
|
821
914
|
|
|
822
915
|
| Identifier | Source | How to retrieve |
|
|
823
916
|
|---|---|---|
|
|
824
|
-
| `
|
|
825
|
-
| `
|
|
917
|
+
| `uuid` | List results, report URLs (`/reporter/video-report/<uuid>`) | `get_test_report(uuid: "...")` or `get_test_report(reportUrl: "...")` — preferred, globally unique |
|
|
918
|
+
| `test_id` | List results | `get_test_report(testId: N)` — unique only within a project; the same number can be a different test in another project |
|
|
826
919
|
| `report_api_id` | Returned by session-start tools | `get_test_by_report_id(reportApiId: "...")` — wait ~60 s after session close |
|
|
827
920
|
|
|
828
921
|
**Examples:**
|
|
@@ -861,11 +954,15 @@ list_test_reports
|
|
|
861
954
|
get_test_report(testId: 69)
|
|
862
955
|
→ cause, errorCategory, errorClassification, errorDetail (stack trace)
|
|
863
956
|
|
|
957
|
+
# 2b. Platform root-cause analysis (read-only)
|
|
958
|
+
get_root_cause_analysis(uuid: "…") # or reportUrl / testId
|
|
959
|
+
|
|
864
960
|
# 3. Full Appium log as text, when the structured fields aren't enough
|
|
865
961
|
get_test_log(uuid: "…", logType: "appium")
|
|
866
962
|
|
|
867
|
-
# 4. Pull the binary artifacts (session video .mp4, full ZIP) to YOUR machine
|
|
868
|
-
#
|
|
963
|
+
# 4. Pull the binary artifacts (session video .mp4, full ZIP) to YOUR machine.
|
|
964
|
+
# With the npm install, call download_test_video / download_test_attachments
|
|
965
|
+
# directly; under Docker/remote, generate a local command instead:
|
|
869
966
|
get_test_attachments_download_command(uuid: "…", localPlatform: "macos")
|
|
870
967
|
→ a curl command you run locally; the file never transits the container
|
|
871
968
|
```
|
|
@@ -884,6 +981,7 @@ For those deployments, every file-transfer tool has a **command-generator siblin
|
|
|
884
981
|
| Upload repo file | `upload_repository_file` | `get_repository_upload_command` |
|
|
885
982
|
| Upload profile | `upload_provisioning_profile` | `get_provisioning_profile_upload_command` |
|
|
886
983
|
| Download test attachments (.mp4, logs) | `download_test_attachments` | `get_test_attachments_download_command` |
|
|
984
|
+
| Download test video (.mp4, byte ranges) | `download_test_video` | `get_test_attachments_download_command` (`artifact: "video"`) |
|
|
887
985
|
| Download repo file | `download_repository_file` | `get_repository_file_download_command` |
|
|
888
986
|
| Download profile | `download_provisioning_profile` | `get_provisioning_profile_download_command` |
|
|
889
987
|
| Download app language files | `extract_app_language_files` | `get_app_language_files_download_command` |
|
|
@@ -937,9 +1035,12 @@ npm run test:utils # utility functions
|
|
|
937
1035
|
npm run test:transactions # performance transactions
|
|
938
1036
|
npm run test:analytics # analytics tools
|
|
939
1037
|
npm run test:infrastructure # agents / regions / NV servers / sessions
|
|
1038
|
+
npm run test:live # live API-behavior probes (requires .env; not part of npm test)
|
|
1039
|
+
npm run test:fidelity # agent tool-choice evaluation (builds first)
|
|
1040
|
+
npm run remediation:digest # summarize debug-mode remediation notes
|
|
940
1041
|
```
|
|
941
1042
|
|
|
942
|
-
|
|
1043
|
+
See `package.json` for the full list of scripts.
|
|
943
1044
|
|
|
944
1045
|
---
|
|
945
1046
|
|
|
@@ -950,7 +1051,7 @@ Tests can also be run from VS Code: `Ctrl+Shift+P` → "Tasks: Run Task".
|
|
|
950
1051
|
| Symptom | Cause | Fix |
|
|
951
1052
|
|---|---|---|
|
|
952
1053
|
| `403 Forbidden` on admin tools (agents, regions, license) | Active profile is a project-level key — v2 endpoints require Cloud Admin access | Ask Agent: *"switch to my Cloud Admin profile"* — it will call `list_environments` and pick the right one |
|
|
953
|
-
| Report delete tools
|
|
1054
|
+
| Report delete tools refuse with "Reporter deletes are disabled for project …" | The project's `allowUsersDeleteTests` setting is false, so project-level roles can't delete reports | Ask a Cloud Admin to enable it for the project, or switch to a Cloud Admin profile |
|
|
954
1055
|
| `install_application` returns 400 on a device you can see | Device is reserved via an rdb (remote debug) session | Install **first**, then run `get_remote_debug_command` — not the other way around |
|
|
955
1056
|
| `install_application` returns 400 (no rdb involved) | App not assigned to a project containing the target device | Call `assign_app_to_project` first |
|
|
956
1057
|
| Repeatable `NoSuchElementException` while sibling tests pass | Device health, not test code — device stuck in a wrong state or offline-but-pooled | Run `get_device_health_summary`; scope the deviceQuery with `@region='<healthy-region>'` |
|
|
@@ -967,7 +1068,7 @@ On Windows this usually means the `--env-file` path was stored with backslashes
|
|
|
967
1068
|
Run this sequence:
|
|
968
1069
|
|
|
969
1070
|
```
|
|
970
|
-
1. get_server_info — confirm tool count (expect
|
|
1071
|
+
1. get_server_info — confirm tool count (expect 202; 203 with MCP_DEBUG_MODE=true) and active profile
|
|
971
1072
|
2. check_workflow_readiness — which dependency tools are present or missing
|
|
972
1073
|
3. check_connectivity — confirm the backend API is reachable
|
|
973
1074
|
```
|
|
@@ -977,7 +1078,7 @@ Run this sequence:
|
|
|
977
1078
|
```json
|
|
978
1079
|
{
|
|
979
1080
|
"allWorkflowsReady": true,
|
|
980
|
-
"registeredToolCount":
|
|
1081
|
+
"registeredToolCount": 202,
|
|
981
1082
|
"workflows": {
|
|
982
1083
|
"create_poc": { "ready": true, "missingRead": [], "missingWrite": [] },
|
|
983
1084
|
"setup_project": { "ready": true, "missingRead": [], "missingWrite": [] }
|
|
@@ -1003,12 +1104,12 @@ The server also logs a readiness check at startup (visible in your terminal, or
|
|
|
1003
1104
|
|
|
1004
1105
|
The four most commonly encountered:
|
|
1005
1106
|
|
|
1006
|
-
1. **No API to trigger Appium test execution.**
|
|
1107
|
+
1. **No API to trigger Appium or Selenium test execution.** Those tests launch from Appium clients (IDE, CI scripts); the server manages devices, apps, reservations, and results. Espresso, XCUITest and Maestro suites are different: the platform runs them itself via `execute_test_run` / `get_test_run_status` / `cancel_test_run` / `get_test_run_command` (Maestro is Android-only). Espresso and Maestro runs are verified; XCUITest uses the same API but is not yet verified end to end. Interactive [mobile inspection sessions](docs/tools.md#mobile-inspection-sessions) and [browser inspection sessions](docs/tools.md#web-inspection-sessions) are also live WebDriver sessions for element discovery on Android, iOS, and desktop browsers.
|
|
1007
1108
|
2. **Inspection sessions support Android and iOS** on both the legacy Appium Grid (JWP) and Appium Server (W3C/OSS) projects. iOS caveats: no clear-app-data, no clipboard on Grid devices, and back navigation uses the nav-bar button (iOS has no Back button).
|
|
1008
1109
|
3. **No user disable/lock endpoint.** Removing access for a user provisioned solely for a POC means deleting the account — which is why `close_poc` requires per-user confirmation.
|
|
1009
|
-
4. **
|
|
1110
|
+
4. **Deleting test reports with a project-level key depends on a per-project setting** (`allowUsersDeleteTests`). Cloud Admin can always delete. When the setting is off, the tools refuse up front and explain how to get it enabled.
|
|
1010
1111
|
|
|
1011
|
-
See [docs/limitations.md](docs/limitations.md) for the full list
|
|
1112
|
+
See [docs/limitations.md](docs/limitations.md) for the full list.
|
|
1012
1113
|
|
|
1013
1114
|
---
|
|
1014
1115
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-inspection.d.ts","sourceRoot":"","sources":["../../src/api/browser-inspection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browser-inspection.d.ts","sourceRoot":"","sources":["../../src/api/browser-inspection.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AA+BhE,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,8BAA8B,CAClD,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CA8E5B;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiC3E;AAED,wBAAsB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAOnE;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,WAAW,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;CAC1B;AAwDD,wBAAsB,UAAU,CAC9B,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,MAAM,GAAG,QAAQ,GAAG,OAAgB,EAChD,cAAc,UAAQ,GACrB,OAAO,CAAC,aAAa,CAAC,CA6DxB;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GACrC,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED,wBAAgB,yBAAyB,IAAI,iBAAiB,EAAE,CAE/D"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { canonicalBrowserName } from '../utils/browser-name.js';
|
|
1
2
|
import axios from 'axios';
|
|
2
3
|
import { getMyAccountInfo } from './users.js';
|
|
3
4
|
import { getActiveUrl, getActiveAccessKey } from './client.js';
|
|
@@ -36,7 +37,8 @@ export async function createBrowserInspectionSession(opts) {
|
|
|
36
37
|
catch {
|
|
37
38
|
// Non-fatal
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
+
// Case-sensitive on the grid: lowercasing turned MicrosoftEdge into a rejected "microsoftedge" (verified live).
|
|
41
|
+
const browserName = canonicalBrowserName(opts.browserName) ?? opts.browserName;
|
|
40
42
|
const reportName = opts.reportName ?? `[MCP Browser Inspection] ${opts.browserName}`;
|
|
41
43
|
// Browsers are pure W3C — send both desiredCapabilities (legacy compat) and
|
|
42
44
|
// capabilities.alwaysMatch. digitalai:* keys already contain the colon prefix
|
|
@@ -206,13 +208,16 @@ export async function getPageDom(handle, shadowMode = 'auto', includeRawHtml = f
|
|
|
206
208
|
catch (e) {
|
|
207
209
|
throw new Error(`get_page_dom detection phase failed: ${describeError(e)}`);
|
|
208
210
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
//
|
|
212
|
-
|
|
211
|
+
// The walker extracts interactive elements whether or not shadow roots exist, so "auto" always uses it — the tool
|
|
212
|
+
// promises structured elements by default. (UAT 2026-10-09: on a standard page "auto" returned only a raw-HTML
|
|
213
|
+
// length, no elements and no HTML.) "never" remains the fast raw-HTML path.
|
|
214
|
+
const useWalker = shadowMode !== 'never';
|
|
215
|
+
// Phase 2a: element extraction (recursive JS walker — descends into shadow roots when present)
|
|
216
|
+
if (useWalker) {
|
|
213
217
|
try {
|
|
214
218
|
const shadowRes = await client.post(`/session/${sid}/execute/sync`, { script: SHADOW_DOM_EXTRACT_SCRIPT, args: [] }, { timeout: 30_000 });
|
|
215
219
|
const full = JSON.parse(String(shadowRes.data.value));
|
|
220
|
+
full.hasShadowDom = metaResult.hasShadowDom; // detection result, not "the walker ran"
|
|
216
221
|
if (includeRawHtml) {
|
|
217
222
|
const sourceRes = await client.get(`/session/${sid}/source`, { timeout: 20_000 });
|
|
218
223
|
full.rawHtml = String(sourceRes.data.value ?? '');
|
|
@@ -222,25 +227,19 @@ export async function getPageDom(handle, shadowMode = 'auto', includeRawHtml = f
|
|
|
222
227
|
return full;
|
|
223
228
|
}
|
|
224
229
|
catch (e) {
|
|
225
|
-
throw new Error(`get_page_dom
|
|
230
|
+
throw new Error(`get_page_dom element extraction failed: ${describeError(e)}`);
|
|
226
231
|
}
|
|
227
232
|
}
|
|
228
|
-
// Phase 2b: standard rendered DOM (GET /source returns the live rendered DOM in Selenium)
|
|
233
|
+
// Phase 2b: shadowMode "never" — standard rendered DOM only (GET /source returns the live rendered DOM in Selenium)
|
|
229
234
|
try {
|
|
230
235
|
const sourceRes = await client.get(`/session/${sid}/source`, { timeout: 20_000 });
|
|
231
|
-
const rawHtml = String(sourceRes.data.value ?? '');
|
|
232
236
|
session.currentUrl = metaResult.url;
|
|
233
|
-
|
|
237
|
+
return {
|
|
234
238
|
url: metaResult.url,
|
|
235
239
|
title: metaResult.title,
|
|
236
240
|
hasShadowDom: metaResult.hasShadowDom,
|
|
241
|
+
rawHtml: String(sourceRes.data.value ?? ''),
|
|
237
242
|
};
|
|
238
|
-
if (includeRawHtml || shadowMode === 'never')
|
|
239
|
-
result.rawHtml = rawHtml;
|
|
240
|
-
// For non-shadow path, return rawHtml for the AI to parse; elements are optional
|
|
241
|
-
if (!includeRawHtml)
|
|
242
|
-
result.rawHtml = rawHtml; // always include for standard path
|
|
243
|
-
return result;
|
|
244
243
|
}
|
|
245
244
|
catch (e) {
|
|
246
245
|
throw new Error(`get_page_dom DOM extraction failed: ${describeError(e)}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-inspection.js","sourceRoot":"","sources":["../../src/api/browser-inspection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAErF,SAAS,QAAQ;IACf,MAAM,IAAI,GAAG,YAAY,EAAE,CAAC;IAC5B,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACjE,OAAO,GAAG,IAAI,SAAS,CAAC;AAC1B,CAAC;AAED,SAAS,UAAU;IACjB,OAAO,KAAK,CAAC,MAAM,CAAC;QAClB,OAAO,EAAE,QAAQ,EAAE;QACnB,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;KAChD,CAAC,CAAC;AACL,CAAC;AAED,SAAS,aAAa,CA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ChG,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,IAAI,CAAC,YAAY,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IAClF,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,kBAAkB,MAAM,YAAY,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC1E,CAAC;IACD,sCAAsC;IACtC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,YAAY,GAAG,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5E,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC;IAAC,MAAM,CAAC;QACP,YAAY;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,yBAAyB;IACvC,OAAO,kBAAkB,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC;AAClE,CAAC"}
|
package/dist/api/client.d.ts
CHANGED
|
@@ -35,4 +35,11 @@ export declare function apiDelete<T>(path: string, params?: Record<string, unkno
|
|
|
35
35
|
export declare function apiPostForm<T>(path: string, form: FormData): Promise<T>;
|
|
36
36
|
export declare function apiPutForm<T>(path: string, form: FormData): Promise<T>;
|
|
37
37
|
export declare function apiDownload(path: string): Promise<Buffer>;
|
|
38
|
+
/** GET with an optional HTTP Range header ("bytes=0-1023", "bytes=-100", "bytes=1000-"). Read-only, so retried. */
|
|
39
|
+
export declare function apiDownloadRange(path: string, range?: string): Promise<{
|
|
40
|
+
data: Buffer;
|
|
41
|
+
status: number;
|
|
42
|
+
contentType?: string;
|
|
43
|
+
contentRange?: string;
|
|
44
|
+
}>;
|
|
38
45
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/api/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAgE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEzH,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AA8G9D;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAK/E;AAED,wDAAwD;AACxD,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,UAAU,CAIhD;AAED,+DAA+D;AAC/D,wBAAgB,YAAY,IAAI,MAAM,CAGrC;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAgCD,wBAAsB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAG1F;AAED,wBAAsB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAK3G;AAED,wBAAsB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAG1G;AAED,wBAAsB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,MA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AE,MAAM,CAAA;CAAE,CAAC,CASxF"}
|
package/dist/api/client.js
CHANGED
|
@@ -205,4 +205,13 @@ export async function apiDownload(path) {
|
|
|
205
205
|
const res = await withRetry(() => getClient().get(path, { responseType: 'arraybuffer' }));
|
|
206
206
|
return Buffer.from(res.data);
|
|
207
207
|
}
|
|
208
|
+
/** GET with an optional HTTP Range header ("bytes=0-1023", "bytes=-100", "bytes=1000-"). Read-only, so retried. */
|
|
209
|
+
export async function apiDownloadRange(path, range) {
|
|
210
|
+
const res = await withRetry(() => getClient().get(path, { responseType: 'arraybuffer', ...(range ? { headers: { Range: range } } : {}), maxContentLength: Infinity }));
|
|
211
|
+
const header = (name) => {
|
|
212
|
+
const v = res.headers[name];
|
|
213
|
+
return v == null ? undefined : String(v);
|
|
214
|
+
};
|
|
215
|
+
return { data: Buffer.from(res.data), status: res.status, contentType: header('content-type'), contentRange: header('content-range') };
|
|
216
|
+
}
|
|
208
217
|
//# sourceMappingURL=client.js.map
|