@browserstack/mcp-server 1.2.8-beta.2 → 1.2.9-beta.1
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 +0 -10
- package/dist/lib/utils.d.ts +38 -16
- package/dist/tools/accessibility.js +2 -3
- package/dist/tools/appautomate-utils/appium-sdk/constants.d.ts +13 -23
- package/dist/tools/appautomate-utils/appium-sdk/formatter.js +0 -1
- package/dist/tools/appautomate-utils/appium-sdk/handler.js +0 -1
- package/dist/tools/appautomate-utils/native-execution/constants.d.ts +11 -21
- package/dist/tools/appautomate.js +0 -2
- package/dist/tools/applive.js +0 -1
- package/dist/tools/automate.js +1 -2
- package/dist/tools/get-failure-logs.js +1 -3
- package/dist/tools/live.js +0 -1
- package/dist/tools/observability.js +0 -1
- package/dist/tools/rca-agent-utils/constants.d.ts +2 -2
- package/dist/tools/sdk-utils/common/schema.d.ts +40 -90
- package/dist/tools/sdk-utils/handler.js +1 -1
- package/dist/tools/testmanagement-utils/TCG-utils/types.d.ts +1 -9
- package/dist/tools/testmanagement-utils/add-test-result.d.ts +2 -24
- package/dist/tools/testmanagement-utils/create-lca-steps.d.ts +4 -72
- package/dist/tools/testmanagement-utils/create-lca-steps.js +0 -1
- package/dist/tools/testmanagement-utils/create-project-folder.d.ts +1 -15
- package/dist/tools/testmanagement-utils/create-testcase.d.ts +5 -55
- package/dist/tools/testmanagement-utils/create-testcase.js +0 -1
- package/dist/tools/testmanagement-utils/create-testrun.d.ts +14 -63
- package/dist/tools/testmanagement-utils/list-testcases.d.ts +1 -13
- package/dist/tools/testmanagement-utils/list-testcases.js +0 -1
- package/dist/tools/testmanagement-utils/list-testruns.d.ts +1 -7
- package/dist/tools/testmanagement-utils/list-testruns.js +0 -1
- package/dist/tools/testmanagement-utils/testcase-from-file.js +0 -1
- package/dist/tools/testmanagement-utils/update-testcase.d.ts +2 -28
- package/dist/tools/testmanagement-utils/update-testcase.js +1 -5
- package/dist/tools/testmanagement-utils/update-testrun.d.ts +10 -23
- package/dist/tools/testmanagement-utils/update-testrun.js +0 -1
- package/dist/tools/testmanagement-utils/upload-file.d.ts +1 -7
- package/dist/tools/testmanagement-utils/upload-file.js +0 -2
- package/dist/tools/testmanagement.js +0 -11
- package/package.json +24 -24
package/README.md
CHANGED
|
@@ -288,20 +288,10 @@ Select the “Installed” tab. Click the “Configure MCP Servers” button at
|
|
|
288
288
|
}
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
### Installing via Smithery
|
|
292
|
-
|
|
293
|
-
To install BrowserStack Test Platform Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@browserstack/mcp-server):
|
|
294
|
-
|
|
295
|
-
```bash
|
|
296
|
-
npx -y @smithery/cli install @browserstack/mcp-server --client claude
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
|
|
300
291
|
### 💡 List of BrowserStack MCP Tools
|
|
301
292
|
|
|
302
293
|
As of now we support 20 tools.
|
|
303
294
|
|
|
304
|
-
|
|
305
295
|
---
|
|
306
296
|
|
|
307
297
|
## 🧾 Test Management
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -8,71 +8,93 @@ export declare function fetchFromBrowserStackAPI(url: string, config: BrowserSta
|
|
|
8
8
|
export declare function handleMCPError(toolName: string, server: McpServer, config: BrowserStackConfig, error: unknown): {
|
|
9
9
|
[x: string]: unknown;
|
|
10
10
|
content: ({
|
|
11
|
-
[x: string]: unknown;
|
|
12
11
|
type: "text";
|
|
13
12
|
text: string;
|
|
13
|
+
annotations?: {
|
|
14
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
15
|
+
priority?: number | undefined;
|
|
16
|
+
lastModified?: string | undefined;
|
|
17
|
+
} | undefined;
|
|
14
18
|
_meta?: {
|
|
15
19
|
[x: string]: unknown;
|
|
16
20
|
} | undefined;
|
|
17
21
|
} | {
|
|
18
|
-
[x: string]: unknown;
|
|
19
22
|
type: "image";
|
|
20
23
|
data: string;
|
|
21
24
|
mimeType: string;
|
|
25
|
+
annotations?: {
|
|
26
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
27
|
+
priority?: number | undefined;
|
|
28
|
+
lastModified?: string | undefined;
|
|
29
|
+
} | undefined;
|
|
22
30
|
_meta?: {
|
|
23
31
|
[x: string]: unknown;
|
|
24
32
|
} | undefined;
|
|
25
33
|
} | {
|
|
26
|
-
[x: string]: unknown;
|
|
27
34
|
type: "audio";
|
|
28
35
|
data: string;
|
|
29
36
|
mimeType: string;
|
|
37
|
+
annotations?: {
|
|
38
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
39
|
+
priority?: number | undefined;
|
|
40
|
+
lastModified?: string | undefined;
|
|
41
|
+
} | undefined;
|
|
30
42
|
_meta?: {
|
|
31
43
|
[x: string]: unknown;
|
|
32
44
|
} | undefined;
|
|
33
45
|
} | {
|
|
34
|
-
[x: string]: unknown;
|
|
35
|
-
type: "resource_link";
|
|
36
|
-
name: string;
|
|
37
46
|
uri: string;
|
|
47
|
+
name: string;
|
|
48
|
+
type: "resource_link";
|
|
49
|
+
description?: string | undefined;
|
|
50
|
+
mimeType?: string | undefined;
|
|
51
|
+
annotations?: {
|
|
52
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
53
|
+
priority?: number | undefined;
|
|
54
|
+
lastModified?: string | undefined;
|
|
55
|
+
} | undefined;
|
|
38
56
|
_meta?: {
|
|
39
57
|
[x: string]: unknown;
|
|
40
58
|
} | undefined;
|
|
41
|
-
mimeType?: string | undefined;
|
|
42
|
-
title?: string | undefined;
|
|
43
|
-
description?: string | undefined;
|
|
44
59
|
icons?: {
|
|
45
|
-
[x: string]: unknown;
|
|
46
60
|
src: string;
|
|
47
61
|
mimeType?: string | undefined;
|
|
48
62
|
sizes?: string[] | undefined;
|
|
63
|
+
theme?: "light" | "dark" | undefined;
|
|
49
64
|
}[] | undefined;
|
|
65
|
+
title?: string | undefined;
|
|
50
66
|
} | {
|
|
51
|
-
[x: string]: unknown;
|
|
52
67
|
type: "resource";
|
|
53
68
|
resource: {
|
|
54
|
-
[x: string]: unknown;
|
|
55
|
-
text: string;
|
|
56
69
|
uri: string;
|
|
70
|
+
text: string;
|
|
71
|
+
mimeType?: string | undefined;
|
|
57
72
|
_meta?: {
|
|
58
73
|
[x: string]: unknown;
|
|
59
74
|
} | undefined;
|
|
60
|
-
mimeType?: string | undefined;
|
|
61
75
|
} | {
|
|
62
|
-
[x: string]: unknown;
|
|
63
76
|
uri: string;
|
|
64
77
|
blob: string;
|
|
78
|
+
mimeType?: string | undefined;
|
|
65
79
|
_meta?: {
|
|
66
80
|
[x: string]: unknown;
|
|
67
81
|
} | undefined;
|
|
68
|
-
mimeType?: string | undefined;
|
|
69
82
|
};
|
|
83
|
+
annotations?: {
|
|
84
|
+
audience?: ("user" | "assistant")[] | undefined;
|
|
85
|
+
priority?: number | undefined;
|
|
86
|
+
lastModified?: string | undefined;
|
|
87
|
+
} | undefined;
|
|
70
88
|
_meta?: {
|
|
71
89
|
[x: string]: unknown;
|
|
72
90
|
} | undefined;
|
|
73
91
|
})[];
|
|
74
92
|
_meta?: {
|
|
75
93
|
[x: string]: unknown;
|
|
94
|
+
progressToken?: string | number | undefined;
|
|
95
|
+
"io.modelcontextprotocol/related-task"?: {
|
|
96
|
+
taskId: string;
|
|
97
|
+
} | undefined;
|
|
76
98
|
} | undefined;
|
|
77
99
|
structuredContent?: {
|
|
78
100
|
[x: string]: unknown;
|
|
@@ -12,16 +12,15 @@ function setupAuth(config) {
|
|
|
12
12
|
const [username, password] = authString.split(":");
|
|
13
13
|
return { username, password };
|
|
14
14
|
}
|
|
15
|
-
function createErrorResponse(message
|
|
15
|
+
function createErrorResponse(message) {
|
|
16
16
|
return {
|
|
17
17
|
content: [
|
|
18
18
|
{
|
|
19
19
|
type: "text",
|
|
20
20
|
text: message,
|
|
21
|
-
isError,
|
|
22
21
|
},
|
|
23
22
|
],
|
|
24
|
-
isError,
|
|
23
|
+
isError: true,
|
|
25
24
|
};
|
|
26
25
|
}
|
|
27
26
|
function createSuccessResponse(messages) {
|
|
@@ -13,36 +13,26 @@ export declare const APP_DEVICE_CONFIGS: {
|
|
|
13
13
|
export declare const STEP_DELIMITER = "---STEP---";
|
|
14
14
|
export declare const DEFAULT_APP_PATH = "bs://sample.app";
|
|
15
15
|
export declare const MobileDeviceSchema: z.ZodObject<{
|
|
16
|
-
platform: z.ZodEnum<
|
|
16
|
+
platform: z.ZodEnum<{
|
|
17
|
+
android: "android";
|
|
18
|
+
ios: "ios";
|
|
19
|
+
}>;
|
|
17
20
|
deviceName: z.ZodString;
|
|
18
21
|
osVersion: z.ZodString;
|
|
19
|
-
},
|
|
20
|
-
platform: "android" | "ios";
|
|
21
|
-
deviceName: string;
|
|
22
|
-
osVersion: string;
|
|
23
|
-
}, {
|
|
24
|
-
platform: "android" | "ios";
|
|
25
|
-
deviceName: string;
|
|
26
|
-
osVersion: string;
|
|
27
|
-
}>;
|
|
22
|
+
}, z.core.$strip>;
|
|
28
23
|
export declare const SETUP_APP_AUTOMATE_DESCRIPTION = "Set up BrowserStack App Automate SDK integration for Appium-based mobile app testing. ONLY for Appium based framework . This tool configures SDK for various languages with appium. For pre-built Espresso or XCUITest test suites, use 'runAppTestsOnBrowserStack' instead.";
|
|
29
24
|
export declare const SETUP_APP_AUTOMATE_SCHEMA: {
|
|
30
|
-
detectedFramework: z.
|
|
31
|
-
detectedTestingFramework: z.
|
|
32
|
-
detectedLanguage: z.
|
|
25
|
+
detectedFramework: z.ZodEnum<typeof AppSDKSupportedFrameworkEnum>;
|
|
26
|
+
detectedTestingFramework: z.ZodEnum<typeof AppSDKSupportedTestingFrameworkEnum>;
|
|
27
|
+
detectedLanguage: z.ZodEnum<typeof AppSDKSupportedLanguageEnum>;
|
|
33
28
|
devices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
34
|
-
platform: z.ZodEnum<
|
|
29
|
+
platform: z.ZodEnum<{
|
|
30
|
+
android: "android";
|
|
31
|
+
ios: "ios";
|
|
32
|
+
}>;
|
|
35
33
|
deviceName: z.ZodString;
|
|
36
34
|
osVersion: z.ZodString;
|
|
37
|
-
},
|
|
38
|
-
platform: "android" | "ios";
|
|
39
|
-
deviceName: string;
|
|
40
|
-
osVersion: string;
|
|
41
|
-
}, {
|
|
42
|
-
platform: "android" | "ios";
|
|
43
|
-
deviceName: string;
|
|
44
|
-
osVersion: string;
|
|
45
|
-
}>, "many">>;
|
|
35
|
+
}, z.core.$strip>>>;
|
|
46
36
|
appPath: z.ZodString;
|
|
47
37
|
project: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
48
38
|
};
|
|
@@ -2,34 +2,24 @@ import { z } from "zod";
|
|
|
2
2
|
import { AppTestPlatform } from "./types.js";
|
|
3
3
|
export declare const RUN_APP_AUTOMATE_DESCRIPTION = "Execute pre-built native mobile test suites (Espresso for Android, XCUITest for iOS) by direct upload to BrowserStack. ONLY for compiled .apk/.ipa test files. This is NOT for SDK integration or Appium tests. For Appium-based testing with SDK setup, use 'setupBrowserStackAppAutomateTests' instead.";
|
|
4
4
|
export declare const MobileDeviceSchema: z.ZodObject<{
|
|
5
|
-
platform: z.ZodEnum<
|
|
5
|
+
platform: z.ZodEnum<{
|
|
6
|
+
android: "android";
|
|
7
|
+
ios: "ios";
|
|
8
|
+
}>;
|
|
6
9
|
deviceName: z.ZodString;
|
|
7
10
|
osVersion: z.ZodString;
|
|
8
|
-
},
|
|
9
|
-
platform: "android" | "ios";
|
|
10
|
-
deviceName: string;
|
|
11
|
-
osVersion: string;
|
|
12
|
-
}, {
|
|
13
|
-
platform: "android" | "ios";
|
|
14
|
-
deviceName: string;
|
|
15
|
-
osVersion: string;
|
|
16
|
-
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
17
12
|
export declare const RUN_APP_AUTOMATE_SCHEMA: {
|
|
18
13
|
appPath: z.ZodString;
|
|
19
14
|
testSuitePath: z.ZodString;
|
|
20
15
|
devices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
21
|
-
platform: z.ZodEnum<
|
|
16
|
+
platform: z.ZodEnum<{
|
|
17
|
+
android: "android";
|
|
18
|
+
ios: "ios";
|
|
19
|
+
}>;
|
|
22
20
|
deviceName: z.ZodString;
|
|
23
21
|
osVersion: z.ZodString;
|
|
24
|
-
},
|
|
25
|
-
platform: "android" | "ios";
|
|
26
|
-
deviceName: string;
|
|
27
|
-
osVersion: string;
|
|
28
|
-
}, {
|
|
29
|
-
platform: "android" | "ios";
|
|
30
|
-
deviceName: string;
|
|
31
|
-
osVersion: string;
|
|
32
|
-
}>, "many">>;
|
|
22
|
+
}, z.core.$strip>>>;
|
|
33
23
|
project: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
34
|
-
detectedAutomationFramework: z.
|
|
24
|
+
detectedAutomationFramework: z.ZodEnum<typeof AppTestPlatform>;
|
|
35
25
|
};
|
|
@@ -81,7 +81,6 @@ async function takeAppScreenshot(args) {
|
|
|
81
81
|
type: "image",
|
|
82
82
|
data: compressed,
|
|
83
83
|
mimeType: "image/png",
|
|
84
|
-
name: `screenshot-${selectedDevice.device}-${Date.now()}`,
|
|
85
84
|
},
|
|
86
85
|
],
|
|
87
86
|
};
|
|
@@ -257,7 +256,6 @@ export default function addAppAutomationTools(server, config) {
|
|
|
257
256
|
{
|
|
258
257
|
type: "text",
|
|
259
258
|
text: `Failed to bootstrap project with BrowserStack App Automate SDK. Error: ${error_message}. Please open an issue on GitHub if the problem persists`,
|
|
260
|
-
isError: true,
|
|
261
259
|
},
|
|
262
260
|
],
|
|
263
261
|
isError: true,
|
package/dist/tools/applive.js
CHANGED
package/dist/tools/automate.js
CHANGED
|
@@ -20,10 +20,9 @@ export async function fetchAutomationScreenshotsTool(args, config) {
|
|
|
20
20
|
}
|
|
21
21
|
const results = screenshots.map((screenshot, index) => ({
|
|
22
22
|
type: "image",
|
|
23
|
-
text: `Screenshot ${index + 1}`,
|
|
24
23
|
data: screenshot.base64,
|
|
25
24
|
mimeType: "image/png",
|
|
26
|
-
|
|
25
|
+
_meta: { url: screenshot.url, index: index + 1 },
|
|
27
26
|
}));
|
|
28
27
|
return {
|
|
29
28
|
content: [
|
|
@@ -41,9 +41,9 @@ export async function getFailureLogs(args, config) {
|
|
|
41
41
|
{
|
|
42
42
|
type: "text",
|
|
43
43
|
text: `No valid log types found for ${args.sessionType} session.\nErrors encountered:\n${errors.join("\n")}`,
|
|
44
|
-
isError: true,
|
|
45
44
|
},
|
|
46
45
|
],
|
|
46
|
+
isError: true,
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
let response;
|
|
@@ -91,7 +91,6 @@ export async function getFailureLogs(args, config) {
|
|
|
91
91
|
results.push({
|
|
92
92
|
type: "text",
|
|
93
93
|
text: `Errors encountered:\n${errors.join("\n")}`,
|
|
94
|
-
isError: true,
|
|
95
94
|
});
|
|
96
95
|
}
|
|
97
96
|
return { content: results };
|
|
@@ -132,7 +131,6 @@ export default function registerGetFailureLogs(server, config) {
|
|
|
132
131
|
{
|
|
133
132
|
type: "text",
|
|
134
133
|
text: `Failed to fetch failure logs: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
135
|
-
isError: true,
|
|
136
134
|
},
|
|
137
135
|
],
|
|
138
136
|
isError: true,
|
package/dist/tools/live.js
CHANGED
|
@@ -52,7 +52,6 @@ export default function addObservabilityTools(server, config) {
|
|
|
52
52
|
{
|
|
53
53
|
type: "text",
|
|
54
54
|
text: `Failed to get failures in the last run. Error: ${error}. Please open an issue on GitHub if this is an issue with BrowserStack`,
|
|
55
|
-
isError: true,
|
|
56
55
|
},
|
|
57
56
|
],
|
|
58
57
|
isError: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { TestStatus } from "./types.js";
|
|
3
3
|
export declare const FETCH_RCA_PARAMS: {
|
|
4
|
-
testId: z.ZodArray<z.ZodNumber
|
|
4
|
+
testId: z.ZodArray<z.ZodNumber>;
|
|
5
5
|
};
|
|
6
6
|
export declare const GET_BUILD_ID_PARAMS: {
|
|
7
7
|
browserStackProjectName: z.ZodString;
|
|
@@ -9,5 +9,5 @@ export declare const GET_BUILD_ID_PARAMS: {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const LIST_TEST_IDS_PARAMS: {
|
|
11
11
|
buildId: z.ZodString;
|
|
12
|
-
status: z.
|
|
12
|
+
status: z.ZodEnum<typeof TestStatus>;
|
|
13
13
|
};
|
|
@@ -15,123 +15,73 @@ export declare const MacOSPlatformEnum: {
|
|
|
15
15
|
};
|
|
16
16
|
export declare const SetUpPercyParamsShape: {
|
|
17
17
|
projectName: z.ZodString;
|
|
18
|
-
detectedLanguage: z.
|
|
19
|
-
detectedBrowserAutomationFramework: z.
|
|
20
|
-
detectedTestingFramework: z.
|
|
21
|
-
integrationType: z.
|
|
22
|
-
folderPaths: z.ZodOptional<z.ZodArray<z.ZodString
|
|
23
|
-
filePaths: z.ZodOptional<z.ZodArray<z.ZodString
|
|
18
|
+
detectedLanguage: z.ZodEnum<typeof SDKSupportedLanguageEnum>;
|
|
19
|
+
detectedBrowserAutomationFramework: z.ZodEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
|
|
20
|
+
detectedTestingFramework: z.ZodEnum<typeof SDKSupportedTestingFrameworkEnum>;
|
|
21
|
+
integrationType: z.ZodEnum<typeof PercyIntegrationTypeEnum>;
|
|
22
|
+
folderPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
|
+
filePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
24
|
};
|
|
25
25
|
export declare const RunTestsOnBrowserStackParamsShape: {
|
|
26
26
|
projectName: z.ZodString;
|
|
27
|
-
detectedLanguage: z.
|
|
28
|
-
detectedBrowserAutomationFramework: z.
|
|
29
|
-
detectedTestingFramework: z.
|
|
27
|
+
detectedLanguage: z.ZodEnum<typeof SDKSupportedLanguageEnum>;
|
|
28
|
+
detectedBrowserAutomationFramework: z.ZodEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
|
|
29
|
+
detectedTestingFramework: z.ZodEnum<typeof SDKSupportedTestingFrameworkEnum>;
|
|
30
30
|
devices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
31
|
-
platform: z.ZodEnum<
|
|
31
|
+
platform: z.ZodEnum<{
|
|
32
|
+
android: "android";
|
|
33
|
+
windows: "windows";
|
|
34
|
+
macos: "macos";
|
|
35
|
+
ios: "ios";
|
|
36
|
+
}>;
|
|
32
37
|
deviceName: z.ZodOptional<z.ZodString>;
|
|
33
38
|
osVersion: z.ZodString;
|
|
34
39
|
browser: z.ZodOptional<z.ZodString>;
|
|
35
40
|
browserVersion: z.ZodOptional<z.ZodString>;
|
|
36
|
-
},
|
|
37
|
-
platform: "android" | "windows" | "macos" | "ios";
|
|
38
|
-
osVersion: string;
|
|
39
|
-
deviceName?: string | undefined;
|
|
40
|
-
browser?: string | undefined;
|
|
41
|
-
browserVersion?: string | undefined;
|
|
42
|
-
}, {
|
|
43
|
-
platform: "android" | "windows" | "macos" | "ios";
|
|
44
|
-
osVersion: string;
|
|
45
|
-
deviceName?: string | undefined;
|
|
46
|
-
browser?: string | undefined;
|
|
47
|
-
browserVersion?: string | undefined;
|
|
48
|
-
}>, "many">>;
|
|
41
|
+
}, z.core.$strip>>>;
|
|
49
42
|
};
|
|
50
43
|
export declare const SetUpPercySchema: z.ZodObject<{
|
|
51
44
|
projectName: z.ZodString;
|
|
52
|
-
detectedLanguage: z.
|
|
53
|
-
detectedBrowserAutomationFramework: z.
|
|
54
|
-
detectedTestingFramework: z.
|
|
55
|
-
integrationType: z.
|
|
56
|
-
folderPaths: z.ZodOptional<z.ZodArray<z.ZodString
|
|
57
|
-
filePaths: z.ZodOptional<z.ZodArray<z.ZodString
|
|
58
|
-
},
|
|
59
|
-
projectName: string;
|
|
60
|
-
detectedLanguage: SDKSupportedLanguageEnum;
|
|
61
|
-
detectedBrowserAutomationFramework: SDKSupportedBrowserAutomationFrameworkEnum;
|
|
62
|
-
detectedTestingFramework: SDKSupportedTestingFrameworkEnum;
|
|
63
|
-
integrationType: PercyIntegrationTypeEnum;
|
|
64
|
-
folderPaths?: string[] | undefined;
|
|
65
|
-
filePaths?: string[] | undefined;
|
|
66
|
-
}, {
|
|
67
|
-
projectName: string;
|
|
68
|
-
detectedLanguage: SDKSupportedLanguageEnum;
|
|
69
|
-
detectedBrowserAutomationFramework: SDKSupportedBrowserAutomationFrameworkEnum;
|
|
70
|
-
detectedTestingFramework: SDKSupportedTestingFrameworkEnum;
|
|
71
|
-
integrationType: PercyIntegrationTypeEnum;
|
|
72
|
-
folderPaths?: string[] | undefined;
|
|
73
|
-
filePaths?: string[] | undefined;
|
|
74
|
-
}>;
|
|
45
|
+
detectedLanguage: z.ZodEnum<typeof SDKSupportedLanguageEnum>;
|
|
46
|
+
detectedBrowserAutomationFramework: z.ZodEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
|
|
47
|
+
detectedTestingFramework: z.ZodEnum<typeof SDKSupportedTestingFrameworkEnum>;
|
|
48
|
+
integrationType: z.ZodEnum<typeof PercyIntegrationTypeEnum>;
|
|
49
|
+
folderPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
50
|
+
filePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
+
}, z.core.$strip>;
|
|
75
52
|
export declare const RunTestsOnBrowserStackSchema: z.ZodObject<{
|
|
76
53
|
projectName: z.ZodString;
|
|
77
|
-
detectedLanguage: z.
|
|
78
|
-
detectedBrowserAutomationFramework: z.
|
|
79
|
-
detectedTestingFramework: z.
|
|
54
|
+
detectedLanguage: z.ZodEnum<typeof SDKSupportedLanguageEnum>;
|
|
55
|
+
detectedBrowserAutomationFramework: z.ZodEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
|
|
56
|
+
detectedTestingFramework: z.ZodEnum<typeof SDKSupportedTestingFrameworkEnum>;
|
|
80
57
|
devices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
81
|
-
platform: z.ZodEnum<
|
|
58
|
+
platform: z.ZodEnum<{
|
|
59
|
+
android: "android";
|
|
60
|
+
windows: "windows";
|
|
61
|
+
macos: "macos";
|
|
62
|
+
ios: "ios";
|
|
63
|
+
}>;
|
|
82
64
|
deviceName: z.ZodOptional<z.ZodString>;
|
|
83
65
|
osVersion: z.ZodString;
|
|
84
66
|
browser: z.ZodOptional<z.ZodString>;
|
|
85
67
|
browserVersion: z.ZodOptional<z.ZodString>;
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
osVersion: string;
|
|
89
|
-
deviceName?: string | undefined;
|
|
90
|
-
browser?: string | undefined;
|
|
91
|
-
browserVersion?: string | undefined;
|
|
92
|
-
}, {
|
|
93
|
-
platform: "android" | "windows" | "macos" | "ios";
|
|
94
|
-
osVersion: string;
|
|
95
|
-
deviceName?: string | undefined;
|
|
96
|
-
browser?: string | undefined;
|
|
97
|
-
browserVersion?: string | undefined;
|
|
98
|
-
}>, "many">>;
|
|
99
|
-
}, "strip", z.ZodTypeAny, {
|
|
100
|
-
projectName: string;
|
|
101
|
-
detectedLanguage: SDKSupportedLanguageEnum;
|
|
102
|
-
detectedBrowserAutomationFramework: SDKSupportedBrowserAutomationFrameworkEnum;
|
|
103
|
-
detectedTestingFramework: SDKSupportedTestingFrameworkEnum;
|
|
104
|
-
devices: {
|
|
105
|
-
platform: "android" | "windows" | "macos" | "ios";
|
|
106
|
-
osVersion: string;
|
|
107
|
-
deviceName?: string | undefined;
|
|
108
|
-
browser?: string | undefined;
|
|
109
|
-
browserVersion?: string | undefined;
|
|
110
|
-
}[];
|
|
111
|
-
}, {
|
|
112
|
-
projectName: string;
|
|
113
|
-
detectedLanguage: SDKSupportedLanguageEnum;
|
|
114
|
-
detectedBrowserAutomationFramework: SDKSupportedBrowserAutomationFrameworkEnum;
|
|
115
|
-
detectedTestingFramework: SDKSupportedTestingFrameworkEnum;
|
|
116
|
-
devices?: {
|
|
117
|
-
platform: "android" | "windows" | "macos" | "ios";
|
|
118
|
-
osVersion: string;
|
|
119
|
-
deviceName?: string | undefined;
|
|
120
|
-
browser?: string | undefined;
|
|
121
|
-
browserVersion?: string | undefined;
|
|
122
|
-
}[] | undefined;
|
|
123
|
-
}>;
|
|
68
|
+
}, z.core.$strip>>>;
|
|
69
|
+
}, z.core.$strip>;
|
|
124
70
|
export type SetUpPercyInput = z.infer<typeof SetUpPercySchema>;
|
|
125
71
|
export type RunTestsOnBrowserStackInput = z.infer<typeof RunTestsOnBrowserStackSchema>;
|
|
126
72
|
export declare const RunPercyScanParamsShape: {
|
|
127
73
|
projectName: z.ZodString;
|
|
128
74
|
percyRunCommand: z.ZodOptional<z.ZodString>;
|
|
129
|
-
integrationType: z.
|
|
75
|
+
integrationType: z.ZodEnum<typeof PercyIntegrationTypeEnum>;
|
|
130
76
|
};
|
|
131
77
|
export declare const FetchPercyChangesParamsShape: {
|
|
132
78
|
project_name: z.ZodString;
|
|
133
79
|
};
|
|
134
80
|
export declare const ManagePercyBuildApprovalParamsShape: {
|
|
135
81
|
buildId: z.ZodString;
|
|
136
|
-
action: z.ZodEnum<
|
|
82
|
+
action: z.ZodEnum<{
|
|
83
|
+
approve: "approve";
|
|
84
|
+
unapprove: "unapprove";
|
|
85
|
+
reject: "reject";
|
|
86
|
+
}>;
|
|
137
87
|
};
|
|
@@ -143,7 +143,7 @@ export async function simulatePercyChangeHandler(rawInput, config) {
|
|
|
143
143
|
}
|
|
144
144
|
if (Array.isArray(percyInstruction.content)) {
|
|
145
145
|
percyInstruction.content = percyInstruction.content.map((item) => {
|
|
146
|
-
if (typeof item.text === "string") {
|
|
146
|
+
if (item.type === "text" && typeof item.text === "string") {
|
|
147
147
|
const updatedText = item.text
|
|
148
148
|
.replace(PERCY_REPLACE_REGEX, PERCY_SIMULATE_INSTRUCTION)
|
|
149
149
|
.replace(PERCY_VERIFICATION_REGEX, "");
|
|
@@ -3,15 +3,7 @@ export declare const CreateTestCasesFromFileSchema: z.ZodObject<{
|
|
|
3
3
|
documentId: z.ZodString;
|
|
4
4
|
folderId: z.ZodString;
|
|
5
5
|
projectReferenceId: z.ZodString;
|
|
6
|
-
},
|
|
7
|
-
documentId: string;
|
|
8
|
-
folderId: string;
|
|
9
|
-
projectReferenceId: string;
|
|
10
|
-
}, {
|
|
11
|
-
documentId: string;
|
|
12
|
-
folderId: string;
|
|
13
|
-
projectReferenceId: string;
|
|
14
|
-
}>;
|
|
6
|
+
}, z.core.$strip>;
|
|
15
7
|
export type CreateTestCasesFromFileArgs = z.infer<typeof CreateTestCasesFromFileSchema>;
|
|
16
8
|
export interface DefaultFieldMaps {
|
|
17
9
|
priority: Record<string, number>;
|
|
@@ -10,31 +10,9 @@ export declare const AddTestResultSchema: z.ZodObject<{
|
|
|
10
10
|
test_result: z.ZodObject<{
|
|
11
11
|
status: z.ZodString;
|
|
12
12
|
description: z.ZodOptional<z.ZodString>;
|
|
13
|
-
},
|
|
14
|
-
status: string;
|
|
15
|
-
description?: string | undefined;
|
|
16
|
-
}, {
|
|
17
|
-
status: string;
|
|
18
|
-
description?: string | undefined;
|
|
19
|
-
}>;
|
|
13
|
+
}, z.core.$strip>;
|
|
20
14
|
test_case_id: z.ZodString;
|
|
21
|
-
},
|
|
22
|
-
project_identifier: string;
|
|
23
|
-
test_run_id: string;
|
|
24
|
-
test_result: {
|
|
25
|
-
status: string;
|
|
26
|
-
description?: string | undefined;
|
|
27
|
-
};
|
|
28
|
-
test_case_id: string;
|
|
29
|
-
}, {
|
|
30
|
-
project_identifier: string;
|
|
31
|
-
test_run_id: string;
|
|
32
|
-
test_result: {
|
|
33
|
-
status: string;
|
|
34
|
-
description?: string | undefined;
|
|
35
|
-
};
|
|
36
|
-
test_case_id: string;
|
|
37
|
-
}>;
|
|
15
|
+
}, z.core.$strip>;
|
|
38
16
|
export type AddTestResultArgs = z.infer<typeof AddTestResultSchema>;
|
|
39
17
|
/**
|
|
40
18
|
* Adds a test result to a specific test run via BrowserStack Test Management API.
|
|
@@ -11,13 +11,7 @@ export declare const CreateLCAStepsSchema: z.ZodObject<{
|
|
|
11
11
|
credentials: z.ZodOptional<z.ZodObject<{
|
|
12
12
|
username: z.ZodString;
|
|
13
13
|
password: z.ZodString;
|
|
14
|
-
},
|
|
15
|
-
username: string;
|
|
16
|
-
password: string;
|
|
17
|
-
}, {
|
|
18
|
-
username: string;
|
|
19
|
-
password: string;
|
|
20
|
-
}>>;
|
|
14
|
+
}, z.core.$strip>>;
|
|
21
15
|
local_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
22
16
|
test_name: z.ZodString;
|
|
23
17
|
test_case_details: z.ZodObject<{
|
|
@@ -27,72 +21,10 @@ export declare const CreateLCAStepsSchema: z.ZodObject<{
|
|
|
27
21
|
test_case_steps: z.ZodArray<z.ZodObject<{
|
|
28
22
|
step: z.ZodString;
|
|
29
23
|
result: z.ZodString;
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
result: string;
|
|
33
|
-
}, {
|
|
34
|
-
step: string;
|
|
35
|
-
result: string;
|
|
36
|
-
}>, "many">;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
name: string;
|
|
39
|
-
description: string;
|
|
40
|
-
test_case_steps: {
|
|
41
|
-
step: string;
|
|
42
|
-
result: string;
|
|
43
|
-
}[];
|
|
44
|
-
preconditions: string;
|
|
45
|
-
}, {
|
|
46
|
-
name: string;
|
|
47
|
-
description: string;
|
|
48
|
-
test_case_steps: {
|
|
49
|
-
step: string;
|
|
50
|
-
result: string;
|
|
51
|
-
}[];
|
|
52
|
-
preconditions: string;
|
|
53
|
-
}>;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
54
26
|
wait_for_completion: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
55
|
-
},
|
|
56
|
-
project_identifier: string;
|
|
57
|
-
test_case_identifier: string;
|
|
58
|
-
base_url: string;
|
|
59
|
-
local_enabled: boolean;
|
|
60
|
-
test_name: string;
|
|
61
|
-
test_case_details: {
|
|
62
|
-
name: string;
|
|
63
|
-
description: string;
|
|
64
|
-
test_case_steps: {
|
|
65
|
-
step: string;
|
|
66
|
-
result: string;
|
|
67
|
-
}[];
|
|
68
|
-
preconditions: string;
|
|
69
|
-
};
|
|
70
|
-
wait_for_completion: boolean;
|
|
71
|
-
credentials?: {
|
|
72
|
-
username: string;
|
|
73
|
-
password: string;
|
|
74
|
-
} | undefined;
|
|
75
|
-
}, {
|
|
76
|
-
project_identifier: string;
|
|
77
|
-
test_case_identifier: string;
|
|
78
|
-
base_url: string;
|
|
79
|
-
test_name: string;
|
|
80
|
-
test_case_details: {
|
|
81
|
-
name: string;
|
|
82
|
-
description: string;
|
|
83
|
-
test_case_steps: {
|
|
84
|
-
step: string;
|
|
85
|
-
result: string;
|
|
86
|
-
}[];
|
|
87
|
-
preconditions: string;
|
|
88
|
-
};
|
|
89
|
-
credentials?: {
|
|
90
|
-
username: string;
|
|
91
|
-
password: string;
|
|
92
|
-
} | undefined;
|
|
93
|
-
local_enabled?: boolean | undefined;
|
|
94
|
-
wait_for_completion?: boolean | undefined;
|
|
95
|
-
}>;
|
|
27
|
+
}, z.core.$strip>;
|
|
96
28
|
export type CreateLCAStepsArgs = z.infer<typeof CreateLCAStepsSchema>;
|
|
97
29
|
/**
|
|
98
30
|
* Creates LCA (Low Code Automation) steps for a test case in BrowserStack Test Management
|
|
@@ -153,7 +153,6 @@ export async function createLCASteps(args, context, config) {
|
|
|
153
153
|
{
|
|
154
154
|
type: "text",
|
|
155
155
|
text: `Error: ${error.message}. Please verify that the project identifier "${args.project_identifier}" and test case identifier "${args.test_case_identifier}" are correct.`,
|
|
156
|
-
isError: true,
|
|
157
156
|
},
|
|
158
157
|
],
|
|
159
158
|
isError: true,
|
|
@@ -8,21 +8,7 @@ export declare const CreateProjFoldSchema: z.ZodObject<{
|
|
|
8
8
|
folder_name: z.ZodOptional<z.ZodString>;
|
|
9
9
|
folder_description: z.ZodOptional<z.ZodString>;
|
|
10
10
|
parent_id: z.ZodOptional<z.ZodNumber>;
|
|
11
|
-
},
|
|
12
|
-
project_name?: string | undefined;
|
|
13
|
-
project_description?: string | undefined;
|
|
14
|
-
project_identifier?: string | undefined;
|
|
15
|
-
folder_name?: string | undefined;
|
|
16
|
-
folder_description?: string | undefined;
|
|
17
|
-
parent_id?: number | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
project_name?: string | undefined;
|
|
20
|
-
project_description?: string | undefined;
|
|
21
|
-
project_identifier?: string | undefined;
|
|
22
|
-
folder_name?: string | undefined;
|
|
23
|
-
folder_description?: string | undefined;
|
|
24
|
-
parent_id?: number | undefined;
|
|
25
|
-
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
26
12
|
type CreateProjFoldArgs = z.infer<typeof CreateProjFoldSchema>;
|
|
27
13
|
/**
|
|
28
14
|
* Creates a project and/or folder in BrowserStack Test Management.
|
|
@@ -61,66 +61,16 @@ export declare const CreateTestCaseSchema: z.ZodObject<{
|
|
|
61
61
|
test_case_steps: z.ZodArray<z.ZodObject<{
|
|
62
62
|
step: z.ZodString;
|
|
63
63
|
result: z.ZodString;
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
result: string;
|
|
67
|
-
}, {
|
|
68
|
-
step: string;
|
|
69
|
-
result: string;
|
|
70
|
-
}>, "many">;
|
|
71
|
-
issues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
72
66
|
issue_tracker: z.ZodOptional<z.ZodObject<{
|
|
73
67
|
name: z.ZodString;
|
|
74
68
|
host: z.ZodString;
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
host: string;
|
|
78
|
-
}, {
|
|
79
|
-
name: string;
|
|
80
|
-
host: string;
|
|
81
|
-
}>>;
|
|
82
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
83
71
|
custom_fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
84
72
|
automation_status: z.ZodOptional<z.ZodString>;
|
|
85
|
-
},
|
|
86
|
-
name: string;
|
|
87
|
-
test_case_steps: {
|
|
88
|
-
step: string;
|
|
89
|
-
result: string;
|
|
90
|
-
}[];
|
|
91
|
-
project_identifier: string;
|
|
92
|
-
folder_id: string;
|
|
93
|
-
issues?: string[] | undefined;
|
|
94
|
-
description?: string | undefined;
|
|
95
|
-
automation_status?: string | undefined;
|
|
96
|
-
tags?: string[] | undefined;
|
|
97
|
-
custom_fields?: Record<string, string> | undefined;
|
|
98
|
-
preconditions?: string | undefined;
|
|
99
|
-
owner?: string | undefined;
|
|
100
|
-
issue_tracker?: {
|
|
101
|
-
name: string;
|
|
102
|
-
host: string;
|
|
103
|
-
} | undefined;
|
|
104
|
-
}, {
|
|
105
|
-
name: string;
|
|
106
|
-
test_case_steps: {
|
|
107
|
-
step: string;
|
|
108
|
-
result: string;
|
|
109
|
-
}[];
|
|
110
|
-
project_identifier: string;
|
|
111
|
-
folder_id: string;
|
|
112
|
-
issues?: string[] | undefined;
|
|
113
|
-
description?: string | undefined;
|
|
114
|
-
automation_status?: string | undefined;
|
|
115
|
-
tags?: string[] | undefined;
|
|
116
|
-
custom_fields?: Record<string, string> | undefined;
|
|
117
|
-
preconditions?: string | undefined;
|
|
118
|
-
owner?: string | undefined;
|
|
119
|
-
issue_tracker?: {
|
|
120
|
-
name: string;
|
|
121
|
-
host: string;
|
|
122
|
-
} | undefined;
|
|
123
|
-
}>;
|
|
73
|
+
}, z.core.$strip>;
|
|
124
74
|
export declare function sanitizeArgs(args: any): any;
|
|
125
75
|
export declare function createTestCase(params: TestCaseCreateRequest, config: BrowserStackConfig): Promise<CallToolResult>;
|
|
126
76
|
export {};
|
|
@@ -9,72 +9,23 @@ export declare const CreateTestRunSchema: z.ZodObject<{
|
|
|
9
9
|
test_run: z.ZodObject<{
|
|
10
10
|
name: z.ZodString;
|
|
11
11
|
description: z.ZodOptional<z.ZodString>;
|
|
12
|
-
run_state: z.ZodOptional<z.ZodEnum<
|
|
13
|
-
|
|
12
|
+
run_state: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
done: "done";
|
|
14
|
+
new_run: "new_run";
|
|
15
|
+
in_progress: "in_progress";
|
|
16
|
+
under_review: "under_review";
|
|
17
|
+
rejected: "rejected";
|
|
18
|
+
closed: "closed";
|
|
19
|
+
}>>;
|
|
20
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
21
|
issue_tracker: z.ZodOptional<z.ZodObject<{
|
|
15
22
|
name: z.ZodString;
|
|
16
23
|
host: z.ZodString;
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
host: string;
|
|
23
|
-
}>>;
|
|
24
|
-
test_cases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
25
|
-
folder_ids: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
name: string;
|
|
28
|
-
issues?: string[] | undefined;
|
|
29
|
-
description?: string | undefined;
|
|
30
|
-
issue_tracker?: {
|
|
31
|
-
name: string;
|
|
32
|
-
host: string;
|
|
33
|
-
} | undefined;
|
|
34
|
-
test_cases?: string[] | undefined;
|
|
35
|
-
run_state?: "done" | "new_run" | "in_progress" | "under_review" | "rejected" | "closed" | undefined;
|
|
36
|
-
folder_ids?: number[] | undefined;
|
|
37
|
-
}, {
|
|
38
|
-
name: string;
|
|
39
|
-
issues?: string[] | undefined;
|
|
40
|
-
description?: string | undefined;
|
|
41
|
-
issue_tracker?: {
|
|
42
|
-
name: string;
|
|
43
|
-
host: string;
|
|
44
|
-
} | undefined;
|
|
45
|
-
test_cases?: string[] | undefined;
|
|
46
|
-
run_state?: "done" | "new_run" | "in_progress" | "under_review" | "rejected" | "closed" | undefined;
|
|
47
|
-
folder_ids?: number[] | undefined;
|
|
48
|
-
}>;
|
|
49
|
-
}, "strip", z.ZodTypeAny, {
|
|
50
|
-
project_identifier: string;
|
|
51
|
-
test_run: {
|
|
52
|
-
name: string;
|
|
53
|
-
issues?: string[] | undefined;
|
|
54
|
-
description?: string | undefined;
|
|
55
|
-
issue_tracker?: {
|
|
56
|
-
name: string;
|
|
57
|
-
host: string;
|
|
58
|
-
} | undefined;
|
|
59
|
-
test_cases?: string[] | undefined;
|
|
60
|
-
run_state?: "done" | "new_run" | "in_progress" | "under_review" | "rejected" | "closed" | undefined;
|
|
61
|
-
folder_ids?: number[] | undefined;
|
|
62
|
-
};
|
|
63
|
-
}, {
|
|
64
|
-
project_identifier: string;
|
|
65
|
-
test_run: {
|
|
66
|
-
name: string;
|
|
67
|
-
issues?: string[] | undefined;
|
|
68
|
-
description?: string | undefined;
|
|
69
|
-
issue_tracker?: {
|
|
70
|
-
name: string;
|
|
71
|
-
host: string;
|
|
72
|
-
} | undefined;
|
|
73
|
-
test_cases?: string[] | undefined;
|
|
74
|
-
run_state?: "done" | "new_run" | "in_progress" | "under_review" | "rejected" | "closed" | undefined;
|
|
75
|
-
folder_ids?: number[] | undefined;
|
|
76
|
-
};
|
|
77
|
-
}>;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
test_cases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
26
|
+
folder_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
}, z.core.$strip>;
|
|
78
29
|
export type CreateTestRunArgs = z.infer<typeof CreateTestRunSchema>;
|
|
79
30
|
/**
|
|
80
31
|
* Creates a test run via BrowserStack Test Management API.
|
|
@@ -10,19 +10,7 @@ export declare const ListTestCasesSchema: z.ZodObject<{
|
|
|
10
10
|
case_type: z.ZodOptional<z.ZodString>;
|
|
11
11
|
priority: z.ZodOptional<z.ZodString>;
|
|
12
12
|
p: z.ZodOptional<z.ZodNumber>;
|
|
13
|
-
},
|
|
14
|
-
project_identifier: string;
|
|
15
|
-
priority?: string | undefined;
|
|
16
|
-
case_type?: string | undefined;
|
|
17
|
-
folder_id?: string | undefined;
|
|
18
|
-
p?: number | undefined;
|
|
19
|
-
}, {
|
|
20
|
-
project_identifier: string;
|
|
21
|
-
priority?: string | undefined;
|
|
22
|
-
case_type?: string | undefined;
|
|
23
|
-
folder_id?: string | undefined;
|
|
24
|
-
p?: number | undefined;
|
|
25
|
-
}>;
|
|
13
|
+
}, z.core.$strip>;
|
|
26
14
|
export type ListTestCasesArgs = z.infer<typeof ListTestCasesSchema>;
|
|
27
15
|
/**
|
|
28
16
|
* Calls BrowserStack Test Management to list test cases with filters.
|
|
@@ -7,13 +7,7 @@ import { BrowserStackConfig } from "../../lib/types.js";
|
|
|
7
7
|
export declare const ListTestRunsSchema: z.ZodObject<{
|
|
8
8
|
project_identifier: z.ZodString;
|
|
9
9
|
run_state: z.ZodOptional<z.ZodString>;
|
|
10
|
-
},
|
|
11
|
-
project_identifier: string;
|
|
12
|
-
run_state?: string | undefined;
|
|
13
|
-
}, {
|
|
14
|
-
project_identifier: string;
|
|
15
|
-
run_state?: string | undefined;
|
|
16
|
-
}>;
|
|
10
|
+
}, z.core.$strip>;
|
|
17
11
|
type ListTestRunsArgs = z.infer<typeof ListTestRunsSchema>;
|
|
18
12
|
/**
|
|
19
13
|
* Fetches and formats the list of test runs for a project.
|
|
@@ -21,34 +21,8 @@ export declare const UpdateTestCaseSchema: z.ZodObject<{
|
|
|
21
21
|
test_case_steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
22
22
|
step: z.ZodString;
|
|
23
23
|
result: z.ZodString;
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
result: string;
|
|
27
|
-
}, {
|
|
28
|
-
step: string;
|
|
29
|
-
result: string;
|
|
30
|
-
}>, "many">>;
|
|
31
|
-
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
project_identifier: string;
|
|
33
|
-
test_case_identifier: string;
|
|
34
|
-
name?: string | undefined;
|
|
35
|
-
description?: string | undefined;
|
|
36
|
-
test_case_steps?: {
|
|
37
|
-
step: string;
|
|
38
|
-
result: string;
|
|
39
|
-
}[] | undefined;
|
|
40
|
-
preconditions?: string | undefined;
|
|
41
|
-
}, {
|
|
42
|
-
project_identifier: string;
|
|
43
|
-
test_case_identifier: string;
|
|
44
|
-
name?: string | undefined;
|
|
45
|
-
description?: string | undefined;
|
|
46
|
-
test_case_steps?: {
|
|
47
|
-
step: string;
|
|
48
|
-
result: string;
|
|
49
|
-
}[] | undefined;
|
|
50
|
-
preconditions?: string | undefined;
|
|
51
|
-
}>;
|
|
24
|
+
}, z.core.$strip>>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
52
26
|
/**
|
|
53
27
|
* Updates an existing test case in BrowserStack Test Management.
|
|
54
28
|
*/
|
|
@@ -67,7 +67,6 @@ export async function updateTestCase(params, config) {
|
|
|
67
67
|
{
|
|
68
68
|
type: "text",
|
|
69
69
|
text: `Failed to update test case: ${JSON.stringify(response.data)}`,
|
|
70
|
-
isError: true,
|
|
71
70
|
},
|
|
72
71
|
],
|
|
73
72
|
isError: true,
|
|
@@ -107,9 +106,8 @@ The test case has been updated successfully and is now available in your Browser
|
|
|
107
106
|
{
|
|
108
107
|
type: "text",
|
|
109
108
|
text: `Test case not found. Please verify the project_identifier ("${params.project_identifier}") and test_case_identifier ("${params.test_case_identifier}") are correct. Make sure to use actual values, not placeholders like "your_project_id".
|
|
110
|
-
|
|
109
|
+
|
|
111
110
|
Error details: ${JSON.stringify(err.response?.data || err.message)}`,
|
|
112
|
-
isError: true,
|
|
113
111
|
},
|
|
114
112
|
],
|
|
115
113
|
isError: true,
|
|
@@ -121,7 +119,6 @@ Error details: ${JSON.stringify(err.response?.data || err.message)}`,
|
|
|
121
119
|
{
|
|
122
120
|
type: "text",
|
|
123
121
|
text: "Access denied. You don't have permission to update this test case.",
|
|
124
|
-
isError: true,
|
|
125
122
|
},
|
|
126
123
|
],
|
|
127
124
|
isError: true,
|
|
@@ -133,7 +130,6 @@ Error details: ${JSON.stringify(err.response?.data || err.message)}`,
|
|
|
133
130
|
{
|
|
134
131
|
type: "text",
|
|
135
132
|
text: `Failed to update test case: ${errorMessage}. Please verify your credentials and try again.`,
|
|
136
|
-
isError: true,
|
|
137
133
|
},
|
|
138
134
|
],
|
|
139
135
|
isError: true,
|
|
@@ -9,29 +9,16 @@ export declare const UpdateTestRunSchema: z.ZodObject<{
|
|
|
9
9
|
test_run_id: z.ZodString;
|
|
10
10
|
test_run: z.ZodObject<{
|
|
11
11
|
name: z.ZodOptional<z.ZodString>;
|
|
12
|
-
run_state: z.ZodOptional<z.ZodEnum<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
test_run: {
|
|
23
|
-
name?: string | undefined;
|
|
24
|
-
run_state?: "done" | "new_run" | "in_progress" | "under_review" | "rejected" | "closed" | undefined;
|
|
25
|
-
};
|
|
26
|
-
test_run_id: string;
|
|
27
|
-
}, {
|
|
28
|
-
project_identifier: string;
|
|
29
|
-
test_run: {
|
|
30
|
-
name?: string | undefined;
|
|
31
|
-
run_state?: "done" | "new_run" | "in_progress" | "under_review" | "rejected" | "closed" | undefined;
|
|
32
|
-
};
|
|
33
|
-
test_run_id: string;
|
|
34
|
-
}>;
|
|
12
|
+
run_state: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
done: "done";
|
|
14
|
+
new_run: "new_run";
|
|
15
|
+
in_progress: "in_progress";
|
|
16
|
+
under_review: "under_review";
|
|
17
|
+
rejected: "rejected";
|
|
18
|
+
closed: "closed";
|
|
19
|
+
}>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
}, z.core.$strip>;
|
|
35
22
|
type UpdateTestRunArgs = z.infer<typeof UpdateTestRunSchema>;
|
|
36
23
|
/**
|
|
37
24
|
* Partially updates an existing test run.
|
|
@@ -7,13 +7,7 @@ import { BrowserStackConfig } from "../../lib/types.js";
|
|
|
7
7
|
export declare const UploadFileSchema: z.ZodObject<{
|
|
8
8
|
project_identifier: z.ZodString;
|
|
9
9
|
file_path: z.ZodString;
|
|
10
|
-
},
|
|
11
|
-
project_identifier: string;
|
|
12
|
-
file_path: string;
|
|
13
|
-
}, {
|
|
14
|
-
project_identifier: string;
|
|
15
|
-
file_path: string;
|
|
16
|
-
}>;
|
|
10
|
+
}, z.core.$strip>;
|
|
17
11
|
/**
|
|
18
12
|
* Uploads a file to BrowserStack Test Management and returns the signed URL.
|
|
19
13
|
*/
|
|
@@ -32,7 +32,6 @@ export async function uploadFile(args, config) {
|
|
|
32
32
|
{
|
|
33
33
|
type: "text",
|
|
34
34
|
text: `File ${file_path} does not exist.`,
|
|
35
|
-
isError: true,
|
|
36
35
|
},
|
|
37
36
|
],
|
|
38
37
|
isError: true,
|
|
@@ -96,7 +95,6 @@ export async function uploadFile(args, config) {
|
|
|
96
95
|
{
|
|
97
96
|
type: "text",
|
|
98
97
|
text: `Failed to upload file: ${error instanceof Error ? error.message : "Unknown error"}. Please check your credentials and try again.`,
|
|
99
|
-
isError: true,
|
|
100
98
|
},
|
|
101
99
|
],
|
|
102
100
|
isError: true,
|
|
@@ -29,7 +29,6 @@ export async function createProjectOrFolderTool(args, config, server) {
|
|
|
29
29
|
{
|
|
30
30
|
type: "text",
|
|
31
31
|
text: `Failed to create project/folder: ${err instanceof Error ? err.message : "Unknown error"}. Please open an issue on GitHub if the problem persists`,
|
|
32
|
-
isError: true,
|
|
33
32
|
},
|
|
34
33
|
],
|
|
35
34
|
isError: true,
|
|
@@ -54,7 +53,6 @@ export async function createTestCaseTool(args, config, server) {
|
|
|
54
53
|
{
|
|
55
54
|
type: "text",
|
|
56
55
|
text: `Failed to create test case: ${err instanceof Error ? err.message : "Unknown error"}. Please open an issue on GitHub if the problem persists`,
|
|
57
|
-
isError: true,
|
|
58
56
|
},
|
|
59
57
|
],
|
|
60
58
|
isError: true,
|
|
@@ -77,7 +75,6 @@ export async function updateTestCaseTool(args, config, server) {
|
|
|
77
75
|
{
|
|
78
76
|
type: "text",
|
|
79
77
|
text: `Failed to update test case: ${err instanceof Error ? err.message : "Unknown error"}. Please open an issue on GitHub if the problem persists`,
|
|
80
|
-
isError: true,
|
|
81
78
|
},
|
|
82
79
|
],
|
|
83
80
|
isError: true,
|
|
@@ -99,7 +96,6 @@ export async function listTestCasesTool(args, config, server) {
|
|
|
99
96
|
{
|
|
100
97
|
type: "text",
|
|
101
98
|
text: `Failed to list test cases: ${err instanceof Error ? err.message : "Unknown error"}. Please open an issue on GitHub if the problem persists`,
|
|
102
|
-
isError: true,
|
|
103
99
|
},
|
|
104
100
|
],
|
|
105
101
|
isError: true,
|
|
@@ -121,7 +117,6 @@ export async function createTestRunTool(args, config, server) {
|
|
|
121
117
|
{
|
|
122
118
|
type: "text",
|
|
123
119
|
text: `Failed to create test run: ${err instanceof Error ? err.message : "Unknown error"}. Please open an issue on GitHub if the problem persists`,
|
|
124
|
-
isError: true,
|
|
125
120
|
},
|
|
126
121
|
],
|
|
127
122
|
isError: true,
|
|
@@ -143,7 +138,6 @@ export async function listTestRunsTool(args, config, server) {
|
|
|
143
138
|
{
|
|
144
139
|
type: "text",
|
|
145
140
|
text: `Failed to list test runs: ${err instanceof Error ? err.message : "Unknown error"}. Please open an issue on GitHub if the problem persists`,
|
|
146
|
-
isError: true,
|
|
147
141
|
},
|
|
148
142
|
],
|
|
149
143
|
isError: true,
|
|
@@ -167,7 +161,6 @@ export async function updateTestRunTool(args, config, server) {
|
|
|
167
161
|
{
|
|
168
162
|
type: "text",
|
|
169
163
|
text: `Failed to update test run: ${err instanceof Error ? err.message : "Unknown error"}. Please open an issue on GitHub if the problem persists`,
|
|
170
|
-
isError: true,
|
|
171
164
|
},
|
|
172
165
|
],
|
|
173
166
|
isError: true,
|
|
@@ -189,7 +182,6 @@ export async function addTestResultTool(args, config, server) {
|
|
|
189
182
|
{
|
|
190
183
|
type: "text",
|
|
191
184
|
text: `Failed to add test result: ${err instanceof Error ? err.message : "Unknown error"}. Please open an issue on GitHub if the problem persists`,
|
|
192
|
-
isError: true,
|
|
193
185
|
},
|
|
194
186
|
],
|
|
195
187
|
isError: true,
|
|
@@ -211,7 +203,6 @@ export async function uploadProductRequirementFileTool(args, config, server) {
|
|
|
211
203
|
{
|
|
212
204
|
type: "text",
|
|
213
205
|
text: `Failed to upload file: ${err instanceof Error ? err.message : "Unknown error"}. Please open an issue on GitHub if the problem persists`,
|
|
214
|
-
isError: true,
|
|
215
206
|
},
|
|
216
207
|
],
|
|
217
208
|
isError: true,
|
|
@@ -233,7 +224,6 @@ export async function createTestCasesFromFileTool(args, context, config, server)
|
|
|
233
224
|
{
|
|
234
225
|
type: "text",
|
|
235
226
|
text: `Failed to create test cases from file: ${err instanceof Error ? err.message : "Unknown error"}. Please open an issue on GitHub if the problem persists`,
|
|
236
|
-
isError: true,
|
|
237
227
|
},
|
|
238
228
|
],
|
|
239
229
|
isError: true,
|
|
@@ -255,7 +245,6 @@ export async function createLCAStepsTool(args, context, config, server) {
|
|
|
255
245
|
{
|
|
256
246
|
type: "text",
|
|
257
247
|
text: `Failed to create LCA steps: ${err instanceof Error ? err.message : "Unknown error"}. Please open an issue on GitHub if the problem persists`,
|
|
258
|
-
isError: true,
|
|
259
248
|
},
|
|
260
249
|
],
|
|
261
250
|
isError: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@browserstack/mcp-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.9-beta.1",
|
|
4
4
|
"description": "BrowserStack's Official MCP Server",
|
|
5
5
|
"mcpName": "io.github.browserstack/mcp-server",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,31 +35,31 @@
|
|
|
35
35
|
"author": "",
|
|
36
36
|
"license": "ISC",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
38
|
+
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
39
39
|
"@types/form-data": "^2.5.2",
|
|
40
|
-
"axios": "^1.
|
|
41
|
-
"browserstack-local": "^1.5.
|
|
42
|
-
"csv-parse": "^
|
|
43
|
-
"dotenv": "^
|
|
44
|
-
"form-data": "^4.0.
|
|
45
|
-
"pino": "^
|
|
46
|
-
"pino-pretty": "^13.
|
|
47
|
-
"sharp": "^0.34.
|
|
48
|
-
"uuid": "^
|
|
49
|
-
"webdriverio": "^9.
|
|
50
|
-
"zod": "^
|
|
40
|
+
"axios": "^1.13.2",
|
|
41
|
+
"browserstack-local": "^1.5.8",
|
|
42
|
+
"csv-parse": "^6.1.0",
|
|
43
|
+
"dotenv": "^17.2.3",
|
|
44
|
+
"form-data": "^4.0.5",
|
|
45
|
+
"pino": "^10.1.0",
|
|
46
|
+
"pino-pretty": "^13.1.3",
|
|
47
|
+
"sharp": "^0.34.5",
|
|
48
|
+
"uuid": "^13.0.0",
|
|
49
|
+
"webdriverio": "^9.21.0",
|
|
50
|
+
"zod": "^4.2.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@eslint/js": "^9.
|
|
54
|
-
"@types/csv-parse": "^1.
|
|
55
|
-
"@types/node": "^
|
|
56
|
-
"@types/uuid": "^
|
|
57
|
-
"eslint": "^9.
|
|
58
|
-
"prettier": "^3.
|
|
59
|
-
"tsx": "^4.
|
|
60
|
-
"typescript": "^5.
|
|
61
|
-
"typescript-eslint": "^8.
|
|
62
|
-
"vite": "^
|
|
63
|
-
"vitest": "^
|
|
53
|
+
"@eslint/js": "^9.39.2",
|
|
54
|
+
"@types/csv-parse": "^1.2.5",
|
|
55
|
+
"@types/node": "^25.0.3",
|
|
56
|
+
"@types/uuid": "^11.0.0",
|
|
57
|
+
"eslint": "^9.39.2",
|
|
58
|
+
"prettier": "^3.7.4",
|
|
59
|
+
"tsx": "^4.21.0",
|
|
60
|
+
"typescript": "^5.9.3",
|
|
61
|
+
"typescript-eslint": "^8.50.0",
|
|
62
|
+
"vite": "^7.3.0",
|
|
63
|
+
"vitest": "^4.0.16"
|
|
64
64
|
}
|
|
65
65
|
}
|