@smartbear/mcp 0.12.0 → 0.13.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 +30 -6
- package/dist/bugsnag/client/api/CurrentUser.js +50 -26
- package/dist/bugsnag/client/api/Error.js +158 -57
- package/dist/bugsnag/client/api/Project.js +398 -243
- package/dist/bugsnag/client/api/api.js +4087 -3837
- package/dist/bugsnag/client/api/base.js +155 -173
- package/dist/bugsnag/client/api/configuration.js +28 -25
- package/dist/bugsnag/client/filters.js +11 -20
- package/dist/bugsnag/client.js +1398 -1277
- package/dist/bugsnag/input-schemas.js +39 -57
- package/dist/collaborator/client.js +335 -371
- package/dist/common/bugsnag.js +5 -3
- package/dist/common/cache.js +50 -57
- package/dist/common/client-registry.js +106 -119
- package/dist/common/info.js +7 -3
- package/dist/common/register-clients.js +0 -16
- package/dist/common/server.js +270 -228
- package/dist/common/tools.js +19 -0
- package/dist/common/transport-http.js +252 -343
- package/dist/common/transport-stdio.js +40 -37
- package/dist/common/zod-utils.js +20 -0
- package/dist/index.js +18 -23
- package/dist/package.json.js +11 -0
- package/dist/pactflow/client/ai.js +142 -169
- package/dist/pactflow/client/base.js +41 -51
- package/dist/pactflow/client/prompt-utils.js +93 -84
- package/dist/pactflow/client/prompts.js +95 -92
- package/dist/pactflow/client/tools.js +94 -83
- package/dist/pactflow/client/utils.js +60 -64
- package/dist/pactflow/client.js +399 -320
- package/dist/qmetry/client/api/client-api.js +43 -41
- package/dist/qmetry/client/api/error-handler.js +264 -310
- package/dist/qmetry/client/auto-resolve.js +78 -99
- package/dist/qmetry/client/automation.js +139 -162
- package/dist/qmetry/client/handlers.js +49 -46
- package/dist/qmetry/client/issues.js +133 -115
- package/dist/qmetry/client/project.js +153 -174
- package/dist/qmetry/client/requirement.js +82 -70
- package/dist/qmetry/client/testcase.js +240 -208
- package/dist/qmetry/client/testsuite.js +332 -293
- package/dist/qmetry/client/tools/automation-tools.js +291 -288
- package/dist/qmetry/client/tools/index.js +16 -13
- package/dist/qmetry/client/tools/issue-tools.js +534 -543
- package/dist/qmetry/client/tools/project-tools.js +635 -656
- package/dist/qmetry/client/tools/requirement-tools.js +525 -528
- package/dist/qmetry/client/tools/testcase-tools.js +773 -786
- package/dist/qmetry/client/tools/testsuite-tools.js +1069 -1083
- package/dist/qmetry/client/utils.js +8 -14
- package/dist/qmetry/client.js +111 -109
- package/dist/qmetry/config/constants.js +48 -44
- package/dist/qmetry/config/rest-endpoints.js +51 -48
- package/dist/qmetry/types/automation.js +7 -7
- package/dist/qmetry/types/common.js +763 -1049
- package/dist/qmetry/types/issues.js +26 -19
- package/dist/qmetry/types/project.js +32 -25
- package/dist/qmetry/types/requirements.js +26 -21
- package/dist/qmetry/types/testcase.js +55 -44
- package/dist/qmetry/types/testsuite.js +66 -52
- package/dist/reflect/client.js +284 -226
- package/dist/swagger/client/api.js +645 -662
- package/dist/swagger/client/configuration.js +31 -33
- package/dist/swagger/client/portal-types.js +204 -244
- package/dist/swagger/client/registry-types.js +62 -96
- package/dist/swagger/client/tools.js +148 -158
- package/dist/swagger/client/user-management-types.js +11 -22
- package/dist/swagger/client.js +143 -135
- package/dist/swagger/config-utils.js +10 -16
- package/dist/zephyr/client.js +43 -42
- package/dist/zephyr/common/api-client.js +35 -30
- package/dist/zephyr/common/auth-service.js +16 -13
- package/dist/zephyr/common/rest-api-schemas.js +3173 -5146
- package/dist/zephyr/tool/environment/get-environments.js +66 -66
- package/dist/zephyr/tool/priority/get-priorities.js +41 -41
- package/dist/zephyr/tool/project/get-project.js +37 -37
- package/dist/zephyr/tool/project/get-projects.js +46 -46
- package/dist/zephyr/tool/status/get-statuses.js +47 -47
- package/dist/zephyr/tool/test-case/get-test-case.js +37 -37
- package/dist/zephyr/tool/test-case/get-test-cases.js +62 -62
- package/dist/zephyr/tool/test-cycle/get-test-cycle.js +37 -37
- package/dist/zephyr/tool/test-cycle/get-test-cycles.js +70 -70
- package/dist/zephyr/tool/test-execution/get-test-execution.js +37 -37
- package/dist/zephyr/tool/test-execution/get-test-executions.js +43 -43
- package/package.json +5 -5
- package/dist/bugsnag/client/api/index.js +0 -6
- package/dist/common/types.js +0 -6
- package/dist/qmetry/client/tools/types.js +0 -1
- package/dist/swagger/client/index.js +0 -6
- package/dist/tests/unit/bugsnag/utils/factories.js +0 -86
- package/dist/zephyr/tool/zephyr-tool.js +0 -1
|
@@ -1,1059 +1,773 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { QMETRY_DEFAULTS } from "../config/constants.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const DEFAULT_PAGINATION = {
|
|
4
|
+
start: 0,
|
|
5
|
+
page: 1,
|
|
6
|
+
limit: 10
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const DEFAULT_FILTER = {
|
|
9
|
+
filter: "[]"
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const DEFAULT_SORT = {
|
|
12
|
+
sort: '[{"property":"name","direction":"ASC"}]'
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
const DEFAULT_FOLDER_OPTIONS = {
|
|
15
|
+
scope: "project",
|
|
16
|
+
showRootOnly: false,
|
|
17
|
+
getSubEntities: true,
|
|
18
|
+
hideEmptyFolders: false,
|
|
19
|
+
folderSortColumn: "name",
|
|
20
|
+
folderSortOrder: "ASC",
|
|
21
|
+
restoreDefaultColumns: false,
|
|
22
|
+
folderID: null
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"HPUFT",
|
|
32
|
-
"QAF",
|
|
33
|
-
"ROBOT",
|
|
24
|
+
const EntityTypeEnum = z.enum([
|
|
25
|
+
"TESTNG",
|
|
26
|
+
"CUCUMBER",
|
|
27
|
+
"JUNIT",
|
|
28
|
+
"HPUFT",
|
|
29
|
+
"QAF",
|
|
30
|
+
"ROBOT"
|
|
34
31
|
]);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
.default(""),
|
|
126
|
-
tcFolderPath: z
|
|
127
|
-
.string()
|
|
128
|
-
.optional()
|
|
129
|
-
.describe("Folder path for test cases - SYSTEM AUTOMATICALLY SETS TO ROOT. " +
|
|
130
|
-
'Leave empty unless you want specific folder. System will automatically use empty string "" (root directory). ' +
|
|
131
|
-
'Only specify if user wants specific folder like "Automation/Regression".')
|
|
132
|
-
.default(""),
|
|
133
|
-
tsFolderPath: z
|
|
134
|
-
.string()
|
|
135
|
-
.optional()
|
|
136
|
-
.describe("Folder path for test suites - SYSTEM AUTOMATICALLY SETS TO ROOT. " +
|
|
137
|
-
'Leave empty unless you want specific folder. System will automatically use empty string "" (root directory). ' +
|
|
138
|
-
'Only specify if user wants specific folder like "Automation/Regression".')
|
|
139
|
-
.default(""),
|
|
140
|
-
folderID: z
|
|
141
|
-
.number()
|
|
142
|
-
.optional()
|
|
143
|
-
.describe("Folder ID - unique numeric identifier for the specific folder. " +
|
|
144
|
-
"Use this to target a specific folder within the project hierarchy. " +
|
|
145
|
-
"Applies to any entity type (test cases, requirements, test suites, etc.)."),
|
|
146
|
-
tsFolderID: z
|
|
147
|
-
.number()
|
|
148
|
-
.describe("Test Suite folder ID (required for fetching test suites). " +
|
|
149
|
-
"This is the numeric identifier for the test suite folder. " +
|
|
150
|
-
"IMPORTANT: Get from project info response → rootFolders.TS.id (e.g., 113557 for MAC project). " +
|
|
151
|
-
"Use FETCH_PROJECT_INFO tool first to get this ID if not provided by user. " +
|
|
152
|
-
"For root folder: use rootFolders.TS.id, for sub-folders: use specific folder IDs."),
|
|
153
|
-
tsID: z
|
|
154
|
-
.number()
|
|
155
|
-
.describe("Test Suite numeric ID (required for fetching test cases linked to test suite). " +
|
|
156
|
-
"This is the internal numeric identifier, not the entity key. " +
|
|
157
|
-
"NOTE: To get the tsID - Call API 'Testsuite/Fetch Testsuite' " +
|
|
158
|
-
"From the response, get value of following attribute -> data[<index>].id"),
|
|
159
|
-
gridName: z
|
|
160
|
-
.string()
|
|
161
|
-
.optional()
|
|
162
|
-
.describe("Grid Name to be displayed (default 'TESTEXECUTIONLIST')"),
|
|
163
|
-
teViewId: z
|
|
164
|
-
.number()
|
|
165
|
-
.optional()
|
|
166
|
-
.describe("ViewId for test execution - SYSTEM AUTOMATICALLY RESOLVES THIS. " +
|
|
167
|
-
"Leave empty unless you have a specific viewId. " +
|
|
168
|
-
"System will fetch project info using the projectKey and extract latestViews.TE.viewId automatically. " +
|
|
169
|
-
"Manual viewId only needed if you want to override the automatic resolution."),
|
|
170
|
-
tsfeViewId: z
|
|
171
|
-
.number()
|
|
172
|
-
.describe("ViewId for test suite folders - SYSTEM AUTOMATICALLY RESOLVES THIS. " +
|
|
173
|
-
"Leave empty unless you have a specific viewId. " +
|
|
174
|
-
"System will fetch project info using the projectKey and extract latestViews.TSFS.viewId automatically. " +
|
|
175
|
-
"Manual viewId only needed if you want to override the automatic resolution."),
|
|
176
|
-
tsViewId: z
|
|
177
|
-
.number()
|
|
178
|
-
.describe("ViewId for test suites - SYSTEM AUTOMATICALLY RESOLVES THIS. " +
|
|
179
|
-
"Leave empty unless you have a specific viewId. " +
|
|
180
|
-
"System will fetch project info using the projectKey and extract latestViews.TS.viewId automatically. " +
|
|
181
|
-
"Manual viewId only needed if you want to override the automatic resolution."),
|
|
182
|
-
tsrunID: z
|
|
183
|
-
.string()
|
|
184
|
-
.describe("Test Suite Run ID (required for fetching test case runs). " +
|
|
185
|
-
"This is the string identifier for the test suite run execution. " +
|
|
186
|
-
"NOTE: To get the tsrunID - Call API 'Execution/Fetch Executions' " +
|
|
187
|
-
"From the response, get value of following attribute -> data[<index>].tsRunID"),
|
|
188
|
-
showTcWithDefects: z
|
|
189
|
-
.boolean()
|
|
190
|
-
.optional()
|
|
191
|
-
.describe("Show test case runs with linked defects")
|
|
192
|
-
.default(false),
|
|
193
|
-
entityId: z
|
|
194
|
-
.number()
|
|
195
|
-
.describe("Id of Test case run (required for fetching linked issues). " +
|
|
196
|
-
"This is the internal numeric identifier for the test case run execution. " +
|
|
197
|
-
"NOTE: To get the entityId - Call API 'Execution/Fetch Testcase Run ID' " +
|
|
198
|
-
"From the response, get value of following attribute -> data[<index>].tcRunID"),
|
|
199
|
-
getLinked: z
|
|
200
|
-
.boolean()
|
|
201
|
-
.optional()
|
|
202
|
-
.describe("True to get only those issues that are linked with this Test case Run, " +
|
|
203
|
-
"False to get those issues which are not linked with this Test case Run. " +
|
|
204
|
-
"Default value true (get linked issues).")
|
|
205
|
-
.default(true),
|
|
206
|
-
istcrFlag: z
|
|
207
|
-
.boolean()
|
|
208
|
-
.optional()
|
|
209
|
-
.describe("Set True for test case run operations")
|
|
210
|
-
.default(true),
|
|
211
|
-
scope: z
|
|
212
|
-
.string()
|
|
213
|
-
.optional()
|
|
214
|
-
.describe("Scope of the operation - defines the context for data retrieval. " +
|
|
215
|
-
"Common values: 'project' (default), 'folder', 'release', 'cycle'. " +
|
|
216
|
-
"Applies to any entity type being fetched or operated upon.")
|
|
217
|
-
.default("project"),
|
|
218
|
-
filter: z
|
|
219
|
-
.string()
|
|
220
|
-
.optional()
|
|
221
|
-
.describe("Filter criteria as JSON string (default '[]')")
|
|
222
|
-
.default("[]"),
|
|
223
|
-
udfFilter: z
|
|
224
|
-
.string()
|
|
225
|
-
.optional()
|
|
226
|
-
.describe("User-defined field filter as JSON string (default '[]')")
|
|
227
|
-
.default("[]"),
|
|
228
|
-
showRootOnly: z
|
|
229
|
-
.boolean()
|
|
230
|
-
.optional()
|
|
231
|
-
.describe("Whether to show only root folders."),
|
|
232
|
-
getSubEntities: z
|
|
233
|
-
.boolean()
|
|
234
|
-
.optional()
|
|
235
|
-
.describe("Whether to include sub-entities."),
|
|
236
|
-
getColumns: z
|
|
237
|
-
.boolean()
|
|
238
|
-
.optional()
|
|
239
|
-
.describe("Whether to get column information in response.")
|
|
240
|
-
.default(true),
|
|
241
|
-
hideEmptyFolders: z
|
|
242
|
-
.boolean()
|
|
243
|
-
.optional()
|
|
244
|
-
.describe("Whether to hide empty folders."),
|
|
245
|
-
folderSortColumn: z
|
|
246
|
-
.string()
|
|
247
|
-
.optional()
|
|
248
|
-
.describe("Folder sort column (default 'name')"),
|
|
249
|
-
restoreDefaultColumns: z
|
|
250
|
-
.boolean()
|
|
251
|
-
.optional()
|
|
252
|
-
.describe("Whether to restore default columns (default 'false')"),
|
|
253
|
-
folderSortOrder: z
|
|
254
|
-
.string()
|
|
255
|
-
.optional()
|
|
256
|
-
.describe("Folder sort order (ASC or DESC)"),
|
|
257
|
-
showArchive: z
|
|
258
|
-
.boolean()
|
|
259
|
-
.optional()
|
|
260
|
-
.describe("Whether to include archived records in the results. " +
|
|
261
|
-
"When true, returns both active and archived items. " +
|
|
262
|
-
"When false, returns only active (non-archived) items. " +
|
|
263
|
-
"Applies to any entity type being fetched (test cases, requirements, releases, cycles, builds, platforms, etc.)."),
|
|
32
|
+
const AutomationHierarchyEnum = z.enum(["1", "2", "3"]);
|
|
33
|
+
const SkipWarningEnum = z.enum(["0", "1"]);
|
|
34
|
+
const CommonFields = {
|
|
35
|
+
projectKey: z.string().describe("Project key - unique identifier for the project").default(QMETRY_DEFAULTS.PROJECT_KEY),
|
|
36
|
+
projectKeyOptional: z.string().optional().describe("Project key - unique identifier for the project").default(QMETRY_DEFAULTS.PROJECT_KEY),
|
|
37
|
+
baseUrl: z.string().url().optional().describe("The base URL for the QMetry instance (must be a valid URL)").default(QMETRY_DEFAULTS.BASE_URL),
|
|
38
|
+
start: z.number().optional().describe("Start index for pagination - defaults to 0").default(0),
|
|
39
|
+
page: z.number().optional().describe("Page number to return (starts from 1)").default(1),
|
|
40
|
+
limit: z.number().optional().describe("Number of records (default 10).").default(10),
|
|
41
|
+
tcID: z.number().describe(
|
|
42
|
+
"Test Case numeric ID. This is the internal numeric identifier, not the entity key like 'MAC-TC-1684'. You can get this ID from test case search results or by using filters."
|
|
43
|
+
),
|
|
44
|
+
id: z.number().describe(
|
|
45
|
+
"Test Case numeric ID (required for fetching steps or version details). This is the internal numeric identifier, not the entity key like 'MAC-TC-1684'. You can get this ID from test case search results."
|
|
46
|
+
),
|
|
47
|
+
version: z.number().describe(
|
|
48
|
+
"Test Case version number. This is the internal numeric identifier for the version."
|
|
49
|
+
),
|
|
50
|
+
tcVersionID: z.number().describe(
|
|
51
|
+
"Test Case version number. This is the internal numeric identifier for the version."
|
|
52
|
+
),
|
|
53
|
+
versionOptional: z.number().optional().describe(
|
|
54
|
+
"Test Case version number (optional, defaults to 1). This is the internal numeric identifier for the version."
|
|
55
|
+
),
|
|
56
|
+
rqID: z.number().describe(
|
|
57
|
+
"Requirement numeric ID (required for fetching specific requirement details). This is the internal numeric identifier, not the entity key like 'MAC-RQ-730'. You can get this ID from requirement search results or by using filters."
|
|
58
|
+
),
|
|
59
|
+
rqVersion: z.number().describe(
|
|
60
|
+
"Requirement version number (required for fetching specific requirement version details). This is the internal numeric identifier for the version."
|
|
61
|
+
),
|
|
62
|
+
tcViewId: z.number().describe(
|
|
63
|
+
"ViewId for test cases - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific viewId. System will fetch project info using the projectKey and extract latestViews.TC.viewId automatically. Manual viewId only needed if you want to override the automatic resolution."
|
|
64
|
+
),
|
|
65
|
+
rqViewId: z.number().describe(
|
|
66
|
+
"ViewId for requirements - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific viewId. System will fetch project info using the projectKey and extract latestViews.RQ.viewId automatically. Manual viewId only needed if you want to override the automatic resolution."
|
|
67
|
+
),
|
|
68
|
+
rqFolderPath: z.string().optional().describe(
|
|
69
|
+
'Folder path for requirements - SYSTEM AUTOMATICALLY SETS TO ROOT. Leave empty unless you want specific folder. System will automatically use empty string "" (root directory). Only specify if user wants specific folder like "Automation/Regression".'
|
|
70
|
+
).default(""),
|
|
71
|
+
tcFolderPath: z.string().optional().describe(
|
|
72
|
+
'Folder path for test cases - SYSTEM AUTOMATICALLY SETS TO ROOT. Leave empty unless you want specific folder. System will automatically use empty string "" (root directory). Only specify if user wants specific folder like "Automation/Regression".'
|
|
73
|
+
).default(""),
|
|
74
|
+
tsFolderPath: z.string().optional().describe(
|
|
75
|
+
'Folder path for test suites - SYSTEM AUTOMATICALLY SETS TO ROOT. Leave empty unless you want specific folder. System will automatically use empty string "" (root directory). Only specify if user wants specific folder like "Automation/Regression".'
|
|
76
|
+
).default(""),
|
|
77
|
+
folderID: z.number().optional().describe(
|
|
78
|
+
"Folder ID - unique numeric identifier for the specific folder. Use this to target a specific folder within the project hierarchy. Applies to any entity type (test cases, requirements, test suites, etc.)."
|
|
79
|
+
),
|
|
80
|
+
tsFolderID: z.number().describe(
|
|
81
|
+
"Test Suite folder ID (required for fetching test suites). This is the numeric identifier for the test suite folder. IMPORTANT: Get from project info response → rootFolders.TS.id (e.g., 113557 for MAC project). Use FETCH_PROJECT_INFO tool first to get this ID if not provided by user. For root folder: use rootFolders.TS.id, for sub-folders: use specific folder IDs."
|
|
82
|
+
),
|
|
83
|
+
tsID: z.number().describe(
|
|
84
|
+
"Test Suite numeric ID (required for fetching test cases linked to test suite). This is the internal numeric identifier, not the entity key. NOTE: To get the tsID - Call API 'Testsuite/Fetch Testsuite' From the response, get value of following attribute -> data[<index>].id"
|
|
85
|
+
),
|
|
86
|
+
gridName: z.string().optional().describe("Grid Name to be displayed (default 'TESTEXECUTIONLIST')"),
|
|
87
|
+
teViewId: z.number().optional().describe(
|
|
88
|
+
"ViewId for test execution - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific viewId. System will fetch project info using the projectKey and extract latestViews.TE.viewId automatically. Manual viewId only needed if you want to override the automatic resolution."
|
|
89
|
+
),
|
|
90
|
+
tsfeViewId: z.number().describe(
|
|
91
|
+
"ViewId for test suite folders - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific viewId. System will fetch project info using the projectKey and extract latestViews.TSFS.viewId automatically. Manual viewId only needed if you want to override the automatic resolution."
|
|
92
|
+
),
|
|
93
|
+
tsViewId: z.number().describe(
|
|
94
|
+
"ViewId for test suites - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific viewId. System will fetch project info using the projectKey and extract latestViews.TS.viewId automatically. Manual viewId only needed if you want to override the automatic resolution."
|
|
95
|
+
),
|
|
96
|
+
tsrunID: z.string().describe(
|
|
97
|
+
"Test Suite Run ID (required for fetching test case runs). This is the string identifier for the test suite run execution. NOTE: To get the tsrunID - Call API 'Execution/Fetch Executions' From the response, get value of following attribute -> data[<index>].tsRunID"
|
|
98
|
+
),
|
|
99
|
+
showTcWithDefects: z.boolean().optional().describe("Show test case runs with linked defects").default(false),
|
|
100
|
+
entityId: z.number().describe(
|
|
101
|
+
"Id of Test case run (required for fetching linked issues). This is the internal numeric identifier for the test case run execution. NOTE: To get the entityId - Call API 'Execution/Fetch Testcase Run ID' From the response, get value of following attribute -> data[<index>].tcRunID"
|
|
102
|
+
),
|
|
103
|
+
getLinked: z.boolean().optional().describe(
|
|
104
|
+
"True to get only those issues that are linked with this Test case Run, False to get those issues which are not linked with this Test case Run. Default value true (get linked issues)."
|
|
105
|
+
).default(true),
|
|
106
|
+
istcrFlag: z.boolean().optional().describe("Set True for test case run operations").default(true),
|
|
107
|
+
scope: z.string().optional().describe(
|
|
108
|
+
"Scope of the operation - defines the context for data retrieval. Common values: 'project' (default), 'folder', 'release', 'cycle'. Applies to any entity type being fetched or operated upon."
|
|
109
|
+
).default("project"),
|
|
110
|
+
filter: z.string().optional().describe("Filter criteria as JSON string (default '[]')").default("[]"),
|
|
111
|
+
udfFilter: z.string().optional().describe("User-defined field filter as JSON string (default '[]')").default("[]"),
|
|
112
|
+
showRootOnly: z.boolean().optional().describe("Whether to show only root folders."),
|
|
113
|
+
getSubEntities: z.boolean().optional().describe("Whether to include sub-entities."),
|
|
114
|
+
getColumns: z.boolean().optional().describe("Whether to get column information in response.").default(true),
|
|
115
|
+
hideEmptyFolders: z.boolean().optional().describe("Whether to hide empty folders."),
|
|
116
|
+
folderSortColumn: z.string().optional().describe("Folder sort column (default 'name')"),
|
|
117
|
+
restoreDefaultColumns: z.boolean().optional().describe("Whether to restore default columns (default 'false')"),
|
|
118
|
+
folderSortOrder: z.string().optional().describe("Folder sort order (ASC or DESC)"),
|
|
119
|
+
showArchive: z.boolean().optional().describe(
|
|
120
|
+
"Whether to include archived records in the results. When true, returns both active and archived items. When false, returns only active (non-archived) items. Applies to any entity type being fetched (test cases, requirements, releases, cycles, builds, platforms, etc.)."
|
|
121
|
+
)
|
|
264
122
|
};
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
123
|
+
const ProjectListArgsSchema = z.object({
|
|
124
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
125
|
+
baseUrl: CommonFields.baseUrl,
|
|
126
|
+
params: z.object({
|
|
127
|
+
showArchive: z.boolean().optional().describe(
|
|
128
|
+
"Whether to include archived records in the results. When true, returns both active and archived items. When false, returns only active (non-archived) items. "
|
|
129
|
+
).default(false)
|
|
130
|
+
}),
|
|
131
|
+
start: CommonFields.start,
|
|
132
|
+
page: CommonFields.page,
|
|
133
|
+
limit: CommonFields.limit,
|
|
134
|
+
filter: CommonFields.filter
|
|
135
|
+
});
|
|
136
|
+
const ProjectArgsSchema = z.object({
|
|
137
|
+
projectKey: CommonFields.projectKey
|
|
138
|
+
});
|
|
139
|
+
const ReleasesCyclesArgsSchema = z.object({
|
|
140
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
141
|
+
showArchive: CommonFields.showArchive
|
|
142
|
+
});
|
|
143
|
+
const BuildArgsSchema = z.object({
|
|
144
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
145
|
+
baseUrl: CommonFields.baseUrl,
|
|
146
|
+
start: CommonFields.start,
|
|
147
|
+
page: CommonFields.page,
|
|
148
|
+
limit: CommonFields.limit,
|
|
149
|
+
filter: CommonFields.filter
|
|
150
|
+
});
|
|
151
|
+
const PlatformArgsSchema = z.object({
|
|
152
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
153
|
+
baseUrl: CommonFields.baseUrl,
|
|
154
|
+
start: CommonFields.start,
|
|
155
|
+
page: CommonFields.page,
|
|
156
|
+
limit: CommonFields.limit,
|
|
157
|
+
sort: z.string().optional().describe(
|
|
158
|
+
`Sort criteria as JSON string (default '[{"property":"platformID","direction":"DESC"}]')`
|
|
159
|
+
).default('[{"property":"platformID","direction":"DESC"}]'),
|
|
160
|
+
filter: CommonFields.filter
|
|
161
|
+
});
|
|
162
|
+
const CreateReleaseArgsSchema = z.object({
|
|
163
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
164
|
+
baseUrl: CommonFields.baseUrl,
|
|
165
|
+
release: z.object({
|
|
166
|
+
name: z.string().describe("Release name (required)"),
|
|
167
|
+
description: z.string().optional().describe("Release description"),
|
|
168
|
+
startDate: z.string().optional().describe(
|
|
169
|
+
"Release start date in format DD-MM-YYYY or MM-DD-YYYY (depends on QMetry instance date format configuration)"
|
|
170
|
+
),
|
|
171
|
+
targetDate: z.string().optional().describe(
|
|
172
|
+
"Release target/end date in format DD-MM-YYYY or MM-DD-YYYY (depends on QMetry instance date format configuration)"
|
|
173
|
+
),
|
|
174
|
+
projectID: z.number().optional().describe(
|
|
175
|
+
"Project ID (optional, can be auto-resolved from project key if not provided)"
|
|
176
|
+
)
|
|
177
|
+
}),
|
|
178
|
+
cycle: z.object({
|
|
179
|
+
name: z.string().describe("Cycle name (required if cycle is provided)"),
|
|
180
|
+
isLocked: z.boolean().optional().describe("Whether the cycle is locked (default: false)"),
|
|
181
|
+
isArchived: z.boolean().optional().describe("Whether the cycle is archived (default: false)")
|
|
182
|
+
}).optional().describe("Optional cycle to create within the release")
|
|
183
|
+
});
|
|
184
|
+
const CreateCycleArgsSchema = z.object({
|
|
185
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
186
|
+
baseUrl: CommonFields.baseUrl,
|
|
187
|
+
cycle: z.object({
|
|
188
|
+
name: z.string().describe("Cycle name (required)"),
|
|
189
|
+
startDate: z.string().optional().describe(
|
|
190
|
+
"Cycle start date in format DD-MM-YYYY or MM-DD-YYYY (depends on QMetry instance date format configuration)"
|
|
191
|
+
),
|
|
192
|
+
targetDate: z.string().optional().describe(
|
|
193
|
+
"Cycle target/end date in format DD-MM-YYYY or MM-DD-YYYY (depends on QMetry instance date format configuration)"
|
|
194
|
+
),
|
|
195
|
+
projectID: z.number().optional().describe(
|
|
196
|
+
"Project ID (optional, can be auto-resolved from project key if not provided)"
|
|
197
|
+
),
|
|
198
|
+
releaseID: z.number().describe("Release ID (required) - the release this cycle belongs to")
|
|
199
|
+
})
|
|
200
|
+
});
|
|
201
|
+
const UpdateCycleArgsSchema = z.object({
|
|
202
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
203
|
+
baseUrl: CommonFields.baseUrl,
|
|
204
|
+
cycle: z.object({
|
|
205
|
+
name: z.string().optional().describe("Cycle name (optional for update)"),
|
|
206
|
+
startDate: z.string().optional().describe(
|
|
207
|
+
"Cycle start date in format DD-MM-YYYY or MM-DD-YYYY (depends on QMetry instance date format configuration)"
|
|
208
|
+
),
|
|
209
|
+
targetDate: z.string().optional().describe(
|
|
210
|
+
"Cycle target/end date in format DD-MM-YYYY or MM-DD-YYYY (depends on QMetry instance date format configuration)"
|
|
211
|
+
),
|
|
212
|
+
buildID: z.number().describe(
|
|
213
|
+
"Build ID (required for identifying the cycle to update). To get the buildID - Call API 'Cycle/List' (FETCH_RELEASES_CYCLES tool). From the response, get value of following attribute -> data[<index>].buildID"
|
|
214
|
+
),
|
|
215
|
+
releaseID: z.number().describe(
|
|
216
|
+
"Release ID (required for identifying the cycle to update). To get the releaseID - Call API 'Cycle/List' (FETCH_RELEASES_CYCLES tool). From the response, get value of following attribute -> data[<index>].releaseID"
|
|
217
|
+
)
|
|
218
|
+
})
|
|
219
|
+
});
|
|
220
|
+
const CreateTestCaseStepSchema = z.object({
|
|
221
|
+
orderId: z.number(),
|
|
222
|
+
description: z.string(),
|
|
223
|
+
inputData: z.string().optional(),
|
|
224
|
+
expectedOutcome: z.string().optional(),
|
|
225
|
+
UDF: z.record(z.string(), z.string()).optional(),
|
|
226
|
+
tcStepID: z.number().optional()
|
|
227
|
+
// Required for updating existing steps, omit for new steps
|
|
228
|
+
});
|
|
229
|
+
const UpdateTestCaseRemoveStepSchema = z.object({
|
|
230
|
+
tcID: z.number(),
|
|
231
|
+
projectID: z.number(),
|
|
232
|
+
tcStepID: z.number(),
|
|
233
|
+
tcVersionID: z.number(),
|
|
234
|
+
tcVersion: z.number(),
|
|
235
|
+
tcsAttCount: z.number(),
|
|
236
|
+
orderId: z.number(),
|
|
237
|
+
description: z.string(),
|
|
238
|
+
inputData: z.string().optional(),
|
|
239
|
+
expectedOutcome: z.string().optional(),
|
|
240
|
+
UDF: z.record(z.string(), z.string()).optional(),
|
|
241
|
+
tcsIsShared: z.boolean(),
|
|
242
|
+
tcsIsParameterized: z.boolean()
|
|
243
|
+
});
|
|
244
|
+
const CreateTestCaseArgsSchema = z.object({
|
|
245
|
+
tcFolderID: z.string(),
|
|
246
|
+
steps: z.array(CreateTestCaseStepSchema).optional(),
|
|
247
|
+
name: z.string(),
|
|
248
|
+
priority: z.number().optional(),
|
|
249
|
+
component: z.array(z.number()).optional(),
|
|
250
|
+
testcaseOwner: z.number().optional(),
|
|
251
|
+
testCaseState: z.number().optional(),
|
|
252
|
+
testCaseType: z.number().optional(),
|
|
253
|
+
estimatedTime: z.number().optional(),
|
|
254
|
+
testingType: z.number().optional(),
|
|
255
|
+
description: z.string().optional(),
|
|
256
|
+
associateRelCyc: z.boolean().optional(),
|
|
257
|
+
releaseCycleMapping: z.array(
|
|
258
|
+
z.object({
|
|
259
|
+
release: z.number(),
|
|
260
|
+
cycle: z.array(z.number()),
|
|
261
|
+
version: z.number().optional()
|
|
340
262
|
})
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
524
|
-
baseUrl: CommonFields.baseUrl,
|
|
525
|
-
id: CommonFields.id,
|
|
526
|
-
version: CommonFields.version,
|
|
527
|
-
scope: CommonFields.scope,
|
|
528
|
-
});
|
|
529
|
-
export const TestCaseStepsArgsSchema = z.object({
|
|
530
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
531
|
-
baseUrl: CommonFields.baseUrl,
|
|
532
|
-
id: CommonFields.id,
|
|
533
|
-
version: CommonFields.versionOptional,
|
|
534
|
-
start: CommonFields.start,
|
|
535
|
-
page: CommonFields.page,
|
|
536
|
-
limit: CommonFields.limit,
|
|
537
|
-
});
|
|
538
|
-
export const TestCaseExecutionsArgsSchema = z.object({
|
|
539
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
540
|
-
baseUrl: CommonFields.baseUrl,
|
|
541
|
-
tcid: CommonFields.tcID,
|
|
542
|
-
tcversion: CommonFields.versionOptional,
|
|
543
|
-
start: CommonFields.start,
|
|
544
|
-
page: CommonFields.page,
|
|
545
|
-
limit: CommonFields.limit,
|
|
546
|
-
scope: CommonFields.scope,
|
|
547
|
-
filter: CommonFields.filter,
|
|
548
|
-
});
|
|
549
|
-
export const RequirementListArgsSchema = z.object({
|
|
550
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
551
|
-
baseUrl: CommonFields.baseUrl,
|
|
552
|
-
viewId: CommonFields.rqViewId,
|
|
553
|
-
folderPath: CommonFields.rqFolderPath,
|
|
554
|
-
start: CommonFields.start,
|
|
555
|
-
page: CommonFields.page,
|
|
556
|
-
limit: CommonFields.limit,
|
|
557
|
-
scope: CommonFields.scope,
|
|
558
|
-
getSubEntities: CommonFields.getSubEntities,
|
|
559
|
-
hideEmptyFolders: CommonFields.hideEmptyFolders,
|
|
560
|
-
folderSortColumn: CommonFields.folderSortColumn,
|
|
561
|
-
folderSortOrder: CommonFields.folderSortOrder,
|
|
562
|
-
isJiraFilter: z
|
|
563
|
-
.boolean()
|
|
564
|
-
.optional()
|
|
565
|
-
.describe("'false' if using qmetry filter")
|
|
566
|
-
.default(false),
|
|
567
|
-
filterType: z
|
|
568
|
-
.enum(["QMETRY", "JIRA"])
|
|
569
|
-
.optional()
|
|
570
|
-
.describe("Pass 'QMETRY' or 'JIRA'")
|
|
571
|
-
.default("QMETRY"),
|
|
572
|
-
filter: CommonFields.filter,
|
|
573
|
-
udfFilter: CommonFields.udfFilter,
|
|
574
|
-
sort: z
|
|
575
|
-
.string()
|
|
576
|
-
.optional()
|
|
577
|
-
.describe("Sort Records - refer json schema, Possible property - name, entityKey, associatedVersion, priorityAlias, createdDate, createdByAlias, updatedDate, updatedByAlias, requirementStateAlias, linkedTcCount, linkedDfCount, attachmentCount, createdSystem, owner")
|
|
578
|
-
.default('[{"property":"name","direction":"ASC"}]'),
|
|
579
|
-
});
|
|
580
|
-
export const RequirementDetailsArgsSchema = z.object({
|
|
581
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
582
|
-
baseUrl: CommonFields.baseUrl,
|
|
583
|
-
id: CommonFields.rqID,
|
|
584
|
-
version: CommonFields.rqVersion,
|
|
585
|
-
});
|
|
586
|
-
export const RequirementsLinkedToTestCaseArgsSchema = z.object({
|
|
587
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
588
|
-
baseUrl: CommonFields.baseUrl,
|
|
589
|
-
tcID: CommonFields.tcID,
|
|
590
|
-
getLinked: z
|
|
591
|
-
.boolean()
|
|
592
|
-
.optional()
|
|
593
|
-
.describe("True to get only requirements that are linked with this test case, " +
|
|
594
|
-
"false to get requirements which are not linked with this test case. " +
|
|
595
|
-
"Defaults to true (get linked requirements).")
|
|
596
|
-
.default(true),
|
|
597
|
-
start: CommonFields.start,
|
|
598
|
-
page: CommonFields.page,
|
|
599
|
-
limit: CommonFields.limit,
|
|
600
|
-
rqFolderPath: CommonFields.rqFolderPath,
|
|
601
|
-
filter: CommonFields.filter,
|
|
602
|
-
});
|
|
603
|
-
export const LinkRequirementToTestCaseArgsSchema = z.object({
|
|
604
|
-
tcID: z.string().describe("EntityKey of Testcase (e.g. 'COD-TC-29')"),
|
|
605
|
-
tcVersionId: CommonFields.tcVersionID,
|
|
606
|
-
rqVersionIds: z
|
|
607
|
-
.string()
|
|
608
|
-
.describe("Comma-separated values of versionId of the Requirement (e.g. '236124,236125')"),
|
|
609
|
-
});
|
|
610
|
-
export const TestCasesLinkedToRequirementArgsSchema = z.object({
|
|
611
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
612
|
-
baseUrl: CommonFields.baseUrl,
|
|
613
|
-
rqID: CommonFields.rqID,
|
|
614
|
-
getLinked: z
|
|
615
|
-
.boolean()
|
|
616
|
-
.optional()
|
|
617
|
-
.describe("True to get only test cases that are linked with this requirement, " +
|
|
618
|
-
"false to get test cases which are not linked with this requirement. " +
|
|
619
|
-
"Defaults to true (get linked test cases).")
|
|
620
|
-
.default(true),
|
|
621
|
-
showEntityWithReleaseCycle: z
|
|
622
|
-
.boolean()
|
|
623
|
-
.optional()
|
|
624
|
-
.describe("True to list only test cases which have given release and cycle, " +
|
|
625
|
-
"false for all test cases regardless of release/cycle association. " +
|
|
626
|
-
"Defaults to false (show all).")
|
|
627
|
-
.default(false),
|
|
628
|
-
start: CommonFields.start,
|
|
629
|
-
page: CommonFields.page,
|
|
630
|
-
limit: CommonFields.limit,
|
|
631
|
-
tcFolderPath: z
|
|
632
|
-
.string()
|
|
633
|
-
.optional()
|
|
634
|
-
.describe("Folder path to get test cases under specific folder. " +
|
|
635
|
-
'Use empty string "" for root folder or specify path like "/Sample Template".')
|
|
636
|
-
.default(""),
|
|
637
|
-
releaseID: z
|
|
638
|
-
.string()
|
|
639
|
-
.optional()
|
|
640
|
-
.describe("Filter test cases by release ID. " +
|
|
641
|
-
"Use string representation of release ID (e.g., '7138'). " +
|
|
642
|
-
"Get release IDs from FETCH_RELEASES_AND_CYCLES tool."),
|
|
643
|
-
cycleID: z
|
|
644
|
-
.string()
|
|
645
|
-
.optional()
|
|
646
|
-
.describe("Filter test cases by cycle ID. " +
|
|
647
|
-
"Use string representation of cycle ID (e.g., '13382'). " +
|
|
648
|
-
"Get cycle IDs from FETCH_RELEASES_AND_CYCLES tool."),
|
|
649
|
-
filter: CommonFields.filter,
|
|
650
|
-
getSubEntities: z
|
|
651
|
-
.boolean()
|
|
652
|
-
.optional()
|
|
653
|
-
.describe("Allow filter of sub-entities for requirement.")
|
|
654
|
-
.default(true),
|
|
655
|
-
getColumns: z
|
|
656
|
-
.boolean()
|
|
657
|
-
.optional()
|
|
658
|
-
.describe("True to get column information in response.")
|
|
659
|
-
.default(true),
|
|
660
|
-
});
|
|
661
|
-
export const CreateTestSuiteArgsSchema = z.object({
|
|
662
|
-
parentFolderId: z.string(),
|
|
663
|
-
name: z.string(),
|
|
664
|
-
isAutomatedFlag: z.boolean().optional(),
|
|
665
|
-
description: z.string().optional(),
|
|
666
|
-
testsuiteOwner: z.number().optional(),
|
|
667
|
-
testSuiteState: z.number().optional(),
|
|
668
|
-
associateRelCyc: z.boolean().optional(),
|
|
669
|
-
releaseCycleMapping: z
|
|
670
|
-
.array(z.object({
|
|
671
|
-
buildID: z.number(),
|
|
672
|
-
releaseId: z.number(),
|
|
673
|
-
}))
|
|
674
|
-
.optional(),
|
|
675
|
-
});
|
|
676
|
-
export const UpdateTestSuiteArgsSchema = z.object({
|
|
677
|
-
id: z.number().describe("Id of Test Suite to be updated (required)"),
|
|
678
|
-
TsFolderID: z
|
|
679
|
-
.number()
|
|
680
|
-
.describe("Folder ID where Test Suite resides (required)"),
|
|
681
|
-
entityKey: z
|
|
682
|
-
.string()
|
|
683
|
-
.describe("Entity Key of Test Suite to be updated (required)"),
|
|
684
|
-
name: z.string().optional().describe("Name of the Test Suite"),
|
|
685
|
-
description: z.string().optional().describe("Description of the Test Suite"),
|
|
686
|
-
testsuiteOwner: z.number().optional().describe("Owner ID of the Test Suite"),
|
|
687
|
-
testSuiteState: z.number().optional().describe("State of the Test Suite"),
|
|
688
|
-
});
|
|
689
|
-
export const TestSuiteListArgsSchema = z.object({
|
|
690
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
691
|
-
baseUrl: CommonFields.baseUrl,
|
|
692
|
-
viewId: CommonFields.tsViewId,
|
|
693
|
-
folderPath: CommonFields.tsFolderPath,
|
|
694
|
-
start: CommonFields.start,
|
|
695
|
-
page: CommonFields.page,
|
|
696
|
-
limit: CommonFields.limit,
|
|
697
|
-
scope: CommonFields.scope,
|
|
698
|
-
getSubEntities: CommonFields.getSubEntities,
|
|
699
|
-
filter: CommonFields.filter,
|
|
700
|
-
udfFilter: CommonFields.udfFilter,
|
|
701
|
-
sort: z
|
|
702
|
-
.string()
|
|
703
|
-
.optional()
|
|
704
|
-
.describe("Sort Records - refer json schema, Possible property - entityKey, name, testsuiteStatus, linkedPlatformCount, linkedTcCount, createdDate, createdByAlias, updatedDate, updatedByAlias, attachmentCount, owner, remExecutionTime, totalExecutionTime")
|
|
705
|
-
.default('[{"property":"name","direction":"ASC"}]'),
|
|
706
|
-
});
|
|
707
|
-
export const TestSuitesForTestCaseArgsSchema = z.object({
|
|
708
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
709
|
-
baseUrl: CommonFields.baseUrl,
|
|
710
|
-
tsFolderID: CommonFields.tsFolderID,
|
|
711
|
-
viewId: CommonFields.tsfeViewId.optional(),
|
|
712
|
-
start: CommonFields.start,
|
|
713
|
-
page: CommonFields.page,
|
|
714
|
-
limit: CommonFields.limit,
|
|
715
|
-
getColumns: CommonFields.getColumns,
|
|
716
|
-
filter: CommonFields.filter,
|
|
717
|
-
});
|
|
718
|
-
export const LinkTestCasesToTestSuiteArgsSchema = z
|
|
719
|
-
.object({
|
|
720
|
-
tsID: z.number().describe("Id of Test Suite (required)"),
|
|
721
|
-
tcvdIDs: z
|
|
722
|
-
.array(z.number())
|
|
723
|
-
.describe("Array of Test Case Version IDs (required if fromReqs is false)"),
|
|
724
|
-
fromReqs: z
|
|
725
|
-
.boolean()
|
|
726
|
-
.optional()
|
|
727
|
-
.describe("Link TestCases from Requirements (optional, default false)"),
|
|
728
|
-
})
|
|
729
|
-
.strip();
|
|
730
|
-
export const RequirementsLinkedTestCasesToTestSuiteArgsSchema = z
|
|
731
|
-
.object({
|
|
732
|
-
tsID: z.number().describe("Id of Test Suite (required)"),
|
|
733
|
-
tcvdIDs: z
|
|
734
|
-
.array(z.number())
|
|
735
|
-
.describe("Array of Test Case Version IDs (required if fromReqs is true)"),
|
|
736
|
-
fromReqs: z
|
|
737
|
-
.boolean()
|
|
738
|
-
.optional()
|
|
739
|
-
.describe("Link TestCases from Requirements (optional, default true)"),
|
|
740
|
-
})
|
|
741
|
-
.strip();
|
|
742
|
-
export const IssuesLinkedToTestCaseArgsSchema = z.object({
|
|
743
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
744
|
-
baseUrl: CommonFields.baseUrl,
|
|
745
|
-
tcID: CommonFields.tcID,
|
|
746
|
-
getLinked: CommonFields.getLinked.optional().default(true),
|
|
747
|
-
start: CommonFields.start,
|
|
748
|
-
page: CommonFields.page,
|
|
749
|
-
limit: CommonFields.limit,
|
|
750
|
-
filter: CommonFields.filter,
|
|
751
|
-
});
|
|
752
|
-
export const TestCasesByTestSuiteArgsSchema = z.object({
|
|
753
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
754
|
-
baseUrl: CommonFields.baseUrl,
|
|
755
|
-
tsID: CommonFields.tsID,
|
|
756
|
-
getLinked: CommonFields.getLinked.optional().default(true),
|
|
757
|
-
start: CommonFields.start,
|
|
758
|
-
page: CommonFields.page,
|
|
759
|
-
limit: CommonFields.limit,
|
|
760
|
-
filter: CommonFields.filter,
|
|
761
|
-
});
|
|
762
|
-
export const ExecutionsByTestSuiteArgsSchema = z.object({
|
|
763
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
764
|
-
baseUrl: CommonFields.baseUrl,
|
|
765
|
-
tsID: CommonFields.tsID, // API payload param - sent in request body (REQUIRED)
|
|
766
|
-
tsFolderID: CommonFields.tsFolderID.optional(),
|
|
767
|
-
gridName: CommonFields.gridName,
|
|
768
|
-
viewId: CommonFields.teViewId,
|
|
769
|
-
start: CommonFields.start,
|
|
770
|
-
page: CommonFields.page,
|
|
771
|
-
limit: CommonFields.limit,
|
|
772
|
-
filter: CommonFields.filter,
|
|
773
|
-
});
|
|
774
|
-
export const TestCaseRunsByTestSuiteRunArgsSchema = z.object({
|
|
775
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
776
|
-
baseUrl: CommonFields.baseUrl,
|
|
777
|
-
tsrunID: CommonFields.tsrunID, // API payload param - sent in request body (REQUIRED)
|
|
778
|
-
viewId: CommonFields.teViewId.pipe(z.number()), // API payload param - sent in request body (REQUIRED)
|
|
779
|
-
start: CommonFields.start,
|
|
780
|
-
page: CommonFields.page,
|
|
781
|
-
limit: CommonFields.limit,
|
|
782
|
-
});
|
|
783
|
-
export const LinkedIssuesByTestCaseRunArgsSchema = z.object({
|
|
784
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
785
|
-
baseUrl: CommonFields.baseUrl,
|
|
786
|
-
entityId: CommonFields.entityId, // API payload param - sent in request body (REQUIRED)
|
|
787
|
-
getLinked: CommonFields.getLinked,
|
|
788
|
-
getColumns: CommonFields.getColumns,
|
|
789
|
-
istcrFlag: CommonFields.istcrFlag,
|
|
790
|
-
start: CommonFields.start,
|
|
791
|
-
page: CommonFields.page,
|
|
792
|
-
limit: CommonFields.limit,
|
|
793
|
-
filter: CommonFields.filter,
|
|
794
|
-
});
|
|
795
|
-
export const CreateIssueArgsSchema = z.object({
|
|
796
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
797
|
-
baseUrl: CommonFields.baseUrl,
|
|
798
|
-
issueType: z.number().describe("Issue type ID (e.g. Bug, Enhancement, etc.)"),
|
|
799
|
-
issuePriority: z
|
|
800
|
-
.number()
|
|
801
|
-
.describe("Issue priority ID (e.g. High, Medium, Low, etc.)"),
|
|
802
|
-
summary: z.string().describe("Summary or title of the defect/issue"),
|
|
803
|
-
description: z
|
|
804
|
-
.string()
|
|
805
|
-
.optional()
|
|
806
|
-
.describe("Detailed description of the defect/issue"),
|
|
807
|
-
sync_with: z
|
|
808
|
-
.string()
|
|
809
|
-
.optional()
|
|
810
|
-
.describe("External system to sync with (e.g. JIRA, QMetry, etc.)"),
|
|
811
|
-
issueOwner: z.number().optional().describe("Owner/user ID for the issue"),
|
|
812
|
-
component: z
|
|
813
|
-
.array(z.number())
|
|
814
|
-
.optional()
|
|
815
|
-
.describe("Component IDs associated with the issue"),
|
|
816
|
-
affectedRelease: z
|
|
817
|
-
.array(z.number())
|
|
818
|
-
.optional()
|
|
819
|
-
.describe("Release IDs affected by this issue"),
|
|
820
|
-
affectedCycles: z
|
|
821
|
-
.array(z.number())
|
|
822
|
-
.optional()
|
|
823
|
-
.describe("Cycle IDs affected by this issue"),
|
|
824
|
-
tcRunID: z
|
|
825
|
-
.number()
|
|
826
|
-
.optional()
|
|
827
|
-
.describe("Test Case Run ID to link this defect/issue to a test execution (optional)"),
|
|
828
|
-
});
|
|
829
|
-
export const UpdateIssueArgsSchema = z.object({
|
|
830
|
-
DefectId: z.number().describe("ID of the defect/issue to be updated"),
|
|
831
|
-
entityKey: z
|
|
832
|
-
.string()
|
|
833
|
-
.optional()
|
|
834
|
-
.describe("Entity Key of the defect/issue to be updated"),
|
|
835
|
-
issueType: z
|
|
836
|
-
.number()
|
|
837
|
-
.optional()
|
|
838
|
-
.describe("Issue type ID (e.g. Bug, Enhancement, etc.)"),
|
|
839
|
-
issuePriority: z
|
|
840
|
-
.number()
|
|
841
|
-
.optional()
|
|
842
|
-
.describe("Issue priority ID (e.g. High, Medium, Low, etc.)"),
|
|
843
|
-
summary: z
|
|
844
|
-
.string()
|
|
845
|
-
.optional()
|
|
846
|
-
.describe("Summary or title of the defect/issue"),
|
|
847
|
-
description: z
|
|
848
|
-
.string()
|
|
849
|
-
.optional()
|
|
850
|
-
.describe("Detailed description of the defect/issue"),
|
|
851
|
-
issueOwner: z.number().optional().describe("Owner/user ID for the issue"),
|
|
852
|
-
affectedRelease: z
|
|
853
|
-
.number()
|
|
854
|
-
.optional()
|
|
855
|
-
.describe("Release IDs affected by this issue"),
|
|
856
|
-
affectedCycles: z
|
|
857
|
-
.number()
|
|
858
|
-
.optional()
|
|
859
|
-
.describe("Cycle IDs affected by this issue"),
|
|
860
|
-
});
|
|
861
|
-
export const IssuesListArgsSchema = z.object({
|
|
862
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
863
|
-
baseUrl: CommonFields.baseUrl,
|
|
864
|
-
viewId: z
|
|
865
|
-
.number()
|
|
866
|
-
.describe("ViewId for issues - SYSTEM AUTOMATICALLY RESOLVES THIS. " +
|
|
867
|
-
"Leave empty unless you have a specific viewId. " +
|
|
868
|
-
"System will fetch project info using the projectKey and extract latestViews.IS.viewId automatically. " +
|
|
869
|
-
"Manual viewId only needed if you want to override the automatic resolution."),
|
|
870
|
-
start: CommonFields.start,
|
|
871
|
-
page: CommonFields.page,
|
|
872
|
-
limit: CommonFields.limit,
|
|
873
|
-
filter: CommonFields.filter,
|
|
874
|
-
isJiraIntegrated: z
|
|
875
|
-
.boolean()
|
|
876
|
-
.optional()
|
|
877
|
-
.describe("Send true if current project is Integrated with Jira")
|
|
878
|
-
.default(false),
|
|
879
|
-
sort: z
|
|
880
|
-
.string()
|
|
881
|
-
.optional()
|
|
882
|
-
.describe("Sort Records - refer json schema, Possible property - entityKey, name, typeAlias, stateAlias, createdDate, createdByAlias, updatedDate, updatedByAlias, priorityAlias, createdSystem, linkedTcrCount, linkedRqCount, dfOwner, attachmentCount, environmentText")
|
|
883
|
-
.default('[{"property":"name","direction":"ASC"}]'),
|
|
884
|
-
});
|
|
885
|
-
// Export for Link Issues to Testcase Run tool
|
|
886
|
-
export const LinkIssuesToTestcaseRunArgsSchema = z.object({
|
|
887
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
888
|
-
baseUrl: CommonFields.baseUrl,
|
|
889
|
-
issueIds: z
|
|
890
|
-
.array(z.union([z.string(), z.number()]))
|
|
891
|
-
.describe("ID of issues to be linked to Testcase Run"),
|
|
892
|
-
tcrId: z.number().describe("ID of Testcase Run to link issues with"),
|
|
893
|
-
});
|
|
894
|
-
// Export for Link Platforms to Test Suite tool
|
|
895
|
-
export const LinkPlatformsToTestSuiteArgsSchema = z.object({
|
|
896
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
897
|
-
baseUrl: CommonFields.baseUrl,
|
|
898
|
-
qmTsId: z
|
|
899
|
-
.number()
|
|
900
|
-
.describe("Id of Test Suite (required). To get the qmTsId - Call API 'Testsuite/Fetch Testsuite' From the response, get value of following attribute -> data[<index>].id"),
|
|
901
|
-
qmPlatformId: z
|
|
902
|
-
.string()
|
|
903
|
-
.describe("Comma-separated value of PlatformId (required). To get the qmPlatformId - Call API 'Platform/List' From the response, get value of following attribute -> data[<index>].platformID"),
|
|
904
|
-
});
|
|
905
|
-
// Export for Bulk Update Test Case Execution Status tool
|
|
906
|
-
export const BulkUpdateExecutionStatusArgsSchema = z.object({
|
|
907
|
-
projectKey: CommonFields.projectKeyOptional,
|
|
908
|
-
baseUrl: CommonFields.baseUrl,
|
|
909
|
-
entityIDs: z
|
|
910
|
-
.string()
|
|
911
|
-
.describe("Comma-separated IDs of Test Case Runs to update (e.g., '66095087' for single or '66095069,66095075' for bulk). " +
|
|
912
|
-
"To get the entityIDs - Call API 'Execution/Fetch Testcase Run ID' " +
|
|
913
|
-
"From the response, get value of following attribute -> data[<index>].tcRunID"),
|
|
914
|
-
entityType: z
|
|
915
|
-
.enum(["TCR", "TCSR"])
|
|
916
|
-
.describe("Type of Entity to Execute: 'TCR' (Test Case Run) or 'TCSR' (Test Case Step Run)")
|
|
917
|
-
.default("TCR"),
|
|
918
|
-
qmTsRunId: z
|
|
919
|
-
.string()
|
|
920
|
-
.describe("Id of Test Suite Run to execute (required). " +
|
|
921
|
-
"To get the qmTsRunId - Call API 'Execution/Fetch Executions' " +
|
|
922
|
-
"From the response, get value of following attribute -> data[<index>].tsRunID"),
|
|
923
|
-
runStatusID: z
|
|
924
|
-
.number()
|
|
925
|
-
.describe("Id of the execution status to set (required). " +
|
|
926
|
-
"To get the runStatusID - Call API 'Admin/Project GET info Service' " +
|
|
927
|
-
"From the response, get value of following attribute -> allstatus[<index>].id " +
|
|
928
|
-
"Common statuses: Pass, Fail, Not Run, Blocked, WIP, etc."),
|
|
929
|
-
dropID: z
|
|
930
|
-
.union([z.number(), z.string()])
|
|
931
|
-
.optional()
|
|
932
|
-
.describe("Unique identifier of drop/build on which execution is to be performed (optional). " +
|
|
933
|
-
"To get the dropID - Call API 'Fetch Build/List' " +
|
|
934
|
-
"From the response, get value of following attribute -> data[<index>].dropID"),
|
|
935
|
-
isAutoExecuted: z
|
|
936
|
-
.enum(["0", "1"])
|
|
937
|
-
.optional()
|
|
938
|
-
.describe("Set '1' for automated and '0' for manual Execution Type"),
|
|
939
|
-
isBulkOperation: z
|
|
940
|
-
.boolean()
|
|
941
|
-
.optional()
|
|
942
|
-
.describe("Set true for bulk operations (multiple entityIDs), false for single execution update. " +
|
|
943
|
-
"Default: true if multiple comma-separated entityIDs, false otherwise"),
|
|
944
|
-
comments: z
|
|
945
|
-
.string()
|
|
946
|
-
.optional()
|
|
947
|
-
.describe("Optional comments for the execution status update"),
|
|
948
|
-
username: z
|
|
949
|
-
.string()
|
|
950
|
-
.optional()
|
|
951
|
-
.describe("If Part 11 Compliance is active then required for authentication"),
|
|
952
|
-
password: z
|
|
953
|
-
.string()
|
|
954
|
-
.optional()
|
|
955
|
-
.describe("If Part 11 Compliance is active then required for authentication"),
|
|
956
|
-
qmRunObj: z
|
|
957
|
-
.string()
|
|
958
|
-
.optional()
|
|
959
|
-
.describe("Internal QMetry run object (optional, usually empty string)"),
|
|
960
|
-
type: z
|
|
961
|
-
.enum(["TCR", "TCSR"])
|
|
962
|
-
.optional()
|
|
963
|
-
.describe("Type of Entity - same as entityType (for backwards compatibility)"),
|
|
964
|
-
});
|
|
965
|
-
/**
|
|
966
|
-
* Import automation results payload schema
|
|
967
|
-
*
|
|
968
|
-
* CRITICAL: File upload is required and must be provided by the user
|
|
969
|
-
* User should upload a valid result file (.json, .xml, or .zip up to 30 MB)
|
|
970
|
-
*/
|
|
971
|
-
export const ImportAutomationResultsPayloadSchema = z.object({
|
|
972
|
-
// REQUIRED: File data as base64 string or file path
|
|
973
|
-
file: z
|
|
974
|
-
.string()
|
|
975
|
-
.refine((val) => {
|
|
976
|
-
// Base64 regex: matches typical base64 strings (not perfect, but covers most cases)
|
|
977
|
-
const base64Regex = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
|
|
978
|
-
// File path regex: ends with .json, .xml, or .zip (case-insensitive)
|
|
979
|
-
const filePathRegex = /\.(json|xml|zip)$/i;
|
|
980
|
-
return base64Regex.test(val) || filePathRegex.test(val);
|
|
981
|
-
}, {
|
|
982
|
-
message: "Must be a valid base64 string or a file path ending with .json, .xml, or .zip",
|
|
263
|
+
).optional()
|
|
264
|
+
});
|
|
265
|
+
const UpdateTestCaseArgsSchema = z.object({
|
|
266
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
267
|
+
baseUrl: CommonFields.baseUrl,
|
|
268
|
+
tcID: CommonFields.tcID,
|
|
269
|
+
tcVersionID: CommonFields.tcVersionID,
|
|
270
|
+
tcVersion: z.number().optional().describe(
|
|
271
|
+
"Test Case version number (required when withVersion=true for creating new version). This is the current version number from which a new version will be created."
|
|
272
|
+
),
|
|
273
|
+
withVersion: z.boolean().optional().describe(
|
|
274
|
+
"Pass 'true' if you want to create a new version of the test case with incremented version number. When true, a new version is created (e.g., if current version is 2, new version 3 is created). When false or omitted, updates the existing version specified by tcVersionID. IMPORTANT: Always send proper tcVersionID to identify which version the request is for."
|
|
275
|
+
),
|
|
276
|
+
versionComment: z.string().optional().describe(
|
|
277
|
+
"Comment or description for the new version (used only when withVersion=true). Helps track what changed in this new version. Example: 'Updated test steps for new requirements'"
|
|
278
|
+
),
|
|
279
|
+
notruncurrent: z.boolean().optional().describe(
|
|
280
|
+
"Flag to control execution behavior for current version when creating a new version. Used in conjunction with withVersion=true."
|
|
281
|
+
),
|
|
282
|
+
notrunall: z.boolean().optional().describe(
|
|
283
|
+
"Flag to control execution behavior for all versions when creating a new version. Used in conjunction with withVersion=true."
|
|
284
|
+
),
|
|
285
|
+
folderPath: CommonFields.tsFolderPath,
|
|
286
|
+
scope: CommonFields.scope,
|
|
287
|
+
isStepUpdated: z.boolean().optional().describe(
|
|
288
|
+
"Set to true when steps are being added, updated, or removed. Required when including 'steps' or 'removeSteps' arrays."
|
|
289
|
+
),
|
|
290
|
+
steps: z.array(CreateTestCaseStepSchema).optional(),
|
|
291
|
+
removeSteps: z.array(UpdateTestCaseRemoveStepSchema).optional(),
|
|
292
|
+
name: z.string().optional(),
|
|
293
|
+
priority: z.number().optional(),
|
|
294
|
+
component: z.array(z.number()).optional(),
|
|
295
|
+
owner: z.number().optional(),
|
|
296
|
+
testCaseState: z.number().optional(),
|
|
297
|
+
testCaseType: z.number().optional(),
|
|
298
|
+
estimatedTime: z.number().optional().describe("Estimated execution time in seconds. Example: 7200 for 2 hours"),
|
|
299
|
+
executionMinutes: z.number().optional(),
|
|
300
|
+
testingType: z.number().optional(),
|
|
301
|
+
description: z.string().optional(),
|
|
302
|
+
updateOnlyMetadata: z.boolean().optional().describe(
|
|
303
|
+
"Set to true to update only metadata fields without touching test steps. When true, steps and removeSteps are ignored."
|
|
304
|
+
)
|
|
305
|
+
});
|
|
306
|
+
const TestCaseListArgsSchema = z.object({
|
|
307
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
308
|
+
baseUrl: CommonFields.baseUrl,
|
|
309
|
+
viewId: CommonFields.tcViewId,
|
|
310
|
+
folderPath: CommonFields.tcFolderPath,
|
|
311
|
+
folderID: CommonFields.folderID,
|
|
312
|
+
start: CommonFields.start,
|
|
313
|
+
page: CommonFields.page,
|
|
314
|
+
limit: CommonFields.limit,
|
|
315
|
+
scope: CommonFields.scope,
|
|
316
|
+
showRootOnly: CommonFields.showRootOnly,
|
|
317
|
+
getSubEntities: CommonFields.getSubEntities,
|
|
318
|
+
hideEmptyFolders: CommonFields.hideEmptyFolders,
|
|
319
|
+
folderSortColumn: CommonFields.folderSortColumn,
|
|
320
|
+
restoreDefaultColumns: CommonFields.restoreDefaultColumns,
|
|
321
|
+
folderSortOrder: CommonFields.folderSortOrder,
|
|
322
|
+
filter: CommonFields.filter,
|
|
323
|
+
udfFilter: CommonFields.udfFilter
|
|
324
|
+
});
|
|
325
|
+
const TestCaseDetailsArgsSchema = z.object({
|
|
326
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
327
|
+
baseUrl: CommonFields.baseUrl,
|
|
328
|
+
tcID: CommonFields.tcID,
|
|
329
|
+
start: CommonFields.start,
|
|
330
|
+
page: CommonFields.page,
|
|
331
|
+
limit: CommonFields.limit
|
|
332
|
+
});
|
|
333
|
+
const TestCaseVersionDetailsArgsSchema = z.object({
|
|
334
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
335
|
+
baseUrl: CommonFields.baseUrl,
|
|
336
|
+
id: CommonFields.id,
|
|
337
|
+
version: CommonFields.version,
|
|
338
|
+
scope: CommonFields.scope
|
|
339
|
+
});
|
|
340
|
+
const TestCaseStepsArgsSchema = z.object({
|
|
341
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
342
|
+
baseUrl: CommonFields.baseUrl,
|
|
343
|
+
id: CommonFields.id,
|
|
344
|
+
version: CommonFields.versionOptional,
|
|
345
|
+
start: CommonFields.start,
|
|
346
|
+
page: CommonFields.page,
|
|
347
|
+
limit: CommonFields.limit
|
|
348
|
+
});
|
|
349
|
+
const TestCaseExecutionsArgsSchema = z.object({
|
|
350
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
351
|
+
baseUrl: CommonFields.baseUrl,
|
|
352
|
+
tcid: CommonFields.tcID,
|
|
353
|
+
tcversion: CommonFields.versionOptional,
|
|
354
|
+
start: CommonFields.start,
|
|
355
|
+
page: CommonFields.page,
|
|
356
|
+
limit: CommonFields.limit,
|
|
357
|
+
scope: CommonFields.scope,
|
|
358
|
+
filter: CommonFields.filter
|
|
359
|
+
});
|
|
360
|
+
const RequirementListArgsSchema = z.object({
|
|
361
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
362
|
+
baseUrl: CommonFields.baseUrl,
|
|
363
|
+
viewId: CommonFields.rqViewId,
|
|
364
|
+
folderPath: CommonFields.rqFolderPath,
|
|
365
|
+
start: CommonFields.start,
|
|
366
|
+
page: CommonFields.page,
|
|
367
|
+
limit: CommonFields.limit,
|
|
368
|
+
scope: CommonFields.scope,
|
|
369
|
+
getSubEntities: CommonFields.getSubEntities,
|
|
370
|
+
hideEmptyFolders: CommonFields.hideEmptyFolders,
|
|
371
|
+
folderSortColumn: CommonFields.folderSortColumn,
|
|
372
|
+
folderSortOrder: CommonFields.folderSortOrder,
|
|
373
|
+
isJiraFilter: z.boolean().optional().describe("'false' if using qmetry filter").default(false),
|
|
374
|
+
filterType: z.enum(["QMETRY", "JIRA"]).optional().describe("Pass 'QMETRY' or 'JIRA'").default("QMETRY"),
|
|
375
|
+
filter: CommonFields.filter,
|
|
376
|
+
udfFilter: CommonFields.udfFilter,
|
|
377
|
+
sort: z.string().optional().describe(
|
|
378
|
+
"Sort Records - refer json schema, Possible property - name, entityKey, associatedVersion, priorityAlias, createdDate, createdByAlias, updatedDate, updatedByAlias, requirementStateAlias, linkedTcCount, linkedDfCount, attachmentCount, createdSystem, owner"
|
|
379
|
+
).default('[{"property":"name","direction":"ASC"}]')
|
|
380
|
+
});
|
|
381
|
+
const RequirementDetailsArgsSchema = z.object({
|
|
382
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
383
|
+
baseUrl: CommonFields.baseUrl,
|
|
384
|
+
id: CommonFields.rqID,
|
|
385
|
+
version: CommonFields.rqVersion
|
|
386
|
+
});
|
|
387
|
+
const RequirementsLinkedToTestCaseArgsSchema = z.object({
|
|
388
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
389
|
+
baseUrl: CommonFields.baseUrl,
|
|
390
|
+
tcID: CommonFields.tcID,
|
|
391
|
+
getLinked: z.boolean().optional().describe(
|
|
392
|
+
"True to get only requirements that are linked with this test case, false to get requirements which are not linked with this test case. Defaults to true (get linked requirements)."
|
|
393
|
+
).default(true),
|
|
394
|
+
start: CommonFields.start,
|
|
395
|
+
page: CommonFields.page,
|
|
396
|
+
limit: CommonFields.limit,
|
|
397
|
+
rqFolderPath: CommonFields.rqFolderPath,
|
|
398
|
+
filter: CommonFields.filter
|
|
399
|
+
});
|
|
400
|
+
const LinkRequirementToTestCaseArgsSchema = z.object({
|
|
401
|
+
tcID: z.string().describe("EntityKey of Testcase (e.g. 'COD-TC-29')"),
|
|
402
|
+
tcVersionId: CommonFields.tcVersionID,
|
|
403
|
+
rqVersionIds: z.string().describe(
|
|
404
|
+
"Comma-separated values of versionId of the Requirement (e.g. '236124,236125')"
|
|
405
|
+
)
|
|
406
|
+
});
|
|
407
|
+
const TestCasesLinkedToRequirementArgsSchema = z.object({
|
|
408
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
409
|
+
baseUrl: CommonFields.baseUrl,
|
|
410
|
+
rqID: CommonFields.rqID,
|
|
411
|
+
getLinked: z.boolean().optional().describe(
|
|
412
|
+
"True to get only test cases that are linked with this requirement, false to get test cases which are not linked with this requirement. Defaults to true (get linked test cases)."
|
|
413
|
+
).default(true),
|
|
414
|
+
showEntityWithReleaseCycle: z.boolean().optional().describe(
|
|
415
|
+
"True to list only test cases which have given release and cycle, false for all test cases regardless of release/cycle association. Defaults to false (show all)."
|
|
416
|
+
).default(false),
|
|
417
|
+
start: CommonFields.start,
|
|
418
|
+
page: CommonFields.page,
|
|
419
|
+
limit: CommonFields.limit,
|
|
420
|
+
tcFolderPath: z.string().optional().describe(
|
|
421
|
+
'Folder path to get test cases under specific folder. Use empty string "" for root folder or specify path like "/Sample Template".'
|
|
422
|
+
).default(""),
|
|
423
|
+
releaseID: z.string().optional().describe(
|
|
424
|
+
"Filter test cases by release ID. Use string representation of release ID (e.g., '7138'). Get release IDs from FETCH_RELEASES_AND_CYCLES tool."
|
|
425
|
+
),
|
|
426
|
+
cycleID: z.string().optional().describe(
|
|
427
|
+
"Filter test cases by cycle ID. Use string representation of cycle ID (e.g., '13382'). Get cycle IDs from FETCH_RELEASES_AND_CYCLES tool."
|
|
428
|
+
),
|
|
429
|
+
filter: CommonFields.filter,
|
|
430
|
+
getSubEntities: z.boolean().optional().describe("Allow filter of sub-entities for requirement.").default(true),
|
|
431
|
+
getColumns: z.boolean().optional().describe("True to get column information in response.").default(true)
|
|
432
|
+
});
|
|
433
|
+
const CreateTestSuiteArgsSchema = z.object({
|
|
434
|
+
parentFolderId: z.string(),
|
|
435
|
+
name: z.string(),
|
|
436
|
+
isAutomatedFlag: z.boolean().optional(),
|
|
437
|
+
description: z.string().optional(),
|
|
438
|
+
testsuiteOwner: z.number().optional(),
|
|
439
|
+
testSuiteState: z.number().optional(),
|
|
440
|
+
associateRelCyc: z.boolean().optional(),
|
|
441
|
+
releaseCycleMapping: z.array(
|
|
442
|
+
z.object({
|
|
443
|
+
buildID: z.number(),
|
|
444
|
+
releaseId: z.number()
|
|
983
445
|
})
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
446
|
+
).optional()
|
|
447
|
+
});
|
|
448
|
+
const UpdateTestSuiteArgsSchema = z.object({
|
|
449
|
+
id: z.number().describe("Id of Test Suite to be updated (required)"),
|
|
450
|
+
TsFolderID: z.number().describe("Folder ID where Test Suite resides (required)"),
|
|
451
|
+
entityKey: z.string().describe("Entity Key of Test Suite to be updated (required)"),
|
|
452
|
+
name: z.string().optional().describe("Name of the Test Suite"),
|
|
453
|
+
description: z.string().optional().describe("Description of the Test Suite"),
|
|
454
|
+
testsuiteOwner: z.number().optional().describe("Owner ID of the Test Suite"),
|
|
455
|
+
testSuiteState: z.number().optional().describe("State of the Test Suite")
|
|
456
|
+
});
|
|
457
|
+
const TestSuiteListArgsSchema = z.object({
|
|
458
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
459
|
+
baseUrl: CommonFields.baseUrl,
|
|
460
|
+
viewId: CommonFields.tsViewId,
|
|
461
|
+
folderPath: CommonFields.tsFolderPath,
|
|
462
|
+
start: CommonFields.start,
|
|
463
|
+
page: CommonFields.page,
|
|
464
|
+
limit: CommonFields.limit,
|
|
465
|
+
scope: CommonFields.scope,
|
|
466
|
+
getSubEntities: CommonFields.getSubEntities,
|
|
467
|
+
filter: CommonFields.filter,
|
|
468
|
+
udfFilter: CommonFields.udfFilter,
|
|
469
|
+
sort: z.string().optional().describe(
|
|
470
|
+
"Sort Records - refer json schema, Possible property - entityKey, name, testsuiteStatus, linkedPlatformCount, linkedTcCount, createdDate, createdByAlias, updatedDate, updatedByAlias, attachmentCount, owner, remExecutionTime, totalExecutionTime"
|
|
471
|
+
).default('[{"property":"name","direction":"ASC"}]')
|
|
472
|
+
});
|
|
473
|
+
const TestSuitesForTestCaseArgsSchema = z.object({
|
|
474
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
475
|
+
baseUrl: CommonFields.baseUrl,
|
|
476
|
+
tsFolderID: CommonFields.tsFolderID,
|
|
477
|
+
viewId: CommonFields.tsfeViewId.optional(),
|
|
478
|
+
start: CommonFields.start,
|
|
479
|
+
page: CommonFields.page,
|
|
480
|
+
limit: CommonFields.limit,
|
|
481
|
+
getColumns: CommonFields.getColumns,
|
|
482
|
+
filter: CommonFields.filter
|
|
483
|
+
});
|
|
484
|
+
const LinkTestCasesToTestSuiteArgsSchema = z.object({
|
|
485
|
+
tsID: z.number().describe("Id of Test Suite (required)"),
|
|
486
|
+
tcvdIDs: z.array(z.number()).describe(
|
|
487
|
+
"Array of Test Case Version IDs (required if fromReqs is false)"
|
|
488
|
+
),
|
|
489
|
+
fromReqs: z.boolean().optional().describe("Link TestCases from Requirements (optional, default false)")
|
|
490
|
+
}).strip();
|
|
491
|
+
const RequirementsLinkedTestCasesToTestSuiteArgsSchema = z.object({
|
|
492
|
+
tsID: z.number().describe("Id of Test Suite (required)"),
|
|
493
|
+
tcvdIDs: z.array(z.number()).describe(
|
|
494
|
+
"Array of Test Case Version IDs (required if fromReqs is true)"
|
|
495
|
+
),
|
|
496
|
+
fromReqs: z.boolean().optional().describe("Link TestCases from Requirements (optional, default true)")
|
|
497
|
+
}).strip();
|
|
498
|
+
const IssuesLinkedToTestCaseArgsSchema = z.object({
|
|
499
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
500
|
+
baseUrl: CommonFields.baseUrl,
|
|
501
|
+
tcID: CommonFields.tcID,
|
|
502
|
+
getLinked: CommonFields.getLinked.optional().default(true),
|
|
503
|
+
start: CommonFields.start,
|
|
504
|
+
page: CommonFields.page,
|
|
505
|
+
limit: CommonFields.limit,
|
|
506
|
+
filter: CommonFields.filter
|
|
507
|
+
});
|
|
508
|
+
const TestCasesByTestSuiteArgsSchema = z.object({
|
|
509
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
510
|
+
baseUrl: CommonFields.baseUrl,
|
|
511
|
+
tsID: CommonFields.tsID,
|
|
512
|
+
getLinked: CommonFields.getLinked.optional().default(true),
|
|
513
|
+
start: CommonFields.start,
|
|
514
|
+
page: CommonFields.page,
|
|
515
|
+
limit: CommonFields.limit,
|
|
516
|
+
filter: CommonFields.filter
|
|
517
|
+
});
|
|
518
|
+
const ExecutionsByTestSuiteArgsSchema = z.object({
|
|
519
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
520
|
+
baseUrl: CommonFields.baseUrl,
|
|
521
|
+
tsID: CommonFields.tsID,
|
|
522
|
+
// API payload param - sent in request body (REQUIRED)
|
|
523
|
+
tsFolderID: CommonFields.tsFolderID.optional(),
|
|
524
|
+
gridName: CommonFields.gridName,
|
|
525
|
+
viewId: CommonFields.teViewId,
|
|
526
|
+
start: CommonFields.start,
|
|
527
|
+
page: CommonFields.page,
|
|
528
|
+
limit: CommonFields.limit,
|
|
529
|
+
filter: CommonFields.filter
|
|
530
|
+
});
|
|
531
|
+
const TestCaseRunsByTestSuiteRunArgsSchema = z.object({
|
|
532
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
533
|
+
baseUrl: CommonFields.baseUrl,
|
|
534
|
+
tsrunID: CommonFields.tsrunID,
|
|
535
|
+
// API payload param - sent in request body (REQUIRED)
|
|
536
|
+
viewId: CommonFields.teViewId.pipe(z.number()),
|
|
537
|
+
// API payload param - sent in request body (REQUIRED)
|
|
538
|
+
start: CommonFields.start,
|
|
539
|
+
page: CommonFields.page,
|
|
540
|
+
limit: CommonFields.limit
|
|
541
|
+
});
|
|
542
|
+
const LinkedIssuesByTestCaseRunArgsSchema = z.object({
|
|
543
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
544
|
+
baseUrl: CommonFields.baseUrl,
|
|
545
|
+
entityId: CommonFields.entityId,
|
|
546
|
+
// API payload param - sent in request body (REQUIRED)
|
|
547
|
+
getLinked: CommonFields.getLinked,
|
|
548
|
+
getColumns: CommonFields.getColumns,
|
|
549
|
+
istcrFlag: CommonFields.istcrFlag,
|
|
550
|
+
start: CommonFields.start,
|
|
551
|
+
page: CommonFields.page,
|
|
552
|
+
limit: CommonFields.limit,
|
|
553
|
+
filter: CommonFields.filter
|
|
554
|
+
});
|
|
555
|
+
const CreateIssueArgsSchema = z.object({
|
|
556
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
557
|
+
baseUrl: CommonFields.baseUrl,
|
|
558
|
+
issueType: z.number().describe("Issue type ID (e.g. Bug, Enhancement, etc.)"),
|
|
559
|
+
issuePriority: z.number().describe("Issue priority ID (e.g. High, Medium, Low, etc.)"),
|
|
560
|
+
summary: z.string().describe("Summary or title of the defect/issue"),
|
|
561
|
+
description: z.string().optional().describe("Detailed description of the defect/issue"),
|
|
562
|
+
sync_with: z.string().optional().describe("External system to sync with (e.g. JIRA, QMetry, etc.)"),
|
|
563
|
+
issueOwner: z.number().optional().describe("Owner/user ID for the issue"),
|
|
564
|
+
component: z.array(z.number()).optional().describe("Component IDs associated with the issue"),
|
|
565
|
+
affectedRelease: z.array(z.number()).optional().describe("Release IDs affected by this issue"),
|
|
566
|
+
affectedCycles: z.array(z.number()).optional().describe("Cycle IDs affected by this issue"),
|
|
567
|
+
tcRunID: z.number().optional().describe(
|
|
568
|
+
"Test Case Run ID to link this defect/issue to a test execution (optional)"
|
|
569
|
+
)
|
|
570
|
+
});
|
|
571
|
+
const UpdateIssueArgsSchema = z.object({
|
|
572
|
+
DefectId: z.number().describe("ID of the defect/issue to be updated"),
|
|
573
|
+
entityKey: z.string().optional().describe("Entity Key of the defect/issue to be updated"),
|
|
574
|
+
issueType: z.number().optional().describe("Issue type ID (e.g. Bug, Enhancement, etc.)"),
|
|
575
|
+
issuePriority: z.number().optional().describe("Issue priority ID (e.g. High, Medium, Low, etc.)"),
|
|
576
|
+
summary: z.string().optional().describe("Summary or title of the defect/issue"),
|
|
577
|
+
description: z.string().optional().describe("Detailed description of the defect/issue"),
|
|
578
|
+
issueOwner: z.number().optional().describe("Owner/user ID for the issue"),
|
|
579
|
+
affectedRelease: z.number().optional().describe("Release IDs affected by this issue"),
|
|
580
|
+
affectedCycles: z.number().optional().describe("Cycle IDs affected by this issue")
|
|
581
|
+
});
|
|
582
|
+
const IssuesListArgsSchema = z.object({
|
|
583
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
584
|
+
baseUrl: CommonFields.baseUrl,
|
|
585
|
+
viewId: z.number().describe(
|
|
586
|
+
"ViewId for issues - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific viewId. System will fetch project info using the projectKey and extract latestViews.IS.viewId automatically. Manual viewId only needed if you want to override the automatic resolution."
|
|
587
|
+
),
|
|
588
|
+
start: CommonFields.start,
|
|
589
|
+
page: CommonFields.page,
|
|
590
|
+
limit: CommonFields.limit,
|
|
591
|
+
filter: CommonFields.filter,
|
|
592
|
+
isJiraIntegrated: z.boolean().optional().describe("Send true if current project is Integrated with Jira").default(false),
|
|
593
|
+
sort: z.string().optional().describe(
|
|
594
|
+
"Sort Records - refer json schema, Possible property - entityKey, name, typeAlias, stateAlias, createdDate, createdByAlias, updatedDate, updatedByAlias, priorityAlias, createdSystem, linkedTcrCount, linkedRqCount, dfOwner, attachmentCount, environmentText"
|
|
595
|
+
).default('[{"property":"name","direction":"ASC"}]')
|
|
596
|
+
});
|
|
597
|
+
const LinkIssuesToTestcaseRunArgsSchema = z.object({
|
|
598
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
599
|
+
baseUrl: CommonFields.baseUrl,
|
|
600
|
+
issueIds: z.array(z.union([z.string(), z.number()])).describe("ID of issues to be linked to Testcase Run"),
|
|
601
|
+
tcrId: z.number().describe("ID of Testcase Run to link issues with")
|
|
602
|
+
});
|
|
603
|
+
const LinkPlatformsToTestSuiteArgsSchema = z.object({
|
|
604
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
605
|
+
baseUrl: CommonFields.baseUrl,
|
|
606
|
+
qmTsId: z.number().describe(
|
|
607
|
+
"Id of Test Suite (required). To get the qmTsId - Call API 'Testsuite/Fetch Testsuite' From the response, get value of following attribute -> data[<index>].id"
|
|
608
|
+
),
|
|
609
|
+
qmPlatformId: z.string().describe(
|
|
610
|
+
"Comma-separated value of PlatformId (required). To get the qmPlatformId - Call API 'Platform/List' From the response, get value of following attribute -> data[<index>].platformID"
|
|
611
|
+
)
|
|
612
|
+
});
|
|
613
|
+
const BulkUpdateExecutionStatusArgsSchema = z.object({
|
|
614
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
615
|
+
baseUrl: CommonFields.baseUrl,
|
|
616
|
+
entityIDs: z.string().describe(
|
|
617
|
+
"Comma-separated IDs of Test Case Runs to update (e.g., '66095087' for single or '66095069,66095075' for bulk). To get the entityIDs - Call API 'Execution/Fetch Testcase Run ID' From the response, get value of following attribute -> data[<index>].tcRunID"
|
|
618
|
+
),
|
|
619
|
+
entityType: z.enum(["TCR", "TCSR"]).describe(
|
|
620
|
+
"Type of Entity to Execute: 'TCR' (Test Case Run) or 'TCSR' (Test Case Step Run)"
|
|
621
|
+
).default("TCR"),
|
|
622
|
+
qmTsRunId: z.string().describe(
|
|
623
|
+
"Id of Test Suite Run to execute (required). To get the qmTsRunId - Call API 'Execution/Fetch Executions' From the response, get value of following attribute -> data[<index>].tsRunID"
|
|
624
|
+
),
|
|
625
|
+
runStatusID: z.number().describe(
|
|
626
|
+
"Id of the execution status to set (required). To get the runStatusID - Call API 'Admin/Project GET info Service' From the response, get value of following attribute -> allstatus[<index>].id Common statuses: Pass, Fail, Not Run, Blocked, WIP, etc."
|
|
627
|
+
),
|
|
628
|
+
dropID: z.union([z.number(), z.string()]).optional().describe(
|
|
629
|
+
"Unique identifier of drop/build on which execution is to be performed (optional). To get the dropID - Call API 'Fetch Build/List' From the response, get value of following attribute -> data[<index>].dropID"
|
|
630
|
+
),
|
|
631
|
+
isAutoExecuted: z.enum(["0", "1"]).optional().describe("Set '1' for automated and '0' for manual Execution Type"),
|
|
632
|
+
isBulkOperation: z.boolean().optional().describe(
|
|
633
|
+
"Set true for bulk operations (multiple entityIDs), false for single execution update. Default: true if multiple comma-separated entityIDs, false otherwise"
|
|
634
|
+
),
|
|
635
|
+
comments: z.string().optional().describe("Optional comments for the execution status update"),
|
|
636
|
+
username: z.string().optional().describe(
|
|
637
|
+
"If Part 11 Compliance is active then required for authentication"
|
|
638
|
+
),
|
|
639
|
+
password: z.string().optional().describe(
|
|
640
|
+
"If Part 11 Compliance is active then required for authentication"
|
|
641
|
+
),
|
|
642
|
+
qmRunObj: z.string().optional().describe("Internal QMetry run object (optional, usually empty string)"),
|
|
643
|
+
type: z.enum(["TCR", "TCSR"]).optional().describe(
|
|
644
|
+
"Type of Entity - same as entityType (for backwards compatibility)"
|
|
645
|
+
)
|
|
646
|
+
});
|
|
647
|
+
const ImportAutomationResultsPayloadSchema = z.object({
|
|
648
|
+
// REQUIRED: File data as base64 string or file path
|
|
649
|
+
file: z.string().refine(
|
|
650
|
+
(val) => {
|
|
651
|
+
const base64Regex = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
|
|
652
|
+
const filePathRegex = /\.(json|xml|zip)$/i;
|
|
653
|
+
return base64Regex.test(val) || filePathRegex.test(val);
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
message: "Must be a valid base64 string or a file path ending with .json, .xml, or .zip"
|
|
657
|
+
}
|
|
658
|
+
).describe(
|
|
659
|
+
"Base64 encoded file content or file path. User must upload result file (.json, .xml, .zip up to 30 MB)"
|
|
660
|
+
),
|
|
661
|
+
// REQUIRED: Original filename with extension
|
|
662
|
+
fileName: z.string().describe("Original filename with extension (.json, .xml, or .zip)"),
|
|
663
|
+
// REQUIRED: Entity type (format of result file)
|
|
664
|
+
entityType: EntityTypeEnum.describe(
|
|
665
|
+
"Format of result file: TESTNG, CUCUMBER, JUNIT, HPUFT, QAF, or ROBOT"
|
|
666
|
+
),
|
|
667
|
+
// OPTIONAL: Automation hierarchy (applies to TestNG and JUnit only)
|
|
668
|
+
automationHierarchy: AutomationHierarchyEnum.optional().describe(
|
|
669
|
+
"TestNG/JUnit hierarchy: 1=Test Case-Test Step, 2=Test Case only, 3=Test Suite-Test Case. Default: 1"
|
|
670
|
+
),
|
|
671
|
+
// OPTIONAL: Test suite name
|
|
672
|
+
testsuiteName: z.string().optional().describe(
|
|
673
|
+
"Custom test suite name. Ignored if automationHierarchy=3 for JUnit or =2 for ROBOT"
|
|
674
|
+
),
|
|
675
|
+
// OPTIONAL: Test suite ID (reuse existing)
|
|
676
|
+
testsuiteId: z.string().optional().describe(
|
|
677
|
+
"Reuse existing Test Suite by ID or Entity Key. Ignored if automationHierarchy=3 for JUnit or =2 for ROBOT"
|
|
678
|
+
),
|
|
679
|
+
// OPTIONAL: Test suite folder path
|
|
680
|
+
tsFolderPath: z.string().optional().describe(
|
|
681
|
+
"Test suite folder path. Creates folder if doesn't exist. Ignored if reusing test suite"
|
|
682
|
+
),
|
|
683
|
+
// OPTIONAL: Test case folder path
|
|
684
|
+
tcFolderPath: z.string().optional().describe(
|
|
685
|
+
"Test case folder path. Creates folder if doesn't exist. Ignored if reusing test case"
|
|
686
|
+
),
|
|
687
|
+
// OPTIONAL: Platform ID or name
|
|
688
|
+
platformID: z.string().optional().describe("Platform ID or Platform Name. Default: 'No Platform'"),
|
|
689
|
+
// OPTIONAL: Project ID or key (overrides header project)
|
|
690
|
+
projectID: z.string().optional().describe(
|
|
691
|
+
"Project ID, Project Key, or Project name. Overrides project in header"
|
|
692
|
+
),
|
|
693
|
+
// OPTIONAL: Release ID or name
|
|
694
|
+
releaseID: z.string().optional().describe("Release ID or Release name. Requires projectID if provided"),
|
|
695
|
+
// OPTIONAL: Cycle ID or name
|
|
696
|
+
cycleID: z.string().optional().describe(
|
|
697
|
+
"Cycle ID or Cycle name. Requires releaseID and projectID if provided"
|
|
698
|
+
),
|
|
699
|
+
// OPTIONAL: Build ID or name
|
|
700
|
+
buildID: z.string().optional().describe("Build ID or Build name"),
|
|
701
|
+
// OPTIONAL: Test case fields (JSON format)
|
|
702
|
+
testcase_fields: z.string().optional().describe(
|
|
703
|
+
'JSON string with test case system fields and UDFs. Ignored if reusing test case. Example: {"component":["com1"], "priority":"High"}'
|
|
704
|
+
),
|
|
705
|
+
// OPTIONAL: Test suite fields (JSON format)
|
|
706
|
+
testsuite_fields: z.string().optional().describe(
|
|
707
|
+
'JSON string with test suite system fields and UDFs. Ignored if reusing test suite. Example: {"testSuiteState":"Open", "testsuiteOwner":"user"}'
|
|
708
|
+
),
|
|
709
|
+
// OPTIONAL: Skip warning about summary length
|
|
710
|
+
skipWarning: SkipWarningEnum.optional().describe(
|
|
711
|
+
"0=Fail if summary >255 chars, 1=Truncate summary to 255 chars. Default: 0"
|
|
712
|
+
),
|
|
713
|
+
// OPTIONAL: Matching requirement for test cases
|
|
714
|
+
is_matching_required: z.string().optional().describe(
|
|
715
|
+
"True=Create new TC if summary/steps don't match, False=Reuse linked TC. Default: True"
|
|
716
|
+
)
|
|
717
|
+
});
|
|
718
|
+
const FetchAutomationStatusPayloadSchema = z.object({
|
|
719
|
+
projectKey: CommonFields.projectKeyOptional,
|
|
720
|
+
baseUrl: CommonFields.baseUrl,
|
|
721
|
+
requestID: z.number().describe("Numeric request ID from import automation response")
|
|
722
|
+
});
|
|
723
|
+
export {
|
|
724
|
+
AutomationHierarchyEnum,
|
|
725
|
+
BuildArgsSchema,
|
|
726
|
+
BulkUpdateExecutionStatusArgsSchema,
|
|
727
|
+
CommonFields,
|
|
728
|
+
CreateCycleArgsSchema,
|
|
729
|
+
CreateIssueArgsSchema,
|
|
730
|
+
CreateReleaseArgsSchema,
|
|
731
|
+
CreateTestCaseArgsSchema,
|
|
732
|
+
CreateTestCaseStepSchema,
|
|
733
|
+
CreateTestSuiteArgsSchema,
|
|
734
|
+
DEFAULT_FILTER,
|
|
735
|
+
DEFAULT_FOLDER_OPTIONS,
|
|
736
|
+
DEFAULT_PAGINATION,
|
|
737
|
+
DEFAULT_SORT,
|
|
738
|
+
EntityTypeEnum,
|
|
739
|
+
ExecutionsByTestSuiteArgsSchema,
|
|
740
|
+
FetchAutomationStatusPayloadSchema,
|
|
741
|
+
ImportAutomationResultsPayloadSchema,
|
|
742
|
+
IssuesLinkedToTestCaseArgsSchema,
|
|
743
|
+
IssuesListArgsSchema,
|
|
744
|
+
LinkIssuesToTestcaseRunArgsSchema,
|
|
745
|
+
LinkPlatformsToTestSuiteArgsSchema,
|
|
746
|
+
LinkRequirementToTestCaseArgsSchema,
|
|
747
|
+
LinkTestCasesToTestSuiteArgsSchema,
|
|
748
|
+
LinkedIssuesByTestCaseRunArgsSchema,
|
|
749
|
+
PlatformArgsSchema,
|
|
750
|
+
ProjectArgsSchema,
|
|
751
|
+
ProjectListArgsSchema,
|
|
752
|
+
ReleasesCyclesArgsSchema,
|
|
753
|
+
RequirementDetailsArgsSchema,
|
|
754
|
+
RequirementListArgsSchema,
|
|
755
|
+
RequirementsLinkedTestCasesToTestSuiteArgsSchema,
|
|
756
|
+
RequirementsLinkedToTestCaseArgsSchema,
|
|
757
|
+
SkipWarningEnum,
|
|
758
|
+
TestCaseDetailsArgsSchema,
|
|
759
|
+
TestCaseExecutionsArgsSchema,
|
|
760
|
+
TestCaseListArgsSchema,
|
|
761
|
+
TestCaseRunsByTestSuiteRunArgsSchema,
|
|
762
|
+
TestCaseStepsArgsSchema,
|
|
763
|
+
TestCaseVersionDetailsArgsSchema,
|
|
764
|
+
TestCasesByTestSuiteArgsSchema,
|
|
765
|
+
TestCasesLinkedToRequirementArgsSchema,
|
|
766
|
+
TestSuiteListArgsSchema,
|
|
767
|
+
TestSuitesForTestCaseArgsSchema,
|
|
768
|
+
UpdateCycleArgsSchema,
|
|
769
|
+
UpdateIssueArgsSchema,
|
|
770
|
+
UpdateTestCaseArgsSchema,
|
|
771
|
+
UpdateTestCaseRemoveStepSchema,
|
|
772
|
+
UpdateTestSuiteArgsSchema
|
|
773
|
+
};
|