@smartbear/mcp 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +38 -11
  2. package/dist/bugsnag/client/api/index.js +2 -0
  3. package/dist/bugsnag/client/filters.js +0 -6
  4. package/dist/bugsnag/client.js +238 -380
  5. package/dist/bugsnag/input-schemas.js +51 -0
  6. package/dist/collaborator/client.js +377 -0
  7. package/dist/common/cache.js +63 -0
  8. package/dist/common/client-registry.js +128 -0
  9. package/dist/common/register-clients.js +31 -0
  10. package/dist/common/server.js +77 -28
  11. package/dist/common/transport-http.js +377 -0
  12. package/dist/common/transport-stdio.js +43 -0
  13. package/dist/index.js +18 -60
  14. package/dist/pactflow/client/tools.js +4 -4
  15. package/dist/pactflow/client.js +39 -19
  16. package/dist/qmetry/client/auto-resolve.js +22 -0
  17. package/dist/qmetry/client/handlers.js +18 -4
  18. package/dist/qmetry/client/issues.js +98 -1
  19. package/dist/qmetry/client/project.js +18 -1
  20. package/dist/qmetry/client/testcase.js +79 -1
  21. package/dist/qmetry/client/testsuite.js +156 -1
  22. package/dist/qmetry/client/tools/index.js +17 -0
  23. package/dist/qmetry/client/tools/issue-tools.js +545 -0
  24. package/dist/qmetry/client/tools/project-tools.js +348 -0
  25. package/dist/qmetry/client/tools/requirement-tools.js +530 -0
  26. package/dist/qmetry/client/tools/testcase-tools.js +526 -0
  27. package/dist/qmetry/client/tools/testsuite-tools.js +772 -0
  28. package/dist/qmetry/client/tools/types.js +1 -0
  29. package/dist/qmetry/client.js +33 -11
  30. package/dist/qmetry/config/constants.js +14 -0
  31. package/dist/qmetry/config/rest-endpoints.js +10 -0
  32. package/dist/qmetry/types/common.js +287 -2
  33. package/dist/qmetry/types/issues.js +11 -1
  34. package/dist/qmetry/types/project.js +7 -0
  35. package/dist/qmetry/types/testcase.js +6 -0
  36. package/dist/qmetry/types/testsuite.js +19 -1
  37. package/dist/reflect/client.js +10 -4
  38. package/dist/{api-hub → swagger}/client/api.js +190 -2
  39. package/dist/{api-hub → swagger}/client/configuration.js +6 -1
  40. package/dist/swagger/client/index.js +6 -0
  41. package/dist/{api-hub → swagger}/client/portal-types.js +126 -0
  42. package/dist/swagger/client/tools.js +161 -0
  43. package/dist/swagger/client/user-management-types.js +24 -0
  44. package/dist/swagger/client.js +141 -0
  45. package/dist/swagger/config-utils.js +18 -0
  46. package/dist/zephyr/client.js +44 -6
  47. package/dist/zephyr/common/api-client.js +8 -0
  48. package/dist/zephyr/common/rest-api-schemas.js +5174 -0
  49. package/dist/zephyr/tool/priority/get-priorities.js +43 -0
  50. package/dist/zephyr/tool/project/get-project.js +39 -0
  51. package/dist/zephyr/tool/project/get-projects.js +7 -13
  52. package/dist/zephyr/tool/status/get-statuses.js +49 -0
  53. package/dist/zephyr/tool/test-case/get-test-case.js +39 -0
  54. package/dist/zephyr/tool/test-case/get-test-cases.js +64 -0
  55. package/dist/zephyr/tool/test-cycle/get-test-cycle.js +39 -0
  56. package/dist/zephyr/tool/test-cycle/get-test-cycles.js +72 -0
  57. package/dist/zephyr/tool/test-execution/get-test-execution.js +39 -0
  58. package/package.json +2 -2
  59. package/dist/api-hub/client/index.js +0 -5
  60. package/dist/api-hub/client/tools.js +0 -104
  61. package/dist/api-hub/client.js +0 -98
  62. package/dist/qmetry/client/tools.js +0 -1673
  63. package/dist/zephyr/common/types.js +0 -35
  64. /package/dist/{api-hub → swagger}/client/registry-types.js +0 -0
@@ -1,1673 +0,0 @@
1
- import { QMetryToolsHandlers } from "../config/constants.js";
2
- import { BuildArgsSchema, ExecutionsByTestSuiteArgsSchema, IssuesLinkedToTestCaseArgsSchema, LinkedIssuesByTestCaseRunArgsSchema, PlatformArgsSchema, ProjectArgsSchema, ReleasesCyclesArgsSchema, RequirementDetailsArgsSchema, RequirementListArgsSchema, RequirementsLinkedToTestCaseArgsSchema, TestCaseDetailsArgsSchema, TestCaseExecutionsArgsSchema, TestCaseListArgsSchema, TestCaseRunsByTestSuiteRunArgsSchema, TestCaseStepsArgsSchema, TestCasesByTestSuiteArgsSchema, TestCasesLinkedToRequirementArgsSchema, TestCaseVersionDetailsArgsSchema, TestSuitesForTestCaseArgsSchema, } from "../types/common.js";
3
- export const TOOLS = [
4
- {
5
- title: "Set QMetry Project Info",
6
- summary: "Set current QMetry project for your account",
7
- handler: QMetryToolsHandlers.SET_PROJECT_INFO,
8
- zodSchema: ProjectArgsSchema,
9
- purpose: "Switch the active QMetry project context for the current session. " +
10
- "This tool sets the default project that will be used for all subsequent QMetry operations. " +
11
- "Essential for multi-project QMetry instances where you need to work with specific projects.",
12
- useCases: [
13
- "Switch to a specific project before performing test case operations",
14
- "Set project context for batch operations on test cases",
15
- "Configure the default project for the current session",
16
- "Validate access to a specific project before proceeding with operations",
17
- ],
18
- examples: [
19
- {
20
- description: "Set default project as active",
21
- parameters: { projectKey: "default" },
22
- expectedOutput: "Project context set to 'default' with confirmation of project details",
23
- },
24
- {
25
- description: "Switch to UT project",
26
- parameters: { projectKey: "UT" },
27
- expectedOutput: "Project context switched to 'UT' project with available configurations",
28
- },
29
- {
30
- description: "Set MAC project as active for test case operations",
31
- parameters: { projectKey: "MAC" },
32
- expectedOutput: "Project context set to 'MAC' with viewIds and folder structure",
33
- },
34
- ],
35
- hints: [
36
- "Always set the project context before performing test case operations in multi-project environments",
37
- "Use the same project key that you'll use in subsequent test case operations",
38
- "Common project keys include 'default', 'UT', 'MAC', 'VT' - check with your QMetry admin for available projects",
39
- "This operation must be performed before fetching test cases if working with non-default projects",
40
- "The project context persists for the current session until changed again",
41
- ],
42
- outputFormat: "JSON object containing project configuration details, confirmation of project switch, and available project metadata",
43
- readOnly: false,
44
- idempotent: true,
45
- },
46
- {
47
- title: "Fetch QMetry Project Info",
48
- summary: "Fetch QMetry project information including viewId and folderPath needed for other operations",
49
- handler: QMetryToolsHandlers.FETCH_PROJECT_INFO,
50
- zodSchema: ProjectArgsSchema,
51
- purpose: "Prerequisite tool that provides project configuration data required by other QMetry operations. " +
52
- "The project key to fetch info for. Use 'default' if not specified. " +
53
- "Common project keys include 'UT', 'VT', 'MAC', etc. " +
54
- "If user doesn't specify a project key, this tool will use 'default' automatically.",
55
- useCases: [
56
- "Get project configuration before fetching test cases",
57
- "Retrieve available viewIds for test case listing",
58
- "Get folderPath information for project navigation",
59
- "Validate project access and permissions",
60
- ],
61
- examples: [
62
- {
63
- description: "Get default project info",
64
- parameters: {},
65
- expectedOutput: "Project configuration with viewIds, folderPaths, and project details",
66
- },
67
- {
68
- description: "Get specific project info",
69
- parameters: { projectKey: "MAC" },
70
- expectedOutput: "MAC project configuration with available views and folders",
71
- },
72
- ],
73
- hints: [
74
- "Always call this first when user doesn't provide viewId or folderPath",
75
- "Use 'default' project key when user doesn't specify one",
76
- "Extract viewId from latestViews.TC.viewId for test case operations",
77
- "Use empty string '' as folderPath for root directory",
78
- ],
79
- outputFormat: "JSON object containing project details, viewIds, folderPaths, and project configuration",
80
- readOnly: true,
81
- idempotent: true,
82
- },
83
- {
84
- title: "Fetch Releases and Cycles",
85
- summary: "Fetch QMetry releases and cycles from the current project",
86
- handler: QMetryToolsHandlers.FETCH_RELEASES_CYCLES,
87
- zodSchema: ReleasesCyclesArgsSchema,
88
- purpose: "Retrieve release and cycle information from the current QMetry project. " +
89
- "Releases represent major versions or milestones, while cycles represent test execution phases within releases. " +
90
- "This tool provides the hierarchical structure of releases and their associated cycles.",
91
- useCases: [
92
- "Fetch associated releases and cycles of current project",
93
- "Fetch available releases and cycles of current project",
94
- "Get release and cycle information for test planning",
95
- "List all releases and cycles in a project",
96
- "Search for specific releases using release name or ID",
97
- "Fetch cycle lists based on release ID",
98
- "Search for specific cycles using cycle name or ID",
99
- "Get project structure for test planning and execution",
100
- "Retrieve release hierarchy for reporting purposes",
101
- ],
102
- examples: [
103
- {
104
- description: "Get active releases and cycles (default behavior)",
105
- parameters: {},
106
- expectedOutput: "List of active releases and cycles excluding archived ones (showArchive: false sent in payload)",
107
- },
108
- {
109
- description: "Get active/unarchived releases and cycles explicitly",
110
- parameters: { showArchive: false },
111
- expectedOutput: "List of active releases and cycles excluding archived ones (showArchive: false sent in payload)",
112
- },
113
- {
114
- description: "Get not active/archived releases and cycles",
115
- parameters: { showArchive: true },
116
- expectedOutput: "List of all releases and cycles including archived ones (showArchive: true sent in payload)",
117
- },
118
- ],
119
- hints: [
120
- "Use 'default' project key when user doesn't specify one",
121
- "PAYLOAD SCENARIOS:",
122
- "- No showArchive parameter → payload: {showArchive: false} → Returns only active releases/cycles",
123
- "- showArchive: false → payload: {showArchive: false} → Returns only active/non-archived releases/cycles",
124
- "- showArchive: true → payload: {showArchive: true} → Returns all releases/cycles including archived ones",
125
- "Default behavior always excludes archived items unless explicitly requested",
126
- "Releases contain cycles - use this hierarchy for test execution planning",
127
- "Each release can have multiple cycles representing different testing phases",
128
- ],
129
- outputFormat: "JSON object with project hierarchy containing releases and their associated cycles",
130
- readOnly: true,
131
- idempotent: true,
132
- openWorld: false,
133
- },
134
- {
135
- title: "Fetch Builds",
136
- summary: "Fetch QMetry builds from the current project",
137
- handler: QMetryToolsHandlers.FETCH_BUILDS,
138
- zodSchema: BuildArgsSchema,
139
- purpose: "Retrieve builds information from the current QMetry project. " +
140
- "Builds represent specific versions or iterations of software that can be associated with test executions. " +
141
- "This tool provides a list of builds with their metadata for test planning and execution tracking.",
142
- useCases: [
143
- "Fetch all from the current project",
144
- "Fetch all available builds for test execution planning",
145
- "Get build metadata for test run assignments",
146
- "List builds for reporting and analytics",
147
- "Filter builds by name or archive status",
148
- "Get paginated build results for large projects",
149
- "Retrieve build information for CI/CD integration",
150
- "Search for specific builds using filters",
151
- "Get build details for test execution history",
152
- ],
153
- examples: [
154
- {
155
- description: "Get all builds (default behavior)",
156
- parameters: {},
157
- expectedOutput: "List of all builds with default pagination (10 items per page)",
158
- },
159
- {
160
- description: "Get builds with custom pagination",
161
- parameters: { page: 1, limit: 10, start: 0 },
162
- expectedOutput: "List of builds with custom pagination settings",
163
- },
164
- {
165
- description: "Filter builds by name",
166
- parameters: {
167
- filter: '[{"value":"Build 1.0","type":"string","field":"name"}]',
168
- },
169
- expectedOutput: "Filtered list of builds matching the name criteria",
170
- },
171
- {
172
- description: "Filter builds by archive status",
173
- parameters: {
174
- filter: '[{"value":[1,0],"type":"list","field":"isArchived"}]',
175
- },
176
- expectedOutput: "List of builds filtered by archive status (archived and non-archived)",
177
- },
178
- ],
179
- hints: [
180
- "Use 'default' project key when user doesn't specify one",
181
- "Default pagination: start=0, page=1, limit=10",
182
- "Filter parameter should be a JSON string with filter criteria",
183
- "Common filter fields: 'name' (string), 'isArchived' (list of 0,1)",
184
- "Empty payload {} is sent when no parameters are provided",
185
- "Builds are also known as 'drops' in QMetry terminology",
186
- "Use builds for associating test executions with specific software versions",
187
- ],
188
- outputFormat: "JSON object with builds list and pagination metadata",
189
- readOnly: true,
190
- idempotent: true,
191
- openWorld: false,
192
- },
193
- {
194
- title: "Fetch Platforms",
195
- summary: "Fetch QMetry platforms from the current project",
196
- handler: QMetryToolsHandlers.FETCH_PLATFORMS,
197
- zodSchema: PlatformArgsSchema,
198
- purpose: "Retrieve platforms information from the current QMetry project. " +
199
- "Platforms represent testing environments, operating systems, browsers, or devices " +
200
- "that can be associated with test case execution and reporting. " +
201
- "This tool provides a list of platforms with their metadata for test planning and execution tracking.",
202
- useCases: [
203
- "Fetch all platforms from the current project",
204
- "Get platform metadata for test execution planning",
205
- "List platforms for test environment selection",
206
- "Filter platforms by name or properties",
207
- "Get paginated platform results for large projects",
208
- "Retrieve platform information for cross-platform testing",
209
- "Search for specific platforms using filters",
210
- "Get platform details for test execution assignment",
211
- ],
212
- examples: [
213
- {
214
- description: "Get all platforms (default behavior)",
215
- parameters: {},
216
- expectedOutput: "List of all platforms with default pagination (10 items per page)",
217
- },
218
- {
219
- description: "Get platforms with custom pagination",
220
- parameters: { page: 1, limit: 10, start: 0 },
221
- expectedOutput: "List of platforms with custom pagination settings",
222
- },
223
- {
224
- description: "Filter platforms by name",
225
- parameters: {
226
- filter: '[{"value":"Chrome","type":"string","field":"name"}]',
227
- },
228
- expectedOutput: "Filtered list of platforms matching the name criteria",
229
- },
230
- {
231
- description: "Filter platforms by archive status",
232
- parameters: {
233
- filter: '[{"value":[1,0],"type":"list","field":"isArchived"}]',
234
- },
235
- expectedOutput: "List of platforms filtered by archive status (archived and non-archived)",
236
- },
237
- {
238
- description: "Get only archived platforms",
239
- parameters: {
240
- filter: '[{"value":[1],"type":"list","field":"isArchived"}]',
241
- },
242
- expectedOutput: "List of only archived platforms",
243
- },
244
- {
245
- description: "Get only active/non-archived platforms",
246
- parameters: {
247
- filter: '[{"value":[0],"type":"list","field":"isArchived"}]',
248
- },
249
- expectedOutput: "List of only active/non-archived platforms",
250
- },
251
- {
252
- description: "Get platforms with custom sorting",
253
- parameters: {
254
- sort: '[{"property":"name","direction":"ASC"}]',
255
- },
256
- expectedOutput: "List of platforms sorted by name in ascending order",
257
- },
258
- ],
259
- hints: [
260
- "Use 'default' project key when user doesn't specify one",
261
- "Default pagination: start=0, page=1, limit=10",
262
- "Filter parameter should be a JSON string with filter criteria",
263
- "Sort parameter should be a JSON string with sort criteria",
264
- "Default sort: platformID descending",
265
- "Common filter fields: 'name' (string), 'isArchived' (list of 0,1) for archive status",
266
- "IMPORTANT: Always use 'isArchived' field for filtering by archive status, even though response shows 'isPlatformArchived'",
267
- "Archive status values: 0 = active/non-archived, 1 = archived",
268
- "Empty payload {} is sent when no parameters are provided",
269
- "Use platforms for cross-platform testing and environment selection",
270
- ],
271
- outputFormat: "JSON object with platforms list and pagination metadata",
272
- readOnly: true,
273
- idempotent: true,
274
- openWorld: false,
275
- },
276
- {
277
- title: "Fetch Test Cases",
278
- summary: "Fetch QMetry test cases - automatically handles viewId resolution based on project",
279
- handler: QMetryToolsHandlers.FETCH_TEST_CASES,
280
- zodSchema: TestCaseListArgsSchema,
281
- purpose: "Get test cases from QMetry. System automatically gets correct viewId from project info if not provided.",
282
- useCases: [
283
- "List all test cases in a project",
284
- "Search for specific test cases using filters",
285
- "Browse test cases in specific folders",
286
- "Get paginated test case results",
287
- ],
288
- examples: [
289
- {
290
- description: "Get all test cases from default project - system will auto-fetch viewId",
291
- parameters: {},
292
- expectedOutput: "List of test cases from default project with auto-resolved viewId",
293
- },
294
- {
295
- description: "Get all test cases from UT project - system will auto-fetch UT project's viewId",
296
- parameters: { projectKey: "UT" },
297
- expectedOutput: "List of test cases from UT project using UT's specific TC viewId",
298
- },
299
- {
300
- description: "Get test cases with manual viewId (skip auto-resolution)",
301
- parameters: { projectKey: "MAC", viewId: 167136, folderPath: "" },
302
- expectedOutput: "Test cases using manually specified viewId 167136",
303
- },
304
- {
305
- description: "List test cases from specific project (ex: project key can be anything (VT, UT, PROJ1, TEST9)",
306
- parameters: {
307
- projectKey: "use specific given project key",
308
- viewId: "fetch specific project given projectKey Test Case ViewId",
309
- folderPath: "",
310
- },
311
- expectedOutput: "Test cases using manually specified viewId 167136 or projectKey",
312
- },
313
- {
314
- description: "Get test cases by release/cycle filter",
315
- parameters: {
316
- projectKey: "MAC",
317
- filter: '[{"value":[55178],"type":"list","field":"release"},{"value":[111577],"type":"list","field":"cycle"}]',
318
- },
319
- expectedOutput: "Test cases associated with Release 8.12 (ID: 55178) and Cycle 8.12.1 (ID: 111577)",
320
- },
321
- {
322
- description: "Get test cases by release only",
323
- parameters: {
324
- projectKey: "MAC",
325
- filter: '[{"value":[55178],"type":"list","field":"release"}]',
326
- },
327
- expectedOutput: "All test cases associated with Release 8.12 (ID: 55178)",
328
- },
329
- {
330
- description: "Get test cases by cycle only",
331
- parameters: {
332
- projectKey: "MAC",
333
- filter: '[{"value":[111577],"type":"list","field":"cycle"}]',
334
- },
335
- expectedOutput: "All test cases associated with Cycle 8.12.1 (ID: 111577)",
336
- },
337
- {
338
- description: "Search for specific test case by entity key",
339
- parameters: {
340
- projectKey: "MAC",
341
- filter: '[{"type":"string","value":"MAC-TC-1684","field":"entityKeyId"}]',
342
- },
343
- expectedOutput: "Test cases matching the entity key criteria",
344
- },
345
- {
346
- description: "Search for multiple test cases by comma-separated entity keys",
347
- parameters: {
348
- projectKey: "MAC",
349
- filter: '[{"type":"string","value":"MAC-TC-1684,MAC-TC-1685,MAC-TC-1686","field":"entityKeyId"}]',
350
- },
351
- expectedOutput: "Test cases matching any of the specified entity keys",
352
- },
353
- ],
354
- hints: [
355
- "CRITICAL WORKFLOW: Always use the SAME projectKey for both project info and test case fetching",
356
- "Step 1: If user specifies projectKey (like 'UT', 'MAC'), use that EXACT projectKey for project info",
357
- "Step 2: Get project info using that projectKey, extract latestViews.TC.viewId",
358
- "Step 3: Use the SAME projectKey and the extracted TC viewId for fetching test cases",
359
- "Step 4: If user doesn't specify projectKey, use 'default' for both project info and test case fetching",
360
- "NEVER mix project keys - if user says 'MAC project', use projectKey='MAC' for everything",
361
- 'For search by test case key (like MAC-TC-1684), use filter: \'[{"type":"string","value":"MAC-TC-1684","field":"entityKeyId"}]\'',
362
- "RELEASE/CYCLE FILTERING: Use release and cycle IDs, not names, for filtering",
363
- 'For release filter: \'[{"value":[releaseId],"type":"list","field":"release"}]\'',
364
- 'For cycle filter: \'[{"value":[cycleId],"type":"list","field":"cycle"}]\'',
365
- 'For combined release+cycle: \'[{"value":[releaseId],"type":"list","field":"release"},{"value":[cycleId],"type":"list","field":"cycle"}]\'',
366
- "Get release/cycle IDs from FETCH_RELEASES_AND_CYCLES tool before filtering",
367
- "FILTER FIELDS: entityKeyId, priorityAlias, createdByAlias, updatedByAlias, testCaseStateAlias, testingTypeAlias, testCaseTypeAlias, componentAlias, owner, release, cycle",
368
- "SORT FIELDS: entityKey, name, associatedVersion, priorityAlias, createdDate, createdByAlias, updatedDate, updatedByAlias, testCaseStateAlias, testingTypeAlias, executionMinutes",
369
- "For multiple entity keys, use comma-separated values in filter",
370
- "Use empty string '' as folderPath for root directory",
371
- ],
372
- outputFormat: "JSON object with 'data' array containing test cases and pagination info",
373
- readOnly: true,
374
- idempotent: true,
375
- openWorld: false,
376
- },
377
- {
378
- title: "Fetch Test Case Details",
379
- summary: "Get detailed information for a specific QMetry test case by numeric ID",
380
- handler: QMetryToolsHandlers.FETCH_TEST_CASE_DETAILS,
381
- zodSchema: TestCaseDetailsArgsSchema,
382
- purpose: "Retrieve comprehensive test case information including metadata, status, and basic properties",
383
- useCases: [
384
- "Get test case details by numeric ID",
385
- "Retrieve test case metadata for reporting",
386
- "Get test case summary and properties",
387
- "Fetch test case details before accessing steps or version details",
388
- ],
389
- examples: [
390
- {
391
- description: "Get test case details by numeric ID",
392
- parameters: { tcID: 4468020 },
393
- expectedOutput: "Detailed test case information including summary, description, status",
394
- },
395
- ],
396
- hints: [
397
- "This API requires a numeric tcID parameter",
398
- "If user provides entityKey (e.g., MAC-TC-1684), first call FETCH_TEST_CASES with a filter on entityKeyId to resolve the tcID",
399
- "After resolving entityKey → tcID, call this tool with the resolved numeric tcID",
400
- "This tool provides metadata and properties; use FETCH_TEST_CASE_STEPS for step-level details",
401
- ],
402
- outputFormat: "JSON object with test case details including ID, key, summary, description, and metadata",
403
- readOnly: true,
404
- idempotent: true,
405
- },
406
- {
407
- title: "Fetch Test Case Version Details",
408
- summary: "Get QMetry test case details for a specific version by numeric ID",
409
- handler: QMetryToolsHandlers.FETCH_TEST_CASE_VERSION_DETAILS,
410
- zodSchema: TestCaseVersionDetailsArgsSchema,
411
- purpose: "Retrieve version-specific information for a test case including history and changes",
412
- useCases: [
413
- "Get specific version details of a test case",
414
- "Compare different versions of a test case",
415
- "Retrieve version history information",
416
- "Audit changes made across test case versions",
417
- ],
418
- examples: [
419
- {
420
- description: "Get version 2 details for test case ID 123",
421
- parameters: { id: 123, version: 2 },
422
- expectedOutput: "Version 2 details for test case 123",
423
- },
424
- ],
425
- hints: [
426
- "Requires numeric ID, not entityKey",
427
- "If user provides entityKey (e.g., MAC-TC-1684), first resolve it to numeric ID using FETCH_TEST_CASES",
428
- "Version defaults to 1 if not specified",
429
- "Provides version-specific metadata and history",
430
- ],
431
- outputFormat: "JSON object with version-specific test case details",
432
- readOnly: true,
433
- idempotent: true,
434
- },
435
- {
436
- title: "Fetch Test Case Steps",
437
- summary: "Get detailed test case steps for a specific test case by numeric ID",
438
- handler: QMetryToolsHandlers.FETCH_TEST_CASE_STEPS,
439
- zodSchema: TestCaseStepsArgsSchema,
440
- purpose: "Retrieve step-by-step instructions and expected results for manual execution of a test case",
441
- useCases: [
442
- "Get step-by-step instructions with expected results",
443
- "Retrieve test case execution procedure for manual runs",
444
- "Export or display detailed test steps for documentation",
445
- "Fetch steps before automation mapping",
446
- ],
447
- examples: [
448
- {
449
- description: "Get steps for test case ID 123",
450
- parameters: { id: 123 },
451
- expectedOutput: "Detailed steps with actions and expected results for test case 123",
452
- },
453
- ],
454
- hints: [
455
- "Requires numeric ID, not entityKey",
456
- "If user provides entityKey (e.g., MAC-TC-1684), resolve it first via FETCH_TEST_CASES to get the numeric ID",
457
- "Version defaults to 1 if not specified",
458
- "Use pagination for test cases with many steps",
459
- ],
460
- outputFormat: "JSON object with array of test steps including step description, expected result, and order",
461
- readOnly: true,
462
- idempotent: true,
463
- },
464
- {
465
- title: "Fetch Test Case Executions",
466
- summary: "Get execution records for a specific test case by numeric ID",
467
- handler: QMetryToolsHandlers.FETCH_TEST_CASE_EXECUTIONS,
468
- zodSchema: TestCaseExecutionsArgsSchema,
469
- purpose: "Retrieve execution history and results for a specific test case. " +
470
- "This tool provides detailed execution information including test suite names, platforms, " +
471
- "execution status, executed by, project, release, cycle, execution date, and test case versions.",
472
- useCases: [
473
- "Get execution history for a specific test case",
474
- "Retrieve test case execution results for reporting",
475
- "Filter executions by test suite, platform, or execution status",
476
- "Get execution data for test case analysis",
477
- "Monitor test case execution trends over time",
478
- "Filter executions by release, cycle, or execution date",
479
- "Get execution details for specific test case versions",
480
- "Audit test execution history for compliance",
481
- "Analyze test case execution performance across different environments",
482
- "Track test execution by specific users or teams",
483
- ],
484
- examples: [
485
- {
486
- description: "Get all executions for test case ID 1223922",
487
- parameters: { tcid: 1223922 },
488
- expectedOutput: "List of execution records for test case with execution details, status, and metadata",
489
- },
490
- {
491
- description: "Get executions for specific test case version",
492
- parameters: { tcid: 1223922, tcversion: 2 },
493
- expectedOutput: "Execution records for version 2 of the test case",
494
- },
495
- {
496
- description: "Filter executions by test suite and platform",
497
- parameters: {
498
- tcid: 1223922,
499
- filter: '[{"value":"Sample Test Suite","type":"string","field":"testSuiteName"},{"value":[12345],"type":"list","field":"platformID"}]',
500
- },
501
- expectedOutput: "Filtered execution records matching test suite and platform criteria",
502
- },
503
- {
504
- description: "Filter executions by execution status",
505
- parameters: {
506
- tcid: 1223922,
507
- filter: '[{"value":["PASS"],"type":"list","field":"executionStatus"}]',
508
- },
509
- expectedOutput: "Execution records with PASS status only",
510
- },
511
- {
512
- description: "Filter executions by release and cycle",
513
- parameters: {
514
- tcid: 1223922,
515
- filter: '[{"value":[55178],"type":"list","field":"release"},{"value":[111577],"type":"list","field":"cycle"}]',
516
- },
517
- expectedOutput: "Execution records filtered by specific release and cycle",
518
- },
519
- {
520
- description: "Filter executions by date range",
521
- parameters: {
522
- tcid: 1223922,
523
- filter: '[{"value":"2024-01-01","type":"date","field":"executedDate","comparison":"gt"},{"value":"2024-12-31","type":"date","field":"executedDate","comparison":"lt"}]',
524
- },
525
- expectedOutput: "Execution records within the specified date range",
526
- },
527
- {
528
- description: "Filter executions by user",
529
- parameters: {
530
- tcid: 1223922,
531
- filter: '[{"value":["john.doe"],"type":"list","field":"executedBy"}]',
532
- },
533
- expectedOutput: "Execution records executed by specific user",
534
- },
535
- ],
536
- hints: [
537
- "This API requires a numeric tcid parameter, not entity key",
538
- "If user provides entityKey (e.g., MAC-TC-1684), first call FETCH_TEST_CASES with filter on entityKeyId to resolve the tcid",
539
- "After resolving entityKey → tcid, call this tool with the resolved numeric tcid",
540
- "tcversion parameter is optional - omit to get executions for all versions",
541
- "",
542
- "CRITICAL WORKFLOW FOR LINKED ISSUES: When user asks 'fetch linked issues of test case [ID]' or 'linked issues of execution':",
543
- "YOU MUST FIRST get the execution data using this tool to extract tcRunID before fetching issues!",
544
- "",
545
- "COMPLETE WORKFLOW FOR TEST CASE → LINKED ISSUES:",
546
- "STEP 1: Resolve Test Case ID (if needed) - Use FETCH_TEST_CASES if user provides entity key",
547
- "STEP 2: Fetch Test Case Executions (THIS TOOL) - Input: tcid, Extract: data[].tcRunID values",
548
- "STEP 3: Fetch Linked Issues - Tool: FETCH_LINKED_ISSUES_BY_TESTCASE_RUN, Input: entityId = tcRunID",
549
- "",
550
- "ID MAPPING CRITICAL UNDERSTANDING:",
551
- "- tcid/tcID = Test Case ID (for getting execution data with this tool)",
552
- "- tcRunID = Test Case Run/Execution ID (THIS is entityId for linked issues API)",
553
- "- entityId = tcRunID (what the linked issues API actually needs)",
554
- "",
555
- "NEVER USE tcid DIRECTLY as entityId for linked issues!",
556
- "ALWAYS get tcRunID from executions and use THAT as entityId!",
557
- "",
558
- "EXAMPLE RESPONSE STRUCTURE FROM THIS TOOL:",
559
- '{ "data": [{ "tcRunID": 58312120, "testSuiteName": "Suite 1", "executionStatus": "PASS" }] }',
560
- "→ Use tcRunID (58312120) as entityId for linked issues API",
561
- "",
562
- "FILTER CAPABILITIES: Support extensive filtering by test suite, platform, status, user, release, cycle, dates, and archive status",
563
- "FILTER FIELDS: testSuiteName (string), platformID (list), executionStatus (list), executedBy (list), project (list), release (list), cycle (list), executedDate (date with comparison), isPlatformArchived (list), isTestSuiteArchived (list), executedVersion (numeric)",
564
- "DATE FILTERING: Use 'gt' (greater than) and 'lt' (less than) comparisons for executedDate field",
565
- "EXECUTION STATUS: Common values include 'PASS', 'FAIL', 'BLOCKED', 'NOT_EXECUTED', 'WIP' (verify with your QMetry instance)",
566
- "PLATFORM/SUITE ARCHIVE: Use [1,0] for both archived and non-archived, [1] for archived only, [0] for active only",
567
- "Multiple filter conditions are combined with AND logic",
568
- "Use pagination for large execution result sets (start, page, limit parameters)",
569
- "Get platform IDs from FETCH_PLATFORMS tool and release/cycle IDs from FETCH_RELEASES_AND_CYCLES tool",
570
- "This tool is essential for test execution reporting, trend analysis, and compliance auditing",
571
- "Execution data includes timestamps, user information, environment details, and test results",
572
- "Use scope parameter to define retrieval context (project, folder, release, cycle)",
573
- ],
574
- outputFormat: "JSON object with executions array containing execution records, status, timestamps, and metadata",
575
- readOnly: true,
576
- idempotent: true,
577
- },
578
- {
579
- title: "Fetch Requirements",
580
- summary: "Fetch QMetry requirements - automatically handles viewId resolution based on project",
581
- handler: QMetryToolsHandlers.FETCH_REQUIREMENTS,
582
- zodSchema: RequirementListArgsSchema,
583
- purpose: "Get requirements from QMetry. System automatically gets correct requirement viewId from project info if not provided.",
584
- useCases: [
585
- "List all requirements in a project",
586
- "Search for specific requirements using filters",
587
- "Browse requirements in specific folders",
588
- "Get paginated requirement results",
589
- "Filter requirements by name or properties",
590
- "Get requirement metadata for test planning",
591
- ],
592
- examples: [
593
- {
594
- description: "Get all requirements from default project - system will auto-fetch viewId",
595
- parameters: {},
596
- expectedOutput: "List of requirements from default project with auto-resolved viewId",
597
- },
598
- {
599
- description: "Get all requirements from UT project - system will auto-fetch UT project's viewId",
600
- parameters: { projectKey: "UT" },
601
- expectedOutput: "List of requirements from UT project using UT's specific RQ viewId",
602
- },
603
- {
604
- description: "Get requirements with manual viewId (skip auto-resolution)",
605
- parameters: {
606
- projectKey: "MAC",
607
- viewId: 7397,
608
- folderPath: "/APIARY 88",
609
- },
610
- expectedOutput: "Requirements using manually specified viewId 7397",
611
- },
612
- {
613
- description: "Search for specific requirements by entity key",
614
- parameters: {
615
- projectKey: "MAC",
616
- filter: '[{"type":"string","value":"MAC-RQ-123","field":"entityKeyId"}]',
617
- },
618
- expectedOutput: "Filtered requirements matching the entity key criteria",
619
- },
620
- {
621
- description: "Search for multiple requirements by comma-separated entity keys",
622
- parameters: {
623
- projectKey: "MAC",
624
- filter: '[{"type":"string","value":"MAC-RQ-123,MAC-RQ-456,MAC-RQ-789","field":"entityKeyId"}]',
625
- },
626
- expectedOutput: "Requirements matching any of the specified entity keys",
627
- },
628
- {
629
- description: "Filter requirements by state (e.g., Open, Approved)",
630
- parameters: {
631
- projectKey: "MAC",
632
- filter: '[{"type":"string","value":"Open","field":"requirementStateAlias"}]',
633
- },
634
- expectedOutput: "Requirements with 'Open' state",
635
- },
636
- {
637
- description: "Filter requirements by priority",
638
- parameters: {
639
- projectKey: "MAC",
640
- filter: '[{"type":"string","value":"High","field":"priorityAlias"}]',
641
- },
642
- expectedOutput: "Requirements with 'High' priority",
643
- },
644
- {
645
- description: "Filter requirements by archive status",
646
- parameters: {
647
- filter: '[{"value":[1,0],"type":"list","field":"isArchived"}]',
648
- },
649
- expectedOutput: "List of requirements filtered by archive status (archived and non-archived)",
650
- },
651
- {
652
- description: "Get only archived requirements",
653
- parameters: {
654
- filter: '[{"value":[1],"type":"list","field":"isArchived"}]',
655
- },
656
- expectedOutput: "List of only archived requirements",
657
- },
658
- {
659
- description: "Sort requirements by name in ascending order",
660
- parameters: {
661
- projectKey: "MAC",
662
- sort: '[{"property":"name","direction":"ASC"}]',
663
- },
664
- expectedOutput: "Requirements sorted alphabetically by name",
665
- },
666
- {
667
- description: "Sort requirements by creation date (newest first)",
668
- parameters: {
669
- projectKey: "MAC",
670
- sort: '[{"property":"createdDate","direction":"DESC"}]',
671
- },
672
- expectedOutput: "Requirements sorted by creation date, newest first",
673
- },
674
- {
675
- description: "Sort requirements by entity key",
676
- parameters: {
677
- projectKey: "MAC",
678
- sort: '[{"property":"entityKey","direction":"ASC"}]',
679
- },
680
- expectedOutput: "Requirements sorted by entity key (MAC-RQ-1, MAC-RQ-2, etc.)",
681
- },
682
- {
683
- description: "Sort requirements by linked test case count",
684
- parameters: {
685
- projectKey: "MAC",
686
- sort: '[{"property":"linkedTcCount","direction":"DESC"}]',
687
- },
688
- expectedOutput: "Requirements sorted by number of linked test cases, highest first",
689
- },
690
- {
691
- description: "Complex filter: Requirements by owner with specific state",
692
- parameters: {
693
- projectKey: "MAC",
694
- filter: '[{"type":"string","value":"john.doe","field":"owner"},{"type":"string","value":"Approved","field":"requirementStateAlias"}]',
695
- },
696
- expectedOutput: "Requirements owned by john.doe with 'Approved' state",
697
- },
698
- {
699
- description: "Multi-field sort: Priority first, then creation date",
700
- parameters: {
701
- projectKey: "MAC",
702
- sort: '[{"property":"priorityAlias","direction":"DESC"},{"property":"createdDate","direction":"ASC"}]',
703
- },
704
- expectedOutput: "Requirements sorted by priority (High to Low), then by creation date (oldest first)",
705
- },
706
- {
707
- description: "Filter requirements by specific release and cycle",
708
- parameters: {
709
- projectKey: "MAC",
710
- filter: '[{"value":[55178],"type":"list","field":"release"},{"value":[111577],"type":"list","field":"cycle"}]',
711
- },
712
- expectedOutput: "Requirements associated with Release 8.12 (ID: 55178) and Cycle 8.12.1 (ID: 111577)",
713
- },
714
- {
715
- description: "Filter requirements by release only",
716
- parameters: {
717
- projectKey: "MAC",
718
- filter: '[{"value":[55178],"type":"list","field":"release"}]',
719
- },
720
- expectedOutput: "All requirements associated with Release 8.12 (ID: 55178)",
721
- },
722
- ],
723
- hints: [
724
- "CRITICAL WORKFLOW: Always use the SAME projectKey for both project info and requirement fetching",
725
- "Step 1: If user specifies projectKey (like 'UT', 'MAC'), use that EXACT projectKey for project info",
726
- "Step 2: Get project info using that projectKey, extract latestViews.RQ.viewId",
727
- "Step 3: Use the SAME projectKey and the extracted RQ viewId for fetching requirements",
728
- "Step 4: If user doesn't specify projectKey, use 'default' for both project info and requirement fetching",
729
- "NEVER mix project keys - if user says 'MAC project', use projectKey='MAC' for everything",
730
- 'For search by requirement key (like MAC-RQ-123), use filter: \'[{"type":"string","value":"MAC-RQ-123","field":"entityKeyId"}]\'',
731
- 'For multiple entity keys, use comma-separated values: \'[{"type":"string","value":"MAC-RQ-123,MAC-RQ-456","field":"entityKeyId"}]\'',
732
- "Use empty string '' as folderPath for root directory",
733
- "Filter supports QMETRY and JIRA types - default is QMETRY",
734
- "FILTER FIELDS: entityKeyId, name, requirementStateAlias, priorityAlias, owner, createdByAlias, updatedByAlias, createdSystem",
735
- "SORT FIELDS: name, entityKey, associatedVersion, priorityAlias, createdDate, createdByAlias, updatedDate, updatedByAlias, requirementStateAlias, linkedTcCount, linkedDfCount, attachmentCount, createdSystem, owner",
736
- "SORT DIRECTIONS: ASC (ascending), DESC (descending)",
737
- "Multiple filters: Use array with multiple objects for AND conditions",
738
- "Multiple sort criteria: Use array with multiple objects, first takes priority",
739
- "Filter format: [{'type':'string','value':'filterValue','field':'fieldName'}]",
740
- "Sort format: [{'property':'fieldName','direction':'ASC|DESC'}]",
741
- "RELEASE/CYCLE FILTERING: Use release and cycle IDs from fetch_releases_and_cycles tool",
742
- 'For specific release: \'[{"value":[releaseId],"type":"list","field":"release"}]\'',
743
- 'For specific cycle: \'[{"value":[cycleId],"type":"list","field":"cycle"}]\'',
744
- 'For release AND cycle: \'[{"value":[releaseId],"type":"list","field":"release"},{"value":[cycleId],"type":"list","field":"cycle"}]\'',
745
- "Example: Release 8.12 (ID: 55178) + Cycle 8.12.1 (ID: 111577) = filter with both IDs",
746
- ],
747
- outputFormat: "JSON object with 'data' array containing requirements and pagination info",
748
- readOnly: true,
749
- idempotent: true,
750
- openWorld: false,
751
- },
752
- {
753
- title: "Fetch Requirement Details",
754
- summary: "Get detailed information for a specific QMetry requirement by numeric ID",
755
- handler: QMetryToolsHandlers.FETCH_REQUIREMENT_DETAILS,
756
- zodSchema: RequirementDetailsArgsSchema,
757
- purpose: "Retrieve comprehensive requirement information including metadata, status, and all fields for a specific requirement",
758
- useCases: [
759
- "Get requirement details by numeric ID",
760
- "Retrieve requirement metadata for reporting",
761
- "Get requirement summary and properties",
762
- "Fetch requirement details before linking or updating",
763
- "Access requirement field values and custom fields",
764
- "Get requirement version-specific information",
765
- ],
766
- examples: [
767
- {
768
- description: "Get requirement details by numeric ID",
769
- parameters: { id: 4791316, version: 1 },
770
- expectedOutput: "Detailed requirement information including summary, description, status, and all fields",
771
- },
772
- ],
773
- hints: [
774
- "This API requires a numeric ID parameter, not entity key",
775
- "If user provides entityKey (e.g., MAC-RQ-730), first call FETCH_REQUIREMENTS with a filter on entityKeyId to resolve the numeric ID",
776
- "After resolving entityKey → numeric ID, call this tool with the resolved numeric ID",
777
- "Version parameter is required - use 1 for the latest version unless user specifies otherwise",
778
- "This tool provides complete requirement information including all custom fields",
779
- "Use this tool to get detailed requirement information that's not available in the list view",
780
- ],
781
- outputFormat: "JSON object with requirement details including ID, key, summary, description, status, and all metadata",
782
- readOnly: true,
783
- idempotent: true,
784
- },
785
- {
786
- title: "Fetch Test Cases Linked to Requirement",
787
- summary: "Get test cases that are linked (or not linked) to a specific requirement in QMetry",
788
- handler: QMetryToolsHandlers.FETCH_TESTCASES_LINKED_TO_REQUIREMENT,
789
- zodSchema: TestCasesLinkedToRequirementArgsSchema,
790
- purpose: "Retrieve test cases that have traceability links to a specific requirement. " +
791
- "This tool is essential for requirement traceability analysis, coverage verification, " +
792
- "and impact analysis when requirements change. You can get linked or unlinked test cases, " +
793
- "filter by release/cycle, and apply various other filters for comprehensive traceability reporting.",
794
- useCases: [
795
- "Get all test cases linked to a specific requirement for traceability analysis",
796
- "Find test cases that are NOT linked to a requirement (gap analysis)",
797
- "Verify requirement coverage by checking linked test cases",
798
- "Impact analysis - see which test cases are affected when a requirement changes",
799
- "Generate traceability matrix between requirements and test cases",
800
- "Filter linked test cases by release, cycle, or other criteria",
801
- "Audit requirement-test case relationships for compliance",
802
- "Identify orphaned test cases or requirements without proper links",
803
- "Plan test execution based on requirement-test case associations",
804
- "Quality assurance - ensure all requirements have adequate test coverage",
805
- ],
806
- examples: [
807
- {
808
- description: "Get all test cases linked to requirement ID 4791316",
809
- parameters: { rqID: 4791316 },
810
- expectedOutput: "List of test cases that are linked to requirement MAC-RQ-1011",
811
- },
812
- {
813
- description: "Get test cases NOT linked to requirement (gap analysis)",
814
- parameters: { rqID: 4791316, getLinked: false },
815
- expectedOutput: "List of test cases that are NOT linked to requirement MAC-RQ-1011",
816
- },
817
- {
818
- description: "Get linked test cases filtered by specific release",
819
- parameters: { rqID: 4791316, releaseID: "55178" },
820
- expectedOutput: "Linked test cases associated with Release 8.12 (ID: 55178)",
821
- },
822
- {
823
- description: "Get linked test cases filtered by release and cycle",
824
- parameters: {
825
- rqID: 4791316,
826
- releaseID: "55178",
827
- cycleID: "111577",
828
- showEntityWithReleaseCycle: true,
829
- },
830
- expectedOutput: "Linked test cases in Release 8.12 and Cycle 8.12.1",
831
- },
832
- {
833
- description: "Get linked test cases from specific folder",
834
- parameters: {
835
- rqID: 4791316,
836
- tcFolderPath: "/Sample Template",
837
- },
838
- expectedOutput: "Linked test cases located in the '/Sample Template' folder",
839
- },
840
- {
841
- description: "Search linked test cases by entity key",
842
- parameters: {
843
- rqID: 4791316,
844
- filter: '[{"type":"string","value":"MAC-TC-1684,MAC-TC-1685","field":"entityKeyId"}]',
845
- },
846
- expectedOutput: "Linked test cases matching specific entity keys",
847
- },
848
- {
849
- description: "Filter linked test cases by priority",
850
- parameters: {
851
- rqID: 4791316,
852
- filter: '[{"type":"list","value":[1,2],"field":"priorityAlias"}]',
853
- },
854
- expectedOutput: "Linked test cases with High or Medium priority",
855
- },
856
- {
857
- description: "Filter linked test cases by status",
858
- parameters: {
859
- rqID: 4791316,
860
- filter: '[{"type":"list","value":[1,2],"field":"testCaseStateAlias"}]',
861
- },
862
- expectedOutput: "Linked test cases with Active or Review status",
863
- },
864
- {
865
- description: "Filter linked test cases by test case type",
866
- parameters: {
867
- rqID: 4791316,
868
- filter: '[{"type":"list","value":[1],"field":"testCaseTypeAlias"}]',
869
- },
870
- expectedOutput: "Linked functional test cases",
871
- },
872
- {
873
- description: "Filter linked test cases by testing type (automation)",
874
- parameters: {
875
- rqID: 4791316,
876
- filter: '[{"type":"list","value":[2],"field":"testingTypeAlias"}]',
877
- },
878
- expectedOutput: "Linked automated test cases",
879
- },
880
- {
881
- description: "Get only parameterized linked test cases",
882
- parameters: {
883
- rqID: 4791316,
884
- filter: '[{"type":"list","value":[1],"field":"isParameterized"}]',
885
- },
886
- expectedOutput: "Linked test cases that are parameterized (data-driven)",
887
- },
888
- {
889
- description: "Filter linked test cases by archive status",
890
- parameters: {
891
- rqID: 4791316,
892
- filter: '[{"type":"list","value":[0],"field":"isArchived"}]',
893
- },
894
- expectedOutput: "Active (non-archived) linked test cases",
895
- },
896
- {
897
- description: "Search linked test cases by summary content",
898
- parameters: {
899
- rqID: 4791316,
900
- filter: '[{"type":"string","value":"login","field":"summary"}]',
901
- },
902
- expectedOutput: "Linked test cases with 'login' in their summary",
903
- },
904
- {
905
- description: "Filter linked test cases by requirement version",
906
- parameters: {
907
- rqID: 4791316,
908
- filter: '[{"type":"string","value":"1","field":"rqVersion"}]',
909
- },
910
- expectedOutput: "Test cases linked to version 1 of the requirement",
911
- },
912
- {
913
- description: "Complex filter: Active, high priority, automated test cases",
914
- parameters: {
915
- rqID: 4791316,
916
- filter: '[{"type":"list","value":[0],"field":"isArchived"},{"type":"list","value":[1],"field":"priorityAlias"},{"type":"list","value":[2],"field":"testingTypeAlias"}]',
917
- },
918
- expectedOutput: "Active, high priority, automated test cases linked to requirement",
919
- },
920
- ],
921
- hints: [
922
- "This API requires a numeric rqID parameter, not entity key",
923
- "If user provides entityKey (e.g., MAC-RQ-1011), first call FETCH_REQUIREMENTS with filter on entityKeyId to resolve the numeric rqID",
924
- "After resolving entityKey → rqID, call this tool with the resolved numeric rqID",
925
- "TRACEABILITY WORKFLOW: Use this tool to establish requirement-test case traceability matrix",
926
- "getLinked=true (default): Returns test cases that ARE linked to the requirement",
927
- "getLinked=false: Returns test cases that are NOT linked to the requirement (useful for gap analysis)",
928
- "showEntityWithReleaseCycle=true: Only show test cases that have the specified release and cycle",
929
- "showEntityWithReleaseCycle=false (default): Show all test cases regardless of release/cycle",
930
- "RELEASE/CYCLE FILTERING: Use string IDs, not numeric (e.g., releaseID: '55178', cycleID: '111577')",
931
- "Get release/cycle IDs from FETCH_RELEASES_AND_CYCLES tool before filtering",
932
- "tcFolderPath: Use empty string '' for root folder or specific path like '/Sample Template'",
933
- "FILTER CAPABILITIES: Support same filters as regular test case listing",
934
- "FILTER FIELDS: summary, rqVersion, priorityAlias, testCaseStateAlias, createdByAlias, testCaseTypeAlias, testingTypeAlias, release, cycle, isArchived, isParameterized, componentAlias, entityKeyId",
935
- "PRIORITY IDs: Typically 1=High, 2=Medium, 3=Low (verify with your QMetry instance)",
936
- "STATUS IDs: Typically 1=Active, 2=Review, 3=Deprecated (verify with your QMetry instance)",
937
- "TYPE IDs: Typically 1=Functional, 2=Integration, 3=System (verify with your QMetry instance)",
938
- "TESTING TYPE IDs: Typically 1=Manual, 2=Automated (verify with your QMetry instance)",
939
- "PARAMETERIZED: 1=Yes (parameterized), 0=No (non-parameterized)",
940
- "ARCHIVED: 1=Archived, 0=Active (non-archived)",
941
- "Multiple filter conditions are combined with AND logic",
942
- "For entity key search, use comma-separated values: 'MAC-TC-1,MAC-TC-2,MAC-TC-3'",
943
- "This tool is crucial for compliance, traceability audits, and impact analysis",
944
- "Use getColumns=true to get column metadata for better result interpretation",
945
- "Pagination supported for large result sets (start, page, limit parameters)",
946
- ],
947
- outputFormat: "JSON object with test cases array, traceability information, and pagination metadata",
948
- readOnly: true,
949
- idempotent: true,
950
- },
951
- {
952
- title: "Fetch Requirements Linked to Test Case",
953
- summary: "Get requirements that are linked (or not linked) to a specific test case in QMetry",
954
- handler: QMetryToolsHandlers.FETCH_REQUIREMENTS_LINKED_TO_TESTCASE,
955
- zodSchema: RequirementsLinkedToTestCaseArgsSchema,
956
- purpose: "Retrieve requirements that have traceability links to a specific test case. " +
957
- "This tool is essential for test case traceability analysis, coverage verification, " +
958
- "and impact analysis when test cases change. You can get linked or unlinked requirements, " +
959
- "filter by various criteria for comprehensive traceability reporting.",
960
- useCases: [
961
- "Get all requirements linked to a specific test case for traceability analysis",
962
- "Find requirements that are NOT linked to a test case (gap analysis)",
963
- "Verify test case coverage by checking linked requirements",
964
- "Impact analysis - see which requirements are affected when a test case changes",
965
- "Generate traceability matrix between test cases and requirements",
966
- "Filter linked requirements by various criteria",
967
- "Audit test case-requirement relationships for compliance",
968
- "Identify orphaned requirements or test cases without proper links",
969
- "Plan requirement validation based on test case-requirement associations",
970
- "Quality assurance - ensure all test cases have proper requirement coverage",
971
- ],
972
- examples: [
973
- {
974
- description: "Get all requirements linked to test case ID 594294",
975
- parameters: { tcID: 594294 },
976
- expectedOutput: "List of requirements that are linked to test case MAC-TC-1684",
977
- },
978
- {
979
- description: "Get requirements NOT linked to test case (gap analysis)",
980
- parameters: { tcID: 594294, getLinked: false },
981
- expectedOutput: "List of requirements that are NOT linked to test case MAC-TC-1684",
982
- },
983
- {
984
- description: "Get linked requirements from specific folder",
985
- parameters: {
986
- tcID: 594294,
987
- rqFolderPath: "/CodeSnippets",
988
- },
989
- expectedOutput: "Linked requirements located in the '/CodeSnippets' folder",
990
- },
991
- {
992
- description: "Search linked requirements by entity key",
993
- parameters: {
994
- tcID: 594294,
995
- filter: '[{"type":"string","value":"MAC-RQ-730,MAC-RQ-731","field":"entityKeyId"}]',
996
- },
997
- expectedOutput: "Linked requirements matching specific entity keys",
998
- },
999
- {
1000
- description: "Filter linked requirements by status",
1001
- parameters: {
1002
- tcID: 594294,
1003
- filter: '[{"type":"list","value":[1,2],"field":"requirementStateAlias"}]',
1004
- },
1005
- expectedOutput: "Linked requirements with Open or Approved status",
1006
- },
1007
- {
1008
- description: "Filter linked requirements by priority",
1009
- parameters: {
1010
- tcID: 594294,
1011
- filter: '[{"type":"list","value":[1],"field":"priorityAlias"}]',
1012
- },
1013
- expectedOutput: "Linked requirements with High priority",
1014
- },
1015
- {
1016
- description: "Filter linked requirements by archive status",
1017
- parameters: {
1018
- tcID: 594294,
1019
- filter: '[{"type":"list","value":[0],"field":"isArchived"}]',
1020
- },
1021
- expectedOutput: "Active (non-archived) linked requirements",
1022
- },
1023
- {
1024
- description: "Search linked requirements by name content",
1025
- parameters: {
1026
- tcID: 594294,
1027
- filter: '[{"type":"string","value":"authentication","field":"name"}]',
1028
- },
1029
- expectedOutput: "Linked requirements with 'authentication' in their name",
1030
- },
1031
- {
1032
- description: "Filter linked requirements by test case version",
1033
- parameters: {
1034
- tcID: 594294,
1035
- filter: '[{"type":"string","value":"1","field":"tcVersion"}]',
1036
- },
1037
- expectedOutput: "Requirements linked to version 1 of the test case",
1038
- },
1039
- {
1040
- description: "Filter linked requirements by release and cycle",
1041
- parameters: {
1042
- tcID: 594294,
1043
- filter: '[{"type":"list","value":[55178],"field":"release"},{"type":"list","value":[111577],"field":"cycle"}]',
1044
- },
1045
- expectedOutput: "Linked requirements in Release 8.12 and Cycle 8.12.1",
1046
- },
1047
- ],
1048
- hints: [
1049
- "This API requires a numeric tcID parameter, not entity key",
1050
- "If user provides entityKey (e.g., MAC-TC-1684), first call FETCH_TEST_CASES with filter on entityKeyId to resolve the numeric tcID",
1051
- "After resolving entityKey → tcID, call this tool with the resolved numeric tcID",
1052
- "TRACEABILITY WORKFLOW: Use this tool to establish test case-requirement traceability matrix",
1053
- "getLinked=true (default): Returns requirements that ARE linked to the test case",
1054
- "getLinked=false: Returns requirements that are NOT linked to the test case (useful for gap analysis)",
1055
- "rqFolderPath: Use empty string '' for root folder or specific path like '/CodeSnippets'",
1056
- "FILTER CAPABILITIES: Support same filters as regular requirement listing",
1057
- "FILTER FIELDS: name, entityKeyId, requirementStateAlias, priorityAlias, createdByAlias, tcVersion, release, cycle, isArchived, componentAlias",
1058
- "Multiple filter conditions are combined with AND logic",
1059
- "For entity key search, use comma-separated values: 'MAC-RQ-1,MAC-RQ-2,MAC-RQ-3'",
1060
- "This tool is crucial for compliance, traceability audits, and impact analysis",
1061
- "Pagination supported for large result sets (start, page, limit parameters)",
1062
- "Use this tool to verify that test cases properly cover requirements",
1063
- "Essential for requirement validation and test case completeness analysis",
1064
- ],
1065
- outputFormat: "JSON object with requirements array, traceability information, and pagination metadata",
1066
- readOnly: true,
1067
- idempotent: true,
1068
- },
1069
- {
1070
- title: "Fetch Test Suites for Test Case",
1071
- summary: "Get test suites that can be linked to test cases in QMetry with automatic viewId resolution",
1072
- handler: QMetryToolsHandlers.FETCH_TESTSUITES_FOR_TESTCASE,
1073
- zodSchema: TestSuitesForTestCaseArgsSchema,
1074
- purpose: "Retrieve test suites available for linking with test cases. " +
1075
- "This tool helps organize test cases into test suites for better test management, " +
1076
- "execution planning, and reporting. You can filter test suites by various criteria " +
1077
- "to find the most appropriate suites for test case organization. " +
1078
- "The tsFolderID parameter is required and represents the Test Suite folder ID. " +
1079
- "The viewId parameter is automatically resolved from project info (latestViews.TSFS.viewId) " +
1080
- "if not provided, making the tool easier to use.",
1081
- useCases: [
1082
- "Get test suites available for linking with test cases",
1083
- "Find appropriate test suites for test case organization",
1084
- "Browse test suites in specific folders for better management",
1085
- "Filter test suites by release, cycle, or archive status",
1086
- "Organize test execution by grouping test cases into test suites",
1087
- "Plan test suite structure for comprehensive test coverage",
1088
- "Manage test case categorization for reporting purposes",
1089
- "Search for existing test suites before creating new ones",
1090
- "Get root test suite folder contents using project info",
1091
- ],
1092
- examples: [
1093
- {
1094
- description: "Get test suites from root folder using auto-resolved viewId",
1095
- parameters: { tsFolderID: 113557 },
1096
- expectedOutput: "List of test suites available in the root test suite folder with auto-resolved viewId",
1097
- },
1098
- {
1099
- description: "Get test suites with custom pagination and auto-resolved viewId",
1100
- parameters: { tsFolderID: 113557, page: 1, limit: 20 },
1101
- expectedOutput: "Paginated list of test suites with 20 items per page",
1102
- },
1103
- {
1104
- description: "Filter test suites by release with auto-resolved viewId",
1105
- parameters: {
1106
- tsFolderID: 113557,
1107
- filter: '[{"type":"list","value":[55178],"field":"release"}]',
1108
- },
1109
- expectedOutput: "Test suites associated with Release 8.12 (ID: 55178)",
1110
- },
1111
- {
1112
- description: "Filter test suites by cycle with auto-resolved viewId",
1113
- parameters: {
1114
- tsFolderID: 113557,
1115
- filter: '[{"type":"list","value":[111577],"field":"cycle"}]',
1116
- },
1117
- expectedOutput: "Test suites associated with Cycle 8.12.1 (ID: 111577)",
1118
- },
1119
- {
1120
- description: "Get only active (non-archived) test suites",
1121
- parameters: {
1122
- tsFolderID: 113557,
1123
- filter: '[{"value":[0],"type":"list","field":"isArchived"}]',
1124
- },
1125
- expectedOutput: "List of active test suites (not archived)",
1126
- },
1127
- {
1128
- description: "Filter test suites by release and cycle",
1129
- parameters: {
1130
- tsFolderID: 113557,
1131
- filter: '[{"type":"list","value":[55178],"field":"release"},{"type":"list","value":[111577],"field":"cycle"}]',
1132
- },
1133
- expectedOutput: "Test suites associated with both Release 8.12 (ID: 55178) and Cycle 8.12.1 (ID: 111577)",
1134
- },
1135
- {
1136
- description: "Get test suites with column information",
1137
- parameters: { tsFolderID: 113557, getColumns: true },
1138
- expectedOutput: "Test suites list with detailed column metadata for better interpretation",
1139
- },
1140
- {
1141
- description: "Search test suites from specific sub-folder with manual viewId",
1142
- parameters: { tsFolderID: 42, viewId: 104316 },
1143
- expectedOutput: "Test suites available in specific folder ID 42 for test case linking",
1144
- },
1145
- ],
1146
- hints: [
1147
- "CRITICAL: tsFolderID is REQUIRED - Test Suite folder ID will be auto-resolved if not provided",
1148
- "viewId will be AUTOMATICALLY RESOLVED from project info if not provided",
1149
- "HOW TO GET tsFolderID:",
1150
- "1. Call FETCH_PROJECT_INFO tool first to get project configuration",
1151
- "2. From the response, use rootFolders.TS.id for the root test suite folder",
1152
- "3. Example: rootFolders.TS.id = 113557 (MAC project root TS folder)",
1153
- "4. If user doesn't specify tsFolderID, automatically use rootFolders.TS.id from project info",
1154
- "VIEWID AUTO-RESOLUTION:",
1155
- "1. System automatically fetches project info using the projectKey",
1156
- "2. Extracts latestViews.TSFS.viewId automatically",
1157
- "3. Example: latestViews.TSFS.viewId = 104316 (MAC project TSFS view)",
1158
- "4. Manual viewId only needed if you want to override the automatic resolution",
1159
- "WORKFLOW: System automatically handles project info if tsFolderID or viewId is not provided",
1160
- "PROJECT INFO STRUCTURE: clientData.rootFolders.TS.id contains the root test suite folder ID",
1161
- "PROJECT INFO STRUCTURE: latestViews.TSFS.viewId contains the test suite folder view ID",
1162
- "For sub-folders: Use specific folder IDs if you know them, or call folder listing APIs",
1163
- "FILTER CAPABILITIES: Same as other QMetry list operations",
1164
- "FILTER FIELDS: release, cycle, isArchived, name, status, priority",
1165
- "RELEASE/CYCLE FILTERING: Use numeric IDs in list format (get from FETCH_RELEASES_AND_CYCLES)",
1166
- "ARCHIVE FILTERING: 0=Active, 1=Archived",
1167
- "getColumns=true provides additional metadata for result interpretation",
1168
- "Multiple filter conditions are combined with AND logic",
1169
- "Pagination supported for large result sets (start, page, limit parameters)",
1170
- "This tool helps organize test cases into logical test suites",
1171
- "Essential for test execution planning and test case management",
1172
- "Use this before creating new test suites to check existing ones",
1173
- ],
1174
- outputFormat: "JSON object with test suites array and pagination metadata",
1175
- readOnly: true,
1176
- idempotent: true,
1177
- },
1178
- {
1179
- title: "Fetch Issues Linked to Test Case",
1180
- summary: "Get issues that are linked (or not linked) to a specific test case in QMetry",
1181
- handler: QMetryToolsHandlers.FETCH_ISSUES_LINKED_TO_TESTCASE,
1182
- zodSchema: IssuesLinkedToTestCaseArgsSchema,
1183
- purpose: "Retrieve issues/defects that are linked to a specific test case. " +
1184
- "This tool provides traceability between test cases and issues, helping with " +
1185
- "defect tracking, impact analysis, and test case validation. " +
1186
- "The getLinked parameter is optional and defaults to true for fetching linked issues.",
1187
- useCases: [
1188
- "Get all issues linked to a specific test case for defect tracking",
1189
- "Find issues that are NOT linked to a test case (gap analysis)",
1190
- "Generate traceability reports between test cases and issues",
1191
- "Filter issues by type, priority, status, or owner",
1192
- "Monitor issue resolution progress for specific test cases",
1193
- "Audit issue-test case relationships for compliance",
1194
- "Filter issues by summary content or execution version",
1195
- "Get issue details for test execution planning",
1196
- "Track linkage level (Test Case vs Test Step level)",
1197
- "Quality assurance - ensure proper issue tracking",
1198
- ],
1199
- examples: [
1200
- {
1201
- description: "Get all issues linked to test case ID 4495658 (default behavior)",
1202
- parameters: { tcID: 4495658 },
1203
- expectedOutput: "List of issues linked to the test case with issue details, status, and metadata",
1204
- },
1205
- {
1206
- description: "Get all issues linked to test case ID 4495658 (explicit)",
1207
- parameters: { tcID: 4495658, getLinked: true },
1208
- expectedOutput: "List of issues linked to the test case with issue details, status, and metadata",
1209
- },
1210
- {
1211
- description: "Get issues NOT linked to test case (gap analysis)",
1212
- parameters: { tcID: 4495658, getLinked: false },
1213
- expectedOutput: "List of issues that are NOT linked to the test case",
1214
- },
1215
- {
1216
- description: "Get linked issues with pagination",
1217
- parameters: { tcID: 4495658, getLinked: true, limit: 25, page: 1 },
1218
- expectedOutput: "Paginated list of issues linked to the test case",
1219
- },
1220
- {
1221
- description: "Filter linked issues by summary content (using default getLinked=true)",
1222
- parameters: {
1223
- tcID: 4495658,
1224
- filter: '[{"value":"login","type":"string","field":"summary"}]',
1225
- },
1226
- expectedOutput: "Issues linked to test case that contain 'login' in their summary",
1227
- },
1228
- {
1229
- description: "Filter linked issues by status and priority",
1230
- parameters: {
1231
- tcID: 4495658,
1232
- getLinked: true,
1233
- filter: '[{"value":[1,2],"type":"list","field":"issueState"},{"value":[1],"type":"list","field":"issuePriority"}]',
1234
- },
1235
- expectedOutput: "High priority issues in Open or In Progress status",
1236
- },
1237
- {
1238
- description: "Filter issues by execution version",
1239
- parameters: {
1240
- tcID: 4495658,
1241
- getLinked: true,
1242
- filter: '[{"value":"2","type":"string","field":"executedVersion"}]',
1243
- },
1244
- expectedOutput: "Issues linked to version 2 of the test case execution",
1245
- },
1246
- ],
1247
- hints: [
1248
- "CRITICAL: tcID parameter is REQUIRED - this is the Test Case numeric ID",
1249
- "getLinked parameter is OPTIONAL - defaults to true if not provided",
1250
- "HOW TO GET tcID:",
1251
- "1. Call FETCH_TEST_CASES with filter on entityKeyId to resolve test case key to numeric ID",
1252
- "2. From response, use data[index].tcID field",
1253
- "3. Example: MAC-TC-1684 → tcID: 4495658",
1254
- "getLinked=true (default): Returns issues that ARE linked to the test case",
1255
- "getLinked=false: Returns issues that are NOT linked to the test case (useful for gap analysis)",
1256
- "If getLinked is not specified, it defaults to true (linked issues)",
1257
- "FILTER CAPABILITIES: Extensive filtering by issue properties",
1258
- "FILTER FIELDS: summary (string), executedVersion (string), linkageLevel (string), issueType (list), issuePriority (list), issueState (list), owner (list)",
1259
- "LINKAGE LEVEL: 'Test Case' for test case level links, 'Test Step' for step level links",
1260
- "ISSUE TYPE IDs: Typically 1=Bug, 2=Enhancement, 3=Task (verify with your QMetry instance)",
1261
- "ISSUE PRIORITY IDs: Typically 1=High, 2=Medium, 3=Low (verify with your QMetry instance)",
1262
- "ISSUE STATUS IDs: Typically 1=Open, 2=In Progress, 3=Resolved, 4=Closed (verify with your QMetry instance)",
1263
- "OWNER IDs: Use numeric user IDs from QMetry user management",
1264
- "Multiple filter conditions are combined with AND logic",
1265
- "Use pagination for large issue result sets (start, page, limit parameters)",
1266
- "This tool is essential for defect tracking and traceability audits",
1267
- "Helps establish relationships between test failures and reported issues",
1268
- "Critical for impact analysis when test cases change",
1269
- "Use for compliance reporting and quality metrics",
1270
- ],
1271
- outputFormat: "JSON object with issues array containing issue details, priorities, status, and linkage information",
1272
- readOnly: true,
1273
- idempotent: true,
1274
- },
1275
- {
1276
- title: "Fetch Test Cases Linked to Test Suite",
1277
- summary: "Get test cases that are linked (or not linked) to a specific test suite in QMetry",
1278
- handler: QMetryToolsHandlers.FETCH_TESTCASES_BY_TESTSUITE,
1279
- zodSchema: TestCasesByTestSuiteArgsSchema,
1280
- purpose: "Retrieve test cases that are linked to a specific test suite. " +
1281
- "This tool provides the ability to see which test cases belong to a test suite, " +
1282
- "helping with test execution planning, suite management, and coverage analysis. " +
1283
- "The tsID parameter represents the Test Suite ID obtained from test suite listings. " +
1284
- "The getLinked parameter is optional and defaults to true for fetching linked test cases.",
1285
- useCases: [
1286
- "Get all test cases linked to a specific test suite for execution planning",
1287
- "Find test cases that are NOT linked to a test suite (gap analysis)",
1288
- "Analyze test suite composition and coverage",
1289
- "Filter linked test cases by various criteria",
1290
- "Plan test execution based on test suite structure",
1291
- "Generate test suite reports and documentation",
1292
- "Validate test suite contents before execution",
1293
- "Manage test case organization within test suites",
1294
- "Export test suite details for external reporting",
1295
- "Verify test case assignments in test suites",
1296
- ],
1297
- examples: [
1298
- {
1299
- description: "Get all test cases linked to test suite ID 1497291 (default behavior)",
1300
- parameters: { tsID: 1497291 },
1301
- expectedOutput: "List of test cases linked to the test suite with test case details and metadata",
1302
- },
1303
- {
1304
- description: "Get all test cases linked to test suite ID 1497291 (explicit)",
1305
- parameters: { tsID: 1497291, getLinked: true },
1306
- expectedOutput: "List of test cases linked to the test suite with test case details and metadata",
1307
- },
1308
- {
1309
- description: "Get test cases NOT linked to test suite (gap analysis)",
1310
- parameters: { tsID: 1497291, getLinked: false },
1311
- expectedOutput: "List of test cases that are NOT linked to the test suite",
1312
- },
1313
- {
1314
- description: "Get linked test cases with custom pagination",
1315
- parameters: { tsID: 1497291, getLinked: true, page: 1, limit: 50 },
1316
- expectedOutput: "Paginated list of linked test cases with 50 items per page",
1317
- },
1318
- {
1319
- description: "Filter linked test cases by priority (using default getLinked=true)",
1320
- parameters: {
1321
- tsID: 1497291,
1322
- filter: '[{"value":[1,2],"type":"list","field":"priorityAlias"}]',
1323
- },
1324
- expectedOutput: "High and medium priority test cases linked to the suite",
1325
- },
1326
- {
1327
- description: "Filter linked test cases by status",
1328
- parameters: {
1329
- tsID: 1497291,
1330
- getLinked: true,
1331
- filter: '[{"value":[1],"type":"list","field":"testCaseStateAlias"}]',
1332
- },
1333
- expectedOutput: "Active test cases linked to the test suite",
1334
- },
1335
- ],
1336
- hints: [
1337
- "CRITICAL: tsID parameter is REQUIRED - this is the Test Suite numeric ID",
1338
- "getLinked parameter is OPTIONAL - defaults to true if not provided",
1339
- "HOW TO GET tsID:",
1340
- "1. Call API 'Testsuite/Fetch Testsuite' to get available test suites",
1341
- "2. From the response, get value of following attribute -> data[<index>].id",
1342
- "3. Example: Test Suite 'Regression Suite' might have ID 1497291",
1343
- "tsID is NOT the same as tsFolderID - tsID refers to a specific test suite, not a folder",
1344
- "getLinked=true (default): Returns test cases that ARE linked to the test suite",
1345
- "getLinked=false: Returns test cases that are NOT linked to the test suite (useful for gap analysis)",
1346
- "If getLinked is not specified, it defaults to true (linked test cases)",
1347
- "FILTER CAPABILITIES: Support filtering by test case properties",
1348
- "FILTER FIELDS: priorityAlias (list), testCaseStateAlias (list), testingTypeAlias (list), testCaseTypeAlias (list), componentAlias (list), owner (list)",
1349
- "PRIORITY IDs: Typically 1=High, 2=Medium, 3=Low (verify with your QMetry instance)",
1350
- "STATUS IDs: Typically 1=Active, 2=Review, 3=Deprecated (verify with your QMetry instance)",
1351
- "TESTING TYPE IDs: Typically 1=Manual, 2=Automated (verify with your QMetry instance)",
1352
- "TYPE IDs: Typically 1=Functional, 2=Integration, 3=System (verify with your QMetry instance)",
1353
- "Multiple filter conditions are combined with AND logic",
1354
- "Use pagination for large result sets (start, page, limit parameters)",
1355
- "This tool is essential for test suite management and execution planning",
1356
- "Helps verify test suite composition before test runs",
1357
- "Critical for understanding test coverage within specific suites",
1358
- "Use for test suite analysis and optimization",
1359
- ],
1360
- outputFormat: "JSON object with test cases array containing test case details, properties, and suite linkage information",
1361
- readOnly: true,
1362
- idempotent: true,
1363
- },
1364
- {
1365
- title: "Fetch Executions by Test Suite",
1366
- summary: "Get executions for a given test suite in QMetry",
1367
- handler: QMetryToolsHandlers.FETCH_EXECUTIONS_BY_TESTSUITE,
1368
- zodSchema: ExecutionsByTestSuiteArgsSchema,
1369
- purpose: "Retrieve test executions that belong to a specific test suite. " +
1370
- "This tool provides comprehensive execution data including test results, " +
1371
- "execution status, platforms, releases, cycles, and other execution metadata. " +
1372
- "Essential for test execution reporting, trend analysis, and test suite performance monitoring.",
1373
- useCases: [
1374
- "Get all executions for a specific test suite for reporting purposes",
1375
- "Analyze test execution results and trends within a test suite",
1376
- "Filter executions by release, cycle, platform, or automation status",
1377
- "Monitor test suite execution performance across different environments",
1378
- "Generate execution reports for specific test suites",
1379
- "Track execution history and patterns for test suite optimization",
1380
- "Validate test suite execution coverage across releases and cycles",
1381
- "Audit test execution data for compliance and quality assurance",
1382
- "Export execution data for external reporting and analytics",
1383
- ],
1384
- examples: [
1385
- {
1386
- description: "Get all executions for test suite ID 194955",
1387
- parameters: { tsID: 194955 },
1388
- expectedOutput: "List of executions for the test suite with execution details, status, and metadata",
1389
- },
1390
- {
1391
- description: "Get executions with test suite folder and view ID",
1392
- parameters: {
1393
- tsID: 194955,
1394
- tsFolderID: 126554,
1395
- viewId: 41799,
1396
- },
1397
- expectedOutput: "Executions filtered by test suite folder and specific view configuration",
1398
- },
1399
- {
1400
- description: "Filter executions by release and cycle",
1401
- parameters: {
1402
- tsID: 194955,
1403
- filter: '[{"type":"list","value":[55178],"field":"releaseID"},{"type":"list","value":[111577],"field":"cycleID"}]',
1404
- },
1405
- expectedOutput: "Executions filtered by specific release (55178) and cycle (111577)",
1406
- },
1407
- {
1408
- description: "Filter executions by platform and automation status",
1409
- parameters: {
1410
- tsID: 194955,
1411
- filter: '[{"type":"list","value":[12345],"field":"platformID"},{"type":"boolean","value":true,"field":"isAutomatedFlag"}]',
1412
- },
1413
- expectedOutput: "Automated executions filtered by specific platform (12345)",
1414
- },
1415
- {
1416
- description: "Get only active (non-archived) executions",
1417
- parameters: {
1418
- tsID: 194955,
1419
- filter: '[{"value":[0],"type":"list","field":"isArchived"}]',
1420
- },
1421
- expectedOutput: "Active executions that are not archived",
1422
- },
1423
- {
1424
- description: "Get executions with custom pagination and grid name",
1425
- parameters: {
1426
- tsID: 194955,
1427
- gridName: "TESTEXECUTIONLIST",
1428
- page: 1,
1429
- limit: 25,
1430
- },
1431
- expectedOutput: "Paginated list of executions with 25 items per page using specific grid configuration",
1432
- },
1433
- ],
1434
- hints: [
1435
- "CRITICAL: tsID parameter is REQUIRED - this is the Test Suite numeric ID",
1436
- "HOW TO GET tsID:",
1437
- "1. Call API 'Testsuite/Fetch Testsuite' to get available test suites",
1438
- "2. From the response, get value of following attribute -> data[<index>].id",
1439
- "3. Example: Test Suite 'Regression Suite' might have ID 194955",
1440
- "HOW TO GET tsFolderID (optional):",
1441
- "1. Call API 'Testsuite/List of folders' to get test suite folders",
1442
- "2. From the response, get value of following attribute -> data[<index>].id",
1443
- "3. Example: Test Suite folder might have ID 126554",
1444
- "FILTER CAPABILITIES: Extensive filtering by execution properties",
1445
- "FILTER FIELDS: releaseID (list), cycleID (list), platformID (list), isAutomatedFlag (boolean), isArchived (list)",
1446
- "RELEASE/CYCLE FILTERING: Use numeric IDs in list format (get from FETCH_RELEASES_AND_CYCLES)",
1447
- "PLATFORM FILTERING: Use numeric platform IDs (get from FETCH_PLATFORMS)",
1448
- "AUTOMATION STATUS: Use boolean true/false for isAutomatedFlag field",
1449
- "ARCHIVE STATUS: 0=Active executions, 1=Archived executions",
1450
- "GRID NAME: Default is 'TESTEXECUTIONLIST' - used for execution list display configuration",
1451
- "VIEW ID: Optional numeric identifier for specific execution view configurations",
1452
- "Multiple filter conditions are combined with AND logic",
1453
- "Use pagination for large execution result sets (start, page, limit parameters)",
1454
- "This tool is essential for test execution analysis and reporting",
1455
- "Critical for monitoring test suite performance and execution trends",
1456
- "Use for compliance reporting and execution audit trails",
1457
- "Essential for test execution planning and resource optimization",
1458
- ],
1459
- outputFormat: "JSON object with executions array containing execution details, status, platforms, releases, and execution metadata",
1460
- readOnly: true,
1461
- idempotent: true,
1462
- },
1463
- {
1464
- title: "Fetch Test Case Runs by Test Suite Run",
1465
- summary: "Get test case runs under a specific test suite run execution in QMetry",
1466
- handler: QMetryToolsHandlers.FETCH_TESTCASE_RUNS_BY_TESTSUITE_RUN,
1467
- zodSchema: TestCaseRunsByTestSuiteRunArgsSchema,
1468
- purpose: "Retrieve detailed test case run information for a specific test suite run execution. " +
1469
- "This tool provides comprehensive test case run data including execution status, " +
1470
- "test results, tester information, execution dates, and other run metadata. " +
1471
- "Essential for detailed execution analysis, test run reporting, and execution audit trails. " +
1472
- "NOTE: Uses simplified payload structure with only essential parameters (start, page, limit, tsrunID, viewId).",
1473
- useCases: [
1474
- "Get all test case runs under a specific test suite run execution",
1475
- "Analyze individual test case execution results and status",
1476
- "Monitor test case run performance and execution trends",
1477
- "Generate detailed test execution reports for specific runs",
1478
- "Track test case run history and execution patterns",
1479
- "Validate test case run coverage and execution completeness",
1480
- "Audit test case run data for compliance and quality assurance",
1481
- "Export detailed test case run data for external reporting",
1482
- "Retrieve paginated test case run results for large test suite executions",
1483
- ],
1484
- examples: [
1485
- {
1486
- description: "Get all test case runs for test suite run ID '107021'",
1487
- parameters: { tsrunID: "107021", viewId: 6887 },
1488
- expectedOutput: "List of test case runs with execution details, status, and metadata",
1489
- },
1490
- {
1491
- description: "Get test case runs with linked defects",
1492
- parameters: {
1493
- tsrunID: "107021",
1494
- viewId: 6887,
1495
- page: 1,
1496
- limit: 25,
1497
- },
1498
- expectedOutput: "Paginated list of test case runs with 25 items per page",
1499
- },
1500
- {
1501
- description: "Get test case runs for test suite run ID '2362144'",
1502
- parameters: {
1503
- tsrunID: "2362144",
1504
- viewId: 104123,
1505
- start: 0,
1506
- page: 1,
1507
- limit: 10,
1508
- },
1509
- expectedOutput: "Test case runs from the specified test suite run execution",
1510
- },
1511
- ],
1512
- hints: [
1513
- "CRITICAL: tsrunID and viewId parameters are REQUIRED",
1514
- "tsrunID is a STRING identifier for the test suite run execution",
1515
- "viewId is a NUMERIC identifier for the test execution view",
1516
- "HOW TO GET tsrunID:",
1517
- "1. Call API 'Execution/Fetch Executions' to get available executions",
1518
- "2. From the response, get value of following attribute -> data[<index>].tsRunID",
1519
- "3. Example: Test Suite Run might have ID '107021'",
1520
- "HOW TO GET viewId:",
1521
- "1. Call API 'Admin/Get info Service' to get project info",
1522
- "2. From the response, get value of following attribute -> latestViews.TE.viewId",
1523
- "3. Example: Test Execution view might have ID 6887",
1524
- "SIMPLIFIED PAYLOAD: API only accepts essential parameters",
1525
- "SUPPORTED PARAMETERS: start, page, limit, tsrunID, viewId",
1526
- "REMOVED PARAMETERS: filter, sort, showTcWithDefects, udfFilter (cause API errors)",
1527
- "PAGINATION: Use start, page, and limit for result pagination",
1528
- "API REQUIREMENT: Must use exact payload structure that works in Postman",
1529
- 'PAYLOAD FORMAT: {"start": 0, "page": 1, "limit": 10, "tsrunID": "2362144", "viewId": 104123}',
1530
- "Use pagination for large result sets (start, page, limit parameters)",
1531
- "This tool is essential for detailed test execution analysis and reporting",
1532
- "Critical for monitoring individual test case execution performance",
1533
- "Use for compliance reporting and execution audit trails",
1534
- "Essential for test execution quality assurance and trend analysis",
1535
- ],
1536
- outputFormat: "JSON object with test case runs array containing detailed execution information, status, tester details, and run metadata",
1537
- readOnly: true,
1538
- idempotent: true,
1539
- },
1540
- {
1541
- title: "Fetch Linked Issues of Test Case Run",
1542
- summary: "Get issues that are linked (or not linked) to a specific test case run in QMetry",
1543
- handler: QMetryToolsHandlers.FETCH_LINKED_ISSUES_BY_TESTCASE_RUN,
1544
- zodSchema: LinkedIssuesByTestCaseRunArgsSchema,
1545
- purpose: "CRITICAL: This tool requires entityId which is the Test Case Run ID (tcRunID), NOT any other ID! " +
1546
- "When user asks for 'linked issues of test execution' or 'linked issues of test suite' or 'linked issues of test run', " +
1547
- "you MUST first fetch the test run data to get the proper tcRunID values, then use those as entityId. " +
1548
- "NEVER use user-provided IDs directly as entityId without validation! " +
1549
- "This tool retrieves issues linked to specific test case runs for defect tracking and traceability analysis.",
1550
- useCases: [
1551
- "Get all issues linked to a specific test case run for defect tracking",
1552
- "Find issues that are NOT linked to a test case run (gap analysis)",
1553
- "Generate defect reports and traceability matrix for test case runs",
1554
- "Monitor issue resolution progress for specific test case executions",
1555
- "Analyze test execution quality by examining linked defects",
1556
- "Filter issues by type, priority, status, or owner for test case runs",
1557
- "Audit issue-test case run relationships for compliance",
1558
- "Track defect lifecycle in relation to test execution results",
1559
- "Quality assurance - ensure proper issue tracking for failed test runs",
1560
- "Impact analysis - see which issues affect specific test executions",
1561
- ],
1562
- examples: [
1563
- {
1564
- description: "Get all issues linked to test case run ID 1121218",
1565
- parameters: {
1566
- entityId: 1121218,
1567
- getColumns: true,
1568
- getLinked: true,
1569
- },
1570
- expectedOutput: "List of issues linked to the test case run with issue details, status, and metadata",
1571
- },
1572
- {
1573
- description: "Get issues NOT linked to test case run (gap analysis)",
1574
- parameters: {
1575
- entityId: 1121218,
1576
- getColumns: true,
1577
- getLinked: false,
1578
- },
1579
- expectedOutput: "List of issues that are NOT linked to test case run for gap analysis",
1580
- },
1581
- {
1582
- description: "Filter linked issues by issue type and status",
1583
- parameters: {
1584
- entityId: 1121218,
1585
- getColumns: true,
1586
- getLinked: true,
1587
- filter: '[{"type":"list","value":[1],"field":"typeAlias"},{"type":"list","value":[1,2],"field":"stateAlias"}]',
1588
- },
1589
- expectedOutput: "Bug type issues in Open or In Progress status",
1590
- },
1591
- {
1592
- description: "Search linked issues by name and priority",
1593
- parameters: {
1594
- entityId: 1121218,
1595
- getColumns: true,
1596
- getLinked: true,
1597
- filter: '[{"type":"string","value":"login","field":"name"},{"type":"list","value":[1],"field":"priorityAlias"}]',
1598
- },
1599
- expectedOutput: "High priority issues containing 'login' in their name",
1600
- },
1601
- {
1602
- description: "Filter issues by date range and entity key",
1603
- parameters: {
1604
- entityId: 1121218,
1605
- getColumns: true,
1606
- getLinked: true,
1607
- filter: '[{"value":"2024-01-01","type":"date","field":"createdDate","comparison":"gt"},{"value":"2024-12-31","type":"date","field":"createdDate","comparison":"lt"},{"type":"string","value":"BUG-001,BUG-002","field":"entityKeyId"}]',
1608
- },
1609
- expectedOutput: "Specific issues created within date range",
1610
- },
1611
- {
1612
- description: "Filter issues by owner and created system",
1613
- parameters: {
1614
- entityId: 1121218,
1615
- getColumns: true,
1616
- getLinked: true,
1617
- filter: '[{"type":"list","value":[123],"field":"dfOwner"},{"type":"list","value":["QMetry"],"field":"createdSystem"}]',
1618
- },
1619
- expectedOutput: "Issues owned by specific user and created in QMetry",
1620
- },
1621
- ],
1622
- hints: [
1623
- "WORKFLOW CRITICAL: NEVER use user-provided IDs directly as entityId!",
1624
- "ALWAYS fetch execution data first to get proper tcRunID values!",
1625
- "",
1626
- "WHEN USER ASKS: 'fetch linked issues of test suite [ID]' OR 'linked issues of test run [ID]':",
1627
- "STEP 1: Identify what type of ID the user provided",
1628
- "STEP 2A: If Test Suite ID → fetch executions by test suite → get tsRunID → fetch test runs → get tcRunID",
1629
- "STEP 2B: If Test Run ID → fetch test case runs by test suite run → get tcRunID",
1630
- "STEP 2C: If Test Case ID → fetch test case executions → get tcRunID",
1631
- "STEP 3: Use tcRunID as entityId for this tool",
1632
- "",
1633
- "ID HIERARCHY: Test Suite → Test Suite Runs → Test Case Runs (tcRunID = entityId)",
1634
- "ID HIERARCHY: Test Case → Test Case Executions (tcRunID = entityId)",
1635
- "",
1636
- "CRITICAL: entityId parameter is REQUIRED - this is the Test Case Run numeric ID (tcRunID)",
1637
- "HOW TO GET entityId:",
1638
- "1. Call appropriate execution APIs to get test case runs",
1639
- "2. From the response, extract data[<index>].tcRunID",
1640
- "3. Use tcRunID as entityId for this tool",
1641
- "4. Example: tcRunID 1121218 becomes entityId: 1121218",
1642
- "",
1643
- "getLinked=true (default): Returns issues that ARE linked to the test case run",
1644
- "getLinked=false: Returns issues that are NOT linked to the test case run (useful for gap analysis)",
1645
- "istcrFlag=true (default): Set to true for test case run operations",
1646
- "getColumns=true (default): Include column metadata in response",
1647
- "",
1648
- "FILTER CAPABILITIES: Support extensive filtering by issue properties",
1649
- "FILTER FIELDS: name (string), typeAlias (list), stateAlias (list), entityKeyId (string), createdDate (date with comparison), createdByAlias (list), updatedDate (date with comparison), createdSystem (list), updatedByAlias (list), dfOwner (list), priorityAlias (list), linkedTcrCount (numeric), linkedRqCount (numeric), attachmentCount (numeric), componentAlias (list), environmentText (string), affectedRelease (list)",
1650
- "ISSUE TYPE IDs: Typically 1=Bug, 2=Enhancement, 3=Task (verify with your QMetry instance)",
1651
- "ISSUE STATE IDs: Typically 1=Open, 2=In Progress, 3=Resolved, 4=Closed (verify with your QMetry instance)",
1652
- "ISSUE PRIORITY IDs: Typically 1=High, 2=Medium, 3=Low (verify with your QMetry instance)",
1653
- "DATE FILTERING: Use 'gt' (greater than) and 'lt' (less than) comparisons for date fields",
1654
- "ENTITY KEY SEARCH: Use comma-separated values for multiple issue keys",
1655
- "CREATED SYSTEM: Use 'QMetry' or 'JIRA' to filter by creation system",
1656
- "OWNER IDs: Use numeric user IDs from QMetry user management",
1657
- "COMPONENT/LABEL IDs: Use numeric IDs for component/label filtering",
1658
- "ENVIRONMENT TEXT: Filter by environment description text",
1659
- "AFFECTED RELEASE: Use release IDs for filtering by affected releases",
1660
- "LINKED COUNT FILTERS: Use numeric values for linkedTcrCount, linkedRqCount, attachmentCount",
1661
- "Multiple filter conditions are combined with AND logic",
1662
- "Use pagination for large result sets (start, page, limit parameters)",
1663
- "This tool is essential for defect tracking and traceability audits",
1664
- "Critical for understanding test execution quality and issue relationships",
1665
- "Use for compliance reporting and issue lifecycle management",
1666
- "Helps establish relationships between test failures and reported issues",
1667
- "Essential for impact analysis when test case runs change or fail",
1668
- ],
1669
- outputFormat: "JSON object with issues array containing issue details, priorities, status, owner information, and linkage metadata",
1670
- readOnly: true,
1671
- idempotent: true,
1672
- },
1673
- ];