|
9 | 9 | createTestCase as createTestCaseAPI,
|
10 | 10 | TestCaseCreateRequest,
|
11 | 11 | sanitizeArgs,
|
| 12 | + CreateTestCaseSchema, |
12 | 13 | } from "./testmanagement-utils/create-testcase";
|
13 | 14 |
|
14 | 15 | /**
|
@@ -88,74 +89,7 @@ export default function addTestManagementTools(server: McpServer) {
|
88 | 89 | server.tool(
|
89 | 90 | "createTestCase",
|
90 | 91 | "Use this tool to create a test case in BrowserStack Test Management.",
|
91 |
| - { |
92 |
| - project_identifier: z |
93 |
| - .string() |
94 |
| - .describe( |
95 |
| - "The ID of the BrowserStack project in which to create the test case. Ask User if he want to create a new project if no project ID is provided using createProjectOrFolder tool.", |
96 |
| - ), |
97 |
| - folder_id: z |
98 |
| - .string() |
99 |
| - .describe( |
100 |
| - "The ID of the folder under the project to create the test case in. If omitted, Ask user if he wants to create a new folder createProjectOrFolder tool.", |
101 |
| - ), |
102 |
| - name: z.string().describe("Name of the test case."), |
103 |
| - description: z |
104 |
| - .string() |
105 |
| - .optional() |
106 |
| - .nullish() |
107 |
| - .describe("Brief description of the test case."), |
108 |
| - owner: z |
109 |
| - .string() |
110 |
| - .email() |
111 |
| - .describe("Email of the test case owner.") |
112 |
| - .optional() |
113 |
| - .nullish(), |
114 |
| - preconditions: z |
115 |
| - .string() |
116 |
| - .optional() |
117 |
| - .nullish() |
118 |
| - .describe("Any preconditions (HTML allowed)."), |
119 |
| - test_case_steps: z |
120 |
| - .array( |
121 |
| - z.object({ |
122 |
| - step: z.string().describe("Action to perform in this step."), |
123 |
| - result: z.string().describe("Expected result of this step."), |
124 |
| - }), |
125 |
| - ) |
126 |
| - .describe("List of steps and expected results."), |
127 |
| - issues: z |
128 |
| - .array(z.string()) |
129 |
| - .optional() |
130 |
| - .describe( |
131 |
| - "List of the linked Jira, Asana or Azure issues ID's. This should be strictly in array format not the string of json.", |
132 |
| - ), |
133 |
| - issue_tracker: z |
134 |
| - .object({ |
135 |
| - name: z |
136 |
| - .string() |
137 |
| - .nullish() |
138 |
| - .describe( |
139 |
| - "Issue tracker name, For example, use jira for Jira, azure for Azure DevOps, or asana for Asana ", |
140 |
| - ), |
141 |
| - host: z |
142 |
| - .string() |
143 |
| - .url() |
144 |
| - .describe("Base URL of the issue tracker.") |
145 |
| - .nullish(), |
146 |
| - }) |
147 |
| - .optional(), |
148 |
| - tags: z |
149 |
| - .array(z.string()) |
150 |
| - .optional() |
151 |
| - .describe( |
152 |
| - "Tags to attach to the test case. This should be strictly in array format not the string of json", |
153 |
| - ), |
154 |
| - custom_fields: z |
155 |
| - .record(z.string(), z.string()) |
156 |
| - .optional() |
157 |
| - .describe("Map of custom field names to values."), |
158 |
| - }, |
| 92 | + CreateTestCaseSchema.shape, |
159 | 93 | async (args) => {
|
160 | 94 | return createTestCaseTool(args as TestCaseCreateRequest);
|
161 | 95 | },
|
|
0 commit comments