digital-ai-testing-mcp 1.2.2 → 1.2.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.
- package/LICENSE +197 -197
- package/README.md +984 -984
- package/dist/api/browser-inspection.js +48 -48
- package/dist/index.js +19 -19
- package/package.json +73 -73
- package/resources/boilerplate/Android-Native/Java JUnit5/maven +42 -42
- package/resources/boilerplate/Android-Native/NodeJS (WebDriver)/AndroidNative.js +29 -29
- package/resources/boilerplate/Android-Native/java TestNG/maven +42 -42
- package/resources/boilerplate/iOS-Native/NodeJS (WebDriver)/iOSNative.js +29 -29
- package/resources/boilerplate/iOS-Native/java-TestNG/maven +42 -42
|
@@ -138,55 +138,55 @@ export async function getCurrentUrl(handle) {
|
|
|
138
138
|
}
|
|
139
139
|
// Shadow DOM walker script — runs inside the browser via executeScript.
|
|
140
140
|
// Self-contained (no closures over outer scope) so it can be sent as a string.
|
|
141
|
-
const SHADOW_DOM_EXTRACT_SCRIPT = `
|
|
142
|
-
var extractDOM = function(root, depth) {
|
|
143
|
-
if (depth > 3) return [];
|
|
144
|
-
var acc = [];
|
|
145
|
-
var skipTags = {SCRIPT:1,STYLE:1,HEAD:1,META:1,LINK:1,NOSCRIPT:1,SVG:1,PATH:1};
|
|
146
|
-
var nodes = root.querySelectorAll('*');
|
|
147
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
148
|
-
var el = nodes[i];
|
|
149
|
-
if (skipTags[el.tagName]) continue;
|
|
150
|
-
var node = {
|
|
151
|
-
tag: el.tagName.toLowerCase(),
|
|
152
|
-
id: el.id || undefined,
|
|
153
|
-
name: el.getAttribute('name') || undefined,
|
|
154
|
-
type: el.getAttribute('type') || undefined,
|
|
155
|
-
placeholder: el.getAttribute('placeholder') || undefined,
|
|
156
|
-
ariaLabel: el.getAttribute('aria-label') || undefined,
|
|
157
|
-
role: el.getAttribute('role') || undefined,
|
|
158
|
-
dataTestId: el.getAttribute('data-testid') || el.getAttribute('data-test-id') || el.getAttribute('data-cy') || undefined,
|
|
159
|
-
href: (el.tagName === 'A' || el.tagName === 'LINK') ? (el.getAttribute('href') || undefined) : undefined
|
|
160
|
-
};
|
|
161
|
-
for (var j = 0; j < el.childNodes.length; j++) {
|
|
162
|
-
if (el.childNodes[j].nodeType === 3) {
|
|
163
|
-
var t = el.childNodes[j].textContent.trim();
|
|
164
|
-
if (t) { node.text = t.slice(0, 80); break; }
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
if (el.shadowRoot) {
|
|
168
|
-
node.shadowChildren = extractDOM(el.shadowRoot, depth + 1);
|
|
169
|
-
}
|
|
170
|
-
if (node.id || node.name || node.dataTestId || node.ariaLabel || node.role || node.text || node.shadowChildren) {
|
|
171
|
-
acc.push(node);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
return acc;
|
|
175
|
-
};
|
|
176
|
-
var hasShadow = Array.from(document.querySelectorAll('*')).some(function(el) { return el.shadowRoot !== null; });
|
|
177
|
-
return JSON.stringify({
|
|
178
|
-
url: window.location.href,
|
|
179
|
-
title: document.title,
|
|
180
|
-
hasShadowDom: hasShadow,
|
|
181
|
-
elements: extractDOM(document.body, 0)
|
|
182
|
-
});
|
|
141
|
+
const SHADOW_DOM_EXTRACT_SCRIPT = `
|
|
142
|
+
var extractDOM = function(root, depth) {
|
|
143
|
+
if (depth > 3) return [];
|
|
144
|
+
var acc = [];
|
|
145
|
+
var skipTags = {SCRIPT:1,STYLE:1,HEAD:1,META:1,LINK:1,NOSCRIPT:1,SVG:1,PATH:1};
|
|
146
|
+
var nodes = root.querySelectorAll('*');
|
|
147
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
148
|
+
var el = nodes[i];
|
|
149
|
+
if (skipTags[el.tagName]) continue;
|
|
150
|
+
var node = {
|
|
151
|
+
tag: el.tagName.toLowerCase(),
|
|
152
|
+
id: el.id || undefined,
|
|
153
|
+
name: el.getAttribute('name') || undefined,
|
|
154
|
+
type: el.getAttribute('type') || undefined,
|
|
155
|
+
placeholder: el.getAttribute('placeholder') || undefined,
|
|
156
|
+
ariaLabel: el.getAttribute('aria-label') || undefined,
|
|
157
|
+
role: el.getAttribute('role') || undefined,
|
|
158
|
+
dataTestId: el.getAttribute('data-testid') || el.getAttribute('data-test-id') || el.getAttribute('data-cy') || undefined,
|
|
159
|
+
href: (el.tagName === 'A' || el.tagName === 'LINK') ? (el.getAttribute('href') || undefined) : undefined
|
|
160
|
+
};
|
|
161
|
+
for (var j = 0; j < el.childNodes.length; j++) {
|
|
162
|
+
if (el.childNodes[j].nodeType === 3) {
|
|
163
|
+
var t = el.childNodes[j].textContent.trim();
|
|
164
|
+
if (t) { node.text = t.slice(0, 80); break; }
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if (el.shadowRoot) {
|
|
168
|
+
node.shadowChildren = extractDOM(el.shadowRoot, depth + 1);
|
|
169
|
+
}
|
|
170
|
+
if (node.id || node.name || node.dataTestId || node.ariaLabel || node.role || node.text || node.shadowChildren) {
|
|
171
|
+
acc.push(node);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return acc;
|
|
175
|
+
};
|
|
176
|
+
var hasShadow = Array.from(document.querySelectorAll('*')).some(function(el) { return el.shadowRoot !== null; });
|
|
177
|
+
return JSON.stringify({
|
|
178
|
+
url: window.location.href,
|
|
179
|
+
title: document.title,
|
|
180
|
+
hasShadowDom: hasShadow,
|
|
181
|
+
elements: extractDOM(document.body, 0)
|
|
182
|
+
});
|
|
183
183
|
`;
|
|
184
|
-
const SHADOW_DETECT_SCRIPT = `
|
|
185
|
-
return JSON.stringify({
|
|
186
|
-
url: window.location.href,
|
|
187
|
-
title: document.title,
|
|
188
|
-
hasShadowDom: Array.from(document.querySelectorAll('*')).some(function(el) { return el.shadowRoot !== null; })
|
|
189
|
-
});
|
|
184
|
+
const SHADOW_DETECT_SCRIPT = `
|
|
185
|
+
return JSON.stringify({
|
|
186
|
+
url: window.location.href,
|
|
187
|
+
title: document.title,
|
|
188
|
+
hasShadowDom: Array.from(document.querySelectorAll('*')).some(function(el) { return el.shadowRoot !== null; })
|
|
189
|
+
});
|
|
190
190
|
`;
|
|
191
191
|
export async function getPageDom(handle, shadowMode = 'auto', includeRawHtml = false) {
|
|
192
192
|
const session = requireSession(handle);
|
package/dist/index.js
CHANGED
|
@@ -49,25 +49,25 @@ console.error(`[${name}] Target: ${process.env.DIGITAL_AI_BASE_URL}`);
|
|
|
49
49
|
// call time, after a plan is already committed; the v43 root cause). This slot is the
|
|
50
50
|
// MCP's only reach into the consuming agent ahead of its first action, so it leads with
|
|
51
51
|
// the one policy that keeps being bypassed: never author test code from guessed selectors.
|
|
52
|
-
const SERVER_INSTRUCTIONS = `Digital.ai Testing — device farm, app lifecycle, reporting, and test authoring.
|
|
53
|
-
|
|
54
|
-
TEST-AUTHORING POLICY — read this BEFORE you plan or create any test for an app:
|
|
55
|
-
1. Decide the mode FIRST, before calling any tool or writing any file:
|
|
56
|
-
• INTERACTIVE (the default whenever intent is vague, you lack the app's source code, or the user says anything like "let's decide as we go"): call start_inspection_session, capture REAL element IDs via get_element_tree / open_mobile_studio, and build steps from those.
|
|
57
|
-
• AUTONOMOUS (only when intent is step-specific AND you already have a real selector source — captured inspection IDs, or authoritative app source in the workspace): use get_test_boilerplate. It returns NO runnable code for a real app unless a live inspection session exists or you pass confirmSelectorsVerified:true.
|
|
58
|
-
2. PROHIBITED, regardless of how the request is phrased: hand-writing or generating a test file with invented or placeholder element IDs (e.g. nav_catalog, home_container), guessed XPaths, or fabricated credentials, and presenting it as a finished test. A test built without real, inspection-sourced (or source-derived) selectors is non-functional — do not deliver it. Writing the file yourself instead of calling get_test_boilerplate does NOT exempt you from this.
|
|
59
|
-
3. If you have no selector source, you are in INTERACTIVE mode by definition — start_inspection_session first. If you are unsure which mode the user wants, ASK before calling any tool. A test-type label picked from a menu ("login test", "smoke", "e2e") is a category, not a specification.
|
|
60
|
-
4. Before you present or save ANY test — generated here OR written by hand — run validate_test_script on it. If it flags placeholder selectors, a scaffold fail-guard, or placeholder credentials, the test is not runnable; fix it before delivering.
|
|
61
|
-
|
|
62
|
-
APP NOT IN REPOSITORY: When list_applications returns 0 results for a requested app, ask the user: "That app isn't in the Digital.ai repository. If it's available on the Google Play Store or Apple App Store, I can install it directly onto a farm device. Would you like to do that?" If yes — Android: (1) start_inspection_session (no appId); (2) app_control(action:"deep_link", url:"market://details?id=<packageName>") — opens Play Store to the install page (returns 500 but succeeds on-device — ignore the error, take a screenshot to verify); (3) take_inspection_screenshot; (4) find_elements(xpath, "//*[@content-desc='Install']") + tap_element — no auth prompt, Google account handles it silently. iOS: (1) start_inspection_session (no appId); (2) launch_app(packageName:"com.apple.AppStore") — itms-apps:// URL schemes are NOT supported on Grid iOS (returns 500); (3) take_inspection_screenshot — if a consent/onboarding screen appears with disabled buttons, stop the session and use open_mobile_studio for manual interaction; (4) user taps GET manually (Face ID/Touch ID cannot be automated). Note: this installs on one device only — the app is not added to the repository.
|
|
63
|
-
GENERAL: credentials and base URL come from the active profile (switch_environment changes it — never read them from env). Destructive tools require confirmDeletion:true.
|
|
64
|
-
API BEHAVIOR — critical facts for device, reporter, and application tools:
|
|
65
|
-
DEVICE QUERIES: Use displayStatus (not currentStatus) for availability — currentStatus only returns online/offline/error, never "Available". @category must be UPPERCASE ('PHONE', 'TABLET'). @version requires decimal ('14.0' not '14'). These fields silently return empty results — never use in queries, filter client-side instead: @manufacturer, @tag, @deviceName, @id, @udid, @status, @available, @agentName, @pool, @project, @isEmulator.
|
|
66
|
-
REPORTER: List results use snake_case (test_id, start_time). CSRF-blocked filter properties (return 401): start_time, create_time, uuid. CSRF-blocked operators: !=, like, startsWith, in. Use projectName (never projectId — CSRF-blocked on reporter endpoints) to scope reporter calls to a project. Reporter delete endpoints are Cloud Admin only (project keys CSRF-blocked). For "most recent" queries use find_latest_test_for_name or list_active_test_executions — not list_test_reports with sort. get_grouped_test_reports requires groupBy field (not keys — keys is silently ignored). Transaction and performance tools work for all access levels; project keys see only their own project's transactions.
|
|
67
|
-
APPLICATIONS: applicationName filter param is silently ignored — use the nameContains tool param for client-side filtering instead.
|
|
68
|
-
RESERVATIONS: project= causes 400; deviceUid= causes 400 — use projectId= and deviceId= instead.
|
|
69
|
-
DATES: Reservation and provisioning-profile dates are MM/DD/YYYY HH:mm:ss (not ISO 8601) — use the tool's dedicated date parser, not new Date().
|
|
70
|
-
SLOW TOOLS (avoid in loops): get_environment_summary, get_transaction_performance_summary, get_performance_trend, get_daily_execution_trend, find_latest_test_for_name (under project keys).
|
|
52
|
+
const SERVER_INSTRUCTIONS = `Digital.ai Testing — device farm, app lifecycle, reporting, and test authoring.
|
|
53
|
+
|
|
54
|
+
TEST-AUTHORING POLICY — read this BEFORE you plan or create any test for an app:
|
|
55
|
+
1. Decide the mode FIRST, before calling any tool or writing any file:
|
|
56
|
+
• INTERACTIVE (the default whenever intent is vague, you lack the app's source code, or the user says anything like "let's decide as we go"): call start_inspection_session, capture REAL element IDs via get_element_tree / open_mobile_studio, and build steps from those.
|
|
57
|
+
• AUTONOMOUS (only when intent is step-specific AND you already have a real selector source — captured inspection IDs, or authoritative app source in the workspace): use get_test_boilerplate. It returns NO runnable code for a real app unless a live inspection session exists or you pass confirmSelectorsVerified:true.
|
|
58
|
+
2. PROHIBITED, regardless of how the request is phrased: hand-writing or generating a test file with invented or placeholder element IDs (e.g. nav_catalog, home_container), guessed XPaths, or fabricated credentials, and presenting it as a finished test. A test built without real, inspection-sourced (or source-derived) selectors is non-functional — do not deliver it. Writing the file yourself instead of calling get_test_boilerplate does NOT exempt you from this.
|
|
59
|
+
3. If you have no selector source, you are in INTERACTIVE mode by definition — start_inspection_session first. If you are unsure which mode the user wants, ASK before calling any tool. A test-type label picked from a menu ("login test", "smoke", "e2e") is a category, not a specification.
|
|
60
|
+
4. Before you present or save ANY test — generated here OR written by hand — run validate_test_script on it. If it flags placeholder selectors, a scaffold fail-guard, or placeholder credentials, the test is not runnable; fix it before delivering.
|
|
61
|
+
|
|
62
|
+
APP NOT IN REPOSITORY: When list_applications returns 0 results for a requested app, ask the user: "That app isn't in the Digital.ai repository. If it's available on the Google Play Store or Apple App Store, I can install it directly onto a farm device. Would you like to do that?" If yes — Android: (1) start_inspection_session (no appId); (2) app_control(action:"deep_link", url:"market://details?id=<packageName>") — opens Play Store to the install page (returns 500 but succeeds on-device — ignore the error, take a screenshot to verify); (3) take_inspection_screenshot; (4) find_elements(xpath, "//*[@content-desc='Install']") + tap_element — no auth prompt, Google account handles it silently. iOS: (1) start_inspection_session (no appId); (2) launch_app(packageName:"com.apple.AppStore") — itms-apps:// URL schemes are NOT supported on Grid iOS (returns 500); (3) take_inspection_screenshot — if a consent/onboarding screen appears with disabled buttons, stop the session and use open_mobile_studio for manual interaction; (4) user taps GET manually (Face ID/Touch ID cannot be automated). Note: this installs on one device only — the app is not added to the repository.
|
|
63
|
+
GENERAL: credentials and base URL come from the active profile (switch_environment changes it — never read them from env). Destructive tools require confirmDeletion:true.
|
|
64
|
+
API BEHAVIOR — critical facts for device, reporter, and application tools:
|
|
65
|
+
DEVICE QUERIES: Use displayStatus (not currentStatus) for availability — currentStatus only returns online/offline/error, never "Available". @category must be UPPERCASE ('PHONE', 'TABLET'). @version requires decimal ('14.0' not '14'). These fields silently return empty results — never use in queries, filter client-side instead: @manufacturer, @tag, @deviceName, @id, @udid, @status, @available, @agentName, @pool, @project, @isEmulator.
|
|
66
|
+
REPORTER: List results use snake_case (test_id, start_time). CSRF-blocked filter properties (return 401): start_time, create_time, uuid. CSRF-blocked operators: !=, like, startsWith, in. Use projectName (never projectId — CSRF-blocked on reporter endpoints) to scope reporter calls to a project. Reporter delete endpoints are Cloud Admin only (project keys CSRF-blocked). For "most recent" queries use find_latest_test_for_name or list_active_test_executions — not list_test_reports with sort. get_grouped_test_reports requires groupBy field (not keys — keys is silently ignored). Transaction and performance tools work for all access levels; project keys see only their own project's transactions.
|
|
67
|
+
APPLICATIONS: applicationName filter param is silently ignored — use the nameContains tool param for client-side filtering instead.
|
|
68
|
+
RESERVATIONS: project= causes 400; deviceUid= causes 400 — use projectId= and deviceId= instead.
|
|
69
|
+
DATES: Reservation and provisioning-profile dates are MM/DD/YYYY HH:mm:ss (not ISO 8601) — use the tool's dedicated date parser, not new Date().
|
|
70
|
+
SLOW TOOLS (avoid in loops): get_environment_summary, get_transaction_performance_summary, get_performance_trend, get_daily_execution_trend, find_latest_test_for_name (under project keys).
|
|
71
71
|
PROJECT CONTEXT: each project-level key (Project Admin or Project User, prefixed aut_1_...) is scoped to exactly one project — there is no API call to change project within the same key. "Switch projects", "change project context", "use a different project", or "access project X" all mean switch_environment to the profile holding that project's key. Use list_environments to show available profiles.`;
|
|
72
72
|
const server = new McpServer({ name, version }, { instructions: SERVER_INSTRUCTIONS });
|
|
73
73
|
registerUserTools(server);
|
package/package.json
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "digital-ai-testing-mcp",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "MCP server for Digital.ai Testing — device farm management, app lifecycle, and test automation",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"bin": {
|
|
8
|
-
"digital-ai-testing-mcp": "dist/index.js"
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
"dist",
|
|
12
|
-
"resources/boilerplate"
|
|
13
|
-
],
|
|
14
|
-
"engines": {
|
|
15
|
-
"node": ">=22"
|
|
16
|
-
},
|
|
17
|
-
"repository": {
|
|
18
|
-
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/digitalai-opensource/digital-ai-testing-mcp.git"
|
|
20
|
-
},
|
|
21
|
-
"homepage": "https://github.com/digitalai-opensource/digital-ai-testing-mcp#readme",
|
|
22
|
-
"bugs": "https://github.com/digitalai-opensource/digital-ai-testing-mcp/issues",
|
|
23
|
-
"license": "Apache-2.0",
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "tsc",
|
|
26
|
-
"start": "node dist/index.js",
|
|
27
|
-
"dev": "nodemon --exec ts-node --esm src/index.ts",
|
|
28
|
-
"lint": "eslint src/**/*.ts tests/**/*.ts",
|
|
29
|
-
"typecheck": "tsc --noEmit",
|
|
30
|
-
"test": "vitest run",
|
|
31
|
-
"test:live": "vitest run --config vitest.live.config.ts",
|
|
32
|
-
"test:users": "vitest run tests/users.test.ts",
|
|
33
|
-
"test:devices": "vitest run tests/devices.test.ts",
|
|
34
|
-
"test:device-groups": "vitest run tests/device-groups.test.ts",
|
|
35
|
-
"test:reservations": "vitest run tests/reservations.test.ts",
|
|
36
|
-
"test:applications": "vitest run tests/applications.test.ts",
|
|
37
|
-
"test:repository": "vitest run tests/repository.test.ts",
|
|
38
|
-
"test:browsers": "vitest run tests/browsers.test.ts",
|
|
39
|
-
"test:projects": "vitest run tests/projects.test.ts",
|
|
40
|
-
"test:provisioning": "vitest run tests/provisioning-profiles.test.ts",
|
|
41
|
-
"test:health": "vitest run tests/health.test.ts",
|
|
42
|
-
"test:utils": "vitest run tests/utils.test.ts",
|
|
43
|
-
"test:reporting": "vitest run tests/reporting.test.ts",
|
|
44
|
-
"test:test-views": "vitest run tests/test-views.test.ts",
|
|
45
|
-
"test:transactions": "vitest run tests/transactions.test.ts",
|
|
46
|
-
"test:analytics": "vitest run tests/analytics.test.ts",
|
|
47
|
-
"test:infrastructure": "vitest run tests/infrastructure.test.ts",
|
|
48
|
-
"test:performance": "vitest run tests/performance.test.ts",
|
|
49
|
-
"test:tools": "vitest run tests/tools.test.ts",
|
|
50
|
-
"test:usage-reports": "vitest run tests/usage-reports.test.ts"
|
|
51
|
-
},
|
|
52
|
-
"dependencies": {
|
|
53
|
-
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
54
|
-
"adm-zip": "^0.6.0",
|
|
55
|
-
"axios": "^1.19.0",
|
|
56
|
-
"dotenv": "^17.4.2",
|
|
57
|
-
"form-data": "^4.0.6",
|
|
58
|
-
"zod": "^4.4.3"
|
|
59
|
-
},
|
|
60
|
-
"devDependencies": {
|
|
61
|
-
"@types/node": "^26.2.0",
|
|
62
|
-
"eslint": "^10.8.1",
|
|
63
|
-
"nodemon": "^3.0.0",
|
|
64
|
-
"ts-node": "^10.9.0",
|
|
65
|
-
"tsx": "^4.23.12",
|
|
66
|
-
"typescript": "^6.0.3",
|
|
67
|
-
"typescript-eslint": "^8.67.0",
|
|
68
|
-
"vitest": "^4.1.10"
|
|
69
|
-
},
|
|
70
|
-
"allowScripts": {
|
|
71
|
-
"esbuild@0.28.1": true
|
|
72
|
-
}
|
|
73
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "digital-ai-testing-mcp",
|
|
3
|
+
"version": "1.2.3",
|
|
4
|
+
"description": "MCP server for Digital.ai Testing — device farm management, app lifecycle, and test automation",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"digital-ai-testing-mcp": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"resources/boilerplate"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=22"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/digitalai-opensource/digital-ai-testing-mcp.git"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/digitalai-opensource/digital-ai-testing-mcp#readme",
|
|
22
|
+
"bugs": "https://github.com/digitalai-opensource/digital-ai-testing-mcp/issues",
|
|
23
|
+
"license": "Apache-2.0",
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsc",
|
|
26
|
+
"start": "node dist/index.js",
|
|
27
|
+
"dev": "nodemon --exec ts-node --esm src/index.ts",
|
|
28
|
+
"lint": "eslint src/**/*.ts tests/**/*.ts",
|
|
29
|
+
"typecheck": "tsc --noEmit",
|
|
30
|
+
"test": "vitest run",
|
|
31
|
+
"test:live": "vitest run --config vitest.live.config.ts",
|
|
32
|
+
"test:users": "vitest run tests/users.test.ts",
|
|
33
|
+
"test:devices": "vitest run tests/devices.test.ts",
|
|
34
|
+
"test:device-groups": "vitest run tests/device-groups.test.ts",
|
|
35
|
+
"test:reservations": "vitest run tests/reservations.test.ts",
|
|
36
|
+
"test:applications": "vitest run tests/applications.test.ts",
|
|
37
|
+
"test:repository": "vitest run tests/repository.test.ts",
|
|
38
|
+
"test:browsers": "vitest run tests/browsers.test.ts",
|
|
39
|
+
"test:projects": "vitest run tests/projects.test.ts",
|
|
40
|
+
"test:provisioning": "vitest run tests/provisioning-profiles.test.ts",
|
|
41
|
+
"test:health": "vitest run tests/health.test.ts",
|
|
42
|
+
"test:utils": "vitest run tests/utils.test.ts",
|
|
43
|
+
"test:reporting": "vitest run tests/reporting.test.ts",
|
|
44
|
+
"test:test-views": "vitest run tests/test-views.test.ts",
|
|
45
|
+
"test:transactions": "vitest run tests/transactions.test.ts",
|
|
46
|
+
"test:analytics": "vitest run tests/analytics.test.ts",
|
|
47
|
+
"test:infrastructure": "vitest run tests/infrastructure.test.ts",
|
|
48
|
+
"test:performance": "vitest run tests/performance.test.ts",
|
|
49
|
+
"test:tools": "vitest run tests/tools.test.ts",
|
|
50
|
+
"test:usage-reports": "vitest run tests/usage-reports.test.ts"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
54
|
+
"adm-zip": "^0.6.0",
|
|
55
|
+
"axios": "^1.19.0",
|
|
56
|
+
"dotenv": "^17.4.2",
|
|
57
|
+
"form-data": "^4.0.6",
|
|
58
|
+
"zod": "^4.4.3"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@types/node": "^26.2.0",
|
|
62
|
+
"eslint": "^10.8.1",
|
|
63
|
+
"nodemon": "^3.0.0",
|
|
64
|
+
"ts-node": "^10.9.0",
|
|
65
|
+
"tsx": "^4.23.12",
|
|
66
|
+
"typescript": "^6.0.3",
|
|
67
|
+
"typescript-eslint": "^8.67.0",
|
|
68
|
+
"vitest": "^4.1.10"
|
|
69
|
+
},
|
|
70
|
+
"allowScripts": {
|
|
71
|
+
"esbuild@0.28.1": true
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
3
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
4
|
-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
5
|
-
<modelVersion>4.0.0</modelVersion>
|
|
6
|
-
|
|
7
|
-
<groupId>maven</groupId>
|
|
8
|
-
<artifactId>maven</artifactId>
|
|
9
|
-
<version>1.0-SNAPSHOT</version>
|
|
10
|
-
<build>
|
|
11
|
-
<plugins>
|
|
12
|
-
<plugin>
|
|
13
|
-
<groupId>org.apache.maven.plugins</groupId>
|
|
14
|
-
<artifactId>maven-compiler-plugin</artifactId>
|
|
15
|
-
<version>3.11.0</version>
|
|
16
|
-
<configuration>
|
|
17
|
-
<source>8</source>
|
|
18
|
-
<target>8</target>
|
|
19
|
-
</configuration>
|
|
20
|
-
</plugin>
|
|
21
|
-
<plugin>
|
|
22
|
-
<groupId>org.apache.maven.plugins</groupId>
|
|
23
|
-
<artifactId>maven-surefire-plugin</artifactId>
|
|
24
|
-
<version>3.1.2</version>
|
|
25
|
-
</plugin>
|
|
26
|
-
</plugins>
|
|
27
|
-
</build>
|
|
28
|
-
|
|
29
|
-
<dependencies>
|
|
30
|
-
<dependency>
|
|
31
|
-
<groupId>org.junit.jupiter</groupId>
|
|
32
|
-
<artifactId>junit-jupiter</artifactId>
|
|
33
|
-
<version>5.9.3</version>
|
|
34
|
-
<scope>test</scope>
|
|
35
|
-
</dependency>
|
|
36
|
-
<dependency>
|
|
37
|
-
<groupId>io.appium</groupId>
|
|
38
|
-
<artifactId>java-client</artifactId>
|
|
39
|
-
<version>7.6.0</version>
|
|
40
|
-
</dependency>
|
|
41
|
-
</dependencies>
|
|
42
|
-
</project>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
3
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
4
|
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
5
|
+
<modelVersion>4.0.0</modelVersion>
|
|
6
|
+
|
|
7
|
+
<groupId>maven</groupId>
|
|
8
|
+
<artifactId>maven</artifactId>
|
|
9
|
+
<version>1.0-SNAPSHOT</version>
|
|
10
|
+
<build>
|
|
11
|
+
<plugins>
|
|
12
|
+
<plugin>
|
|
13
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
14
|
+
<artifactId>maven-compiler-plugin</artifactId>
|
|
15
|
+
<version>3.11.0</version>
|
|
16
|
+
<configuration>
|
|
17
|
+
<source>8</source>
|
|
18
|
+
<target>8</target>
|
|
19
|
+
</configuration>
|
|
20
|
+
</plugin>
|
|
21
|
+
<plugin>
|
|
22
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
23
|
+
<artifactId>maven-surefire-plugin</artifactId>
|
|
24
|
+
<version>3.1.2</version>
|
|
25
|
+
</plugin>
|
|
26
|
+
</plugins>
|
|
27
|
+
</build>
|
|
28
|
+
|
|
29
|
+
<dependencies>
|
|
30
|
+
<dependency>
|
|
31
|
+
<groupId>org.junit.jupiter</groupId>
|
|
32
|
+
<artifactId>junit-jupiter</artifactId>
|
|
33
|
+
<version>5.9.3</version>
|
|
34
|
+
<scope>test</scope>
|
|
35
|
+
</dependency>
|
|
36
|
+
<dependency>
|
|
37
|
+
<groupId>io.appium</groupId>
|
|
38
|
+
<artifactId>java-client</artifactId>
|
|
39
|
+
<version>7.6.0</version>
|
|
40
|
+
</dependency>
|
|
41
|
+
</dependencies>
|
|
42
|
+
</project>
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
describe('LocalAndroidTest', () => {
|
|
2
|
-
it('quickStartAndroidNativeDemo', myTest)
|
|
3
|
-
})
|
|
4
|
-
async function myTest() {
|
|
5
|
-
// [BEGIN_DEMO_STEPS]
|
|
6
|
-
const username = await $('id=com.experitest.ExperiBank:id/usernameTextField');
|
|
7
|
-
await username.setValue('company');
|
|
8
|
-
const password = await $('id=com.experitest.ExperiBank:id/passwordTextField');
|
|
9
|
-
await password.setValue('company');
|
|
10
|
-
const loginButton = await $('id=com.experitest.ExperiBank:id/loginButton');
|
|
11
|
-
await loginButton.click();
|
|
12
|
-
const makePaymentButton = await $('id=com.experitest.ExperiBank:id/makePaymentButton');
|
|
13
|
-
await makePaymentButton.click();
|
|
14
|
-
const phoneNumber = await $("id=com.experitest.ExperiBank:id/phoneTextField");
|
|
15
|
-
await phoneNumber.setValue('0541234567');
|
|
16
|
-
const name = await $("id=com.experitest.ExperiBank:id/nameTextField");
|
|
17
|
-
await name.setValue('Jon Snow');
|
|
18
|
-
const amount = await $("id=com.experitest.ExperiBank:id/amountTextField");
|
|
19
|
-
await amount.setValue('50');
|
|
20
|
-
const countryButton = await $('//*[@resource-id="com.experitest.ExperiBank:id/countryButton"]');
|
|
21
|
-
await countryButton.click();
|
|
22
|
-
const country = await $('//*[@text="Switzerland"]');
|
|
23
|
-
await country.click();
|
|
24
|
-
const sendPaymentButton = await $("id=com.experitest.ExperiBank:id/sendPaymentButton");
|
|
25
|
-
await sendPaymentButton.click();
|
|
26
|
-
const yesButton = await $('id=android:id/button1');
|
|
27
|
-
await yesButton.click();
|
|
28
|
-
// [END_DEMO_STEPS]
|
|
29
|
-
}
|
|
1
|
+
describe('LocalAndroidTest', () => {
|
|
2
|
+
it('quickStartAndroidNativeDemo', myTest)
|
|
3
|
+
})
|
|
4
|
+
async function myTest() {
|
|
5
|
+
// [BEGIN_DEMO_STEPS]
|
|
6
|
+
const username = await $('id=com.experitest.ExperiBank:id/usernameTextField');
|
|
7
|
+
await username.setValue('company');
|
|
8
|
+
const password = await $('id=com.experitest.ExperiBank:id/passwordTextField');
|
|
9
|
+
await password.setValue('company');
|
|
10
|
+
const loginButton = await $('id=com.experitest.ExperiBank:id/loginButton');
|
|
11
|
+
await loginButton.click();
|
|
12
|
+
const makePaymentButton = await $('id=com.experitest.ExperiBank:id/makePaymentButton');
|
|
13
|
+
await makePaymentButton.click();
|
|
14
|
+
const phoneNumber = await $("id=com.experitest.ExperiBank:id/phoneTextField");
|
|
15
|
+
await phoneNumber.setValue('0541234567');
|
|
16
|
+
const name = await $("id=com.experitest.ExperiBank:id/nameTextField");
|
|
17
|
+
await name.setValue('Jon Snow');
|
|
18
|
+
const amount = await $("id=com.experitest.ExperiBank:id/amountTextField");
|
|
19
|
+
await amount.setValue('50');
|
|
20
|
+
const countryButton = await $('//*[@resource-id="com.experitest.ExperiBank:id/countryButton"]');
|
|
21
|
+
await countryButton.click();
|
|
22
|
+
const country = await $('//*[@text="Switzerland"]');
|
|
23
|
+
await country.click();
|
|
24
|
+
const sendPaymentButton = await $("id=com.experitest.ExperiBank:id/sendPaymentButton");
|
|
25
|
+
await sendPaymentButton.click();
|
|
26
|
+
const yesButton = await $('id=android:id/button1');
|
|
27
|
+
await yesButton.click();
|
|
28
|
+
// [END_DEMO_STEPS]
|
|
29
|
+
}
|
|
30
30
|
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
3
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
4
|
-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
5
|
-
<modelVersion>4.0.0</modelVersion>
|
|
6
|
-
|
|
7
|
-
<groupId>maven</groupId>
|
|
8
|
-
<artifactId>maven</artifactId>
|
|
9
|
-
<version>1.0-SNAPSHOT</version>
|
|
10
|
-
<build>
|
|
11
|
-
<plugins>
|
|
12
|
-
<plugin>
|
|
13
|
-
<groupId>org.apache.maven.plugins</groupId>
|
|
14
|
-
<artifactId>maven-compiler-plugin</artifactId>
|
|
15
|
-
<version>3.11.0</version>
|
|
16
|
-
<configuration>
|
|
17
|
-
<source>8</source>
|
|
18
|
-
<target>8</target>
|
|
19
|
-
</configuration>
|
|
20
|
-
</plugin>
|
|
21
|
-
<plugin>
|
|
22
|
-
<groupId>org.apache.maven.plugins</groupId>
|
|
23
|
-
<artifactId>maven-surefire-plugin</artifactId>
|
|
24
|
-
<version>3.1.2</version>
|
|
25
|
-
</plugin>
|
|
26
|
-
</plugins>
|
|
27
|
-
</build>
|
|
28
|
-
|
|
29
|
-
<dependencies>
|
|
30
|
-
<dependency>
|
|
31
|
-
<groupId>org.testng</groupId>
|
|
32
|
-
<artifactId>testng</artifactId>
|
|
33
|
-
<version>7.6.1</version>
|
|
34
|
-
<scope>test</scope>
|
|
35
|
-
</dependency>
|
|
36
|
-
<dependency>
|
|
37
|
-
<groupId>io.appium</groupId>
|
|
38
|
-
<artifactId>java-client</artifactId>
|
|
39
|
-
<version>7.6.0</version>
|
|
40
|
-
</dependency>
|
|
41
|
-
</dependencies>
|
|
42
|
-
</project>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
3
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
4
|
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
5
|
+
<modelVersion>4.0.0</modelVersion>
|
|
6
|
+
|
|
7
|
+
<groupId>maven</groupId>
|
|
8
|
+
<artifactId>maven</artifactId>
|
|
9
|
+
<version>1.0-SNAPSHOT</version>
|
|
10
|
+
<build>
|
|
11
|
+
<plugins>
|
|
12
|
+
<plugin>
|
|
13
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
14
|
+
<artifactId>maven-compiler-plugin</artifactId>
|
|
15
|
+
<version>3.11.0</version>
|
|
16
|
+
<configuration>
|
|
17
|
+
<source>8</source>
|
|
18
|
+
<target>8</target>
|
|
19
|
+
</configuration>
|
|
20
|
+
</plugin>
|
|
21
|
+
<plugin>
|
|
22
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
23
|
+
<artifactId>maven-surefire-plugin</artifactId>
|
|
24
|
+
<version>3.1.2</version>
|
|
25
|
+
</plugin>
|
|
26
|
+
</plugins>
|
|
27
|
+
</build>
|
|
28
|
+
|
|
29
|
+
<dependencies>
|
|
30
|
+
<dependency>
|
|
31
|
+
<groupId>org.testng</groupId>
|
|
32
|
+
<artifactId>testng</artifactId>
|
|
33
|
+
<version>7.6.1</version>
|
|
34
|
+
<scope>test</scope>
|
|
35
|
+
</dependency>
|
|
36
|
+
<dependency>
|
|
37
|
+
<groupId>io.appium</groupId>
|
|
38
|
+
<artifactId>java-client</artifactId>
|
|
39
|
+
<version>7.6.0</version>
|
|
40
|
+
</dependency>
|
|
41
|
+
</dependencies>
|
|
42
|
+
</project>
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
describe('LocaliOSTest', () => {
|
|
2
|
-
it('[testNameHere]', myTest)
|
|
3
|
-
})
|
|
4
|
-
async function myTest() {
|
|
5
|
-
// [BEGIN_DEMO_STEPS]
|
|
6
|
-
const username = await $('//*[@name="usernameTextField"]');
|
|
7
|
-
await username.setValue('company');
|
|
8
|
-
const password = await $('//*[@name="passwordTextField"]');
|
|
9
|
-
await password.setValue('company');
|
|
10
|
-
const loginButton = await $('//*[@name="loginButton"]');
|
|
11
|
-
await loginButton.click();
|
|
12
|
-
const makePaymentButton = await $('//*[@name="makePaymentButton"]');
|
|
13
|
-
await makePaymentButton.click();
|
|
14
|
-
const phoneNumber = await $("//*[@name='phoneTextField']");
|
|
15
|
-
await phoneNumber.setValue('0541234567');
|
|
16
|
-
const name = await $("//*[@name='nameTextField']");
|
|
17
|
-
await name.setValue('Jon Snow');
|
|
18
|
-
const amount = await $("//*[@name='amountTextField']");
|
|
19
|
-
await amount.setValue('50');
|
|
20
|
-
const countryButton = await $("//*[@name='countryButton']");
|
|
21
|
-
await countryButton.click();
|
|
22
|
-
const country = await $("//*[@name='Switzerland']");
|
|
23
|
-
await country.click();
|
|
24
|
-
const sendPaymentButton = await $("//*[@name='sendPaymentButton']");
|
|
25
|
-
await sendPaymentButton.click();
|
|
26
|
-
const yesButton = await $("//*[@name='Yes']");
|
|
27
|
-
await yesButton.click();
|
|
28
|
-
// [END_DEMO_STEPS]
|
|
29
|
-
}
|
|
1
|
+
describe('LocaliOSTest', () => {
|
|
2
|
+
it('[testNameHere]', myTest)
|
|
3
|
+
})
|
|
4
|
+
async function myTest() {
|
|
5
|
+
// [BEGIN_DEMO_STEPS]
|
|
6
|
+
const username = await $('//*[@name="usernameTextField"]');
|
|
7
|
+
await username.setValue('company');
|
|
8
|
+
const password = await $('//*[@name="passwordTextField"]');
|
|
9
|
+
await password.setValue('company');
|
|
10
|
+
const loginButton = await $('//*[@name="loginButton"]');
|
|
11
|
+
await loginButton.click();
|
|
12
|
+
const makePaymentButton = await $('//*[@name="makePaymentButton"]');
|
|
13
|
+
await makePaymentButton.click();
|
|
14
|
+
const phoneNumber = await $("//*[@name='phoneTextField']");
|
|
15
|
+
await phoneNumber.setValue('0541234567');
|
|
16
|
+
const name = await $("//*[@name='nameTextField']");
|
|
17
|
+
await name.setValue('Jon Snow');
|
|
18
|
+
const amount = await $("//*[@name='amountTextField']");
|
|
19
|
+
await amount.setValue('50');
|
|
20
|
+
const countryButton = await $("//*[@name='countryButton']");
|
|
21
|
+
await countryButton.click();
|
|
22
|
+
const country = await $("//*[@name='Switzerland']");
|
|
23
|
+
await country.click();
|
|
24
|
+
const sendPaymentButton = await $("//*[@name='sendPaymentButton']");
|
|
25
|
+
await sendPaymentButton.click();
|
|
26
|
+
const yesButton = await $("//*[@name='Yes']");
|
|
27
|
+
await yesButton.click();
|
|
28
|
+
// [END_DEMO_STEPS]
|
|
29
|
+
}
|
|
30
30
|
|