@smartbear/mcp 0.11.0 → 0.12.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 +1 -1
- package/dist/bugsnag/client/api/Error.js +52 -14
- package/dist/bugsnag/client/api/Project.js +193 -8
- package/dist/bugsnag/client/api/api.js +130 -3
- package/dist/bugsnag/client/api/base.js +19 -0
- package/dist/bugsnag/client/api/index.js +1 -1
- package/dist/bugsnag/client.js +527 -20
- package/dist/bugsnag/input-schemas.js +14 -6
- package/dist/common/transport-stdio.js +5 -0
- package/dist/qmetry/client/auto-resolve.js +10 -0
- package/dist/qmetry/client/automation.js +171 -0
- package/dist/qmetry/client/handlers.js +9 -2
- package/dist/qmetry/client/project.js +87 -1
- package/dist/qmetry/client/testsuite.js +37 -1
- package/dist/qmetry/client/tools/automation-tools.js +290 -0
- package/dist/qmetry/client/tools/index.js +3 -0
- package/dist/qmetry/client/tools/issue-tools.js +1 -1
- package/dist/qmetry/client/tools/project-tools.js +311 -1
- package/dist/qmetry/client/tools/requirement-tools.js +1 -1
- package/dist/qmetry/client/tools/testcase-tools.js +311 -39
- package/dist/qmetry/client/tools/testsuite-tools.js +337 -23
- package/dist/qmetry/config/constants.js +6 -0
- package/dist/qmetry/config/rest-endpoints.js +8 -0
- package/dist/qmetry/types/automation.js +8 -0
- package/dist/qmetry/types/common.js +299 -4
- package/dist/qmetry/types/issues.js +5 -0
- package/dist/qmetry/types/project.js +13 -0
- package/dist/qmetry/types/requirements.js +5 -0
- package/dist/qmetry/types/testcase.js +5 -0
- package/dist/qmetry/types/testsuite.js +9 -0
- package/dist/swagger/client/api.js +93 -36
- package/dist/swagger/client/configuration.js +3 -1
- package/dist/swagger/client/portal-types.js +7 -6
- package/dist/swagger/client/registry-types.js +26 -0
- package/dist/swagger/client/tools.js +15 -16
- package/dist/swagger/client.js +6 -6
- package/dist/tests/unit/bugsnag/utils/factories.js +86 -0
- package/dist/zephyr/client.js +4 -0
- package/dist/zephyr/tool/environment/get-environments.js +68 -0
- package/dist/zephyr/tool/test-execution/get-test-executions.js +45 -0
- package/package.json +3 -2
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { QMetryToolsHandlers } from "../../config/constants.js";
|
|
2
|
+
import { FetchAutomationStatusPayloadSchema, ImportAutomationResultsPayloadSchema, } from "../../types/common.js";
|
|
3
|
+
export const AUTOMATION_TOOLS = [
|
|
4
|
+
{
|
|
5
|
+
handler: QMetryToolsHandlers.IMPORT_AUTOMATION_RESULTS,
|
|
6
|
+
title: "Import Automation Test Results",
|
|
7
|
+
summary: "Import/Publish automation test results from TestNG, JUnit, Cucumber, Robot, HPUFT, or QAF frameworks into QMetry",
|
|
8
|
+
purpose: "Upload and import automation test result files to create test suites, test cases, and execution records in QMetry",
|
|
9
|
+
inputSchema: ImportAutomationResultsPayloadSchema,
|
|
10
|
+
useCases: [
|
|
11
|
+
"1. Import TestNG XML results after CI/CD pipeline execution",
|
|
12
|
+
"2. Publish JUnit test results to QMetry for tracking and reporting",
|
|
13
|
+
"3. Upload Cucumber JSON results with custom test suite organization",
|
|
14
|
+
"4. Import Robot Framework results with specific release/cycle mapping",
|
|
15
|
+
"5. Link automation results to existing test suites for version tracking",
|
|
16
|
+
"6. Create new test suites with custom names and folder structures",
|
|
17
|
+
"7. Map test results to specific platforms (browsers, OS, devices)",
|
|
18
|
+
"8. Associate imported results with releases, cycles, and builds",
|
|
19
|
+
"9. Bulk import multiple test results from ZIP archive",
|
|
20
|
+
"10. Configure test case/suite fields and user-defined fields during import",
|
|
21
|
+
],
|
|
22
|
+
examples: [
|
|
23
|
+
{
|
|
24
|
+
description: "Basic TestNG result import",
|
|
25
|
+
parameters: {
|
|
26
|
+
file: "<base64_encoded_testng_xml_content>",
|
|
27
|
+
fileName: "testng-results.xml",
|
|
28
|
+
entityType: "TESTNG",
|
|
29
|
+
},
|
|
30
|
+
expectedOutput: "Auto-generated test suite created with UTC timestamp, test cases auto-linked, execution results updated, 'No Platform' linked",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
description: "JUnit results with custom test suite name",
|
|
34
|
+
parameters: {
|
|
35
|
+
file: "<base64_encoded_junit_xml_content>",
|
|
36
|
+
fileName: "junit-results.xml",
|
|
37
|
+
entityType: "JUNIT",
|
|
38
|
+
testsuiteName: "Regression Suite - Build 123",
|
|
39
|
+
automationHierarchy: "1",
|
|
40
|
+
},
|
|
41
|
+
expectedOutput: "Test suite 'Regression Suite - Build 123' created with Test Case-Test Step hierarchy",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
description: "Cucumber results with platform and release mapping",
|
|
45
|
+
parameters: {
|
|
46
|
+
file: "<base64_encoded_cucumber_json_content>",
|
|
47
|
+
fileName: "cucumber-results.json",
|
|
48
|
+
entityType: "CUCUMBER",
|
|
49
|
+
platformID: "Chrome 120",
|
|
50
|
+
releaseID: "Release 2.0",
|
|
51
|
+
cycleID: "Sprint 15",
|
|
52
|
+
testsuiteName: "API Automation Tests",
|
|
53
|
+
},
|
|
54
|
+
expectedOutput: "Test suite created, linked to Chrome platform, Release 2.0, and Sprint 15 cycle",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
description: "Reuse existing test suite",
|
|
58
|
+
parameters: {
|
|
59
|
+
file: "<base64_encoded_testng_xml_content>",
|
|
60
|
+
fileName: "testng-regression.xml",
|
|
61
|
+
entityType: "TESTNG",
|
|
62
|
+
testsuiteId: "PROJ-TS-42",
|
|
63
|
+
},
|
|
64
|
+
expectedOutput: "Test cases auto-linked to existing test suite PROJ-TS-42, execution results updated",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
description: "Import with folder organization",
|
|
68
|
+
parameters: {
|
|
69
|
+
file: "<base64_encoded_junit_xml_content>",
|
|
70
|
+
fileName: "junit-results.xml",
|
|
71
|
+
entityType: "JUNIT",
|
|
72
|
+
tsFolderPath: "/Automation/Regression",
|
|
73
|
+
tcFolderPath: "/Automation/API Tests",
|
|
74
|
+
testsuiteName: "API Regression Suite",
|
|
75
|
+
},
|
|
76
|
+
expectedOutput: "Test suite created in '/Automation/Regression' folder, test cases in '/Automation/API Tests' folder",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
description: "Import with test case custom fields",
|
|
80
|
+
parameters: {
|
|
81
|
+
file: "<base64_encoded_testng_xml_content>",
|
|
82
|
+
fileName: "testng-results.xml",
|
|
83
|
+
entityType: "TESTNG",
|
|
84
|
+
testcase_fields: JSON.stringify({
|
|
85
|
+
priority: "High",
|
|
86
|
+
testCaseType: "Automated",
|
|
87
|
+
component: ["API", "Backend"],
|
|
88
|
+
testcaseOwner: "john.doe",
|
|
89
|
+
estimatedTime: "2h:30m:0s",
|
|
90
|
+
}),
|
|
91
|
+
},
|
|
92
|
+
expectedOutput: "Test cases created with High priority, Automated type, API and Backend components",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
description: "Import ZIP file with multiple results",
|
|
96
|
+
parameters: {
|
|
97
|
+
file: "<base64_encoded_zip_content>",
|
|
98
|
+
fileName: "test-results.zip",
|
|
99
|
+
entityType: "JUNIT",
|
|
100
|
+
testsuiteName: "Full Regression Suite",
|
|
101
|
+
skipWarning: "1",
|
|
102
|
+
},
|
|
103
|
+
expectedOutput: "Multiple test results imported from ZIP, summaries truncated if >255 chars",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
description: "Import with custom hierarchy for JUnit",
|
|
107
|
+
parameters: {
|
|
108
|
+
file: "<base64_encoded_junit_xml_content>",
|
|
109
|
+
fileName: "junit-results.xml",
|
|
110
|
+
entityType: "JUNIT",
|
|
111
|
+
automationHierarchy: "3",
|
|
112
|
+
projectID: "PROJ",
|
|
113
|
+
},
|
|
114
|
+
expectedOutput: "Multiple test suites created per <testsuite> tag, test cases per <testcase> tag",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
description: "Import with build and platform mapping",
|
|
118
|
+
parameters: {
|
|
119
|
+
file: "<base64_encoded_testng_xml_content>",
|
|
120
|
+
fileName: "testng-results.xml",
|
|
121
|
+
entityType: "TESTNG",
|
|
122
|
+
buildID: "Build-1.2.3",
|
|
123
|
+
platformID: "Safari 17",
|
|
124
|
+
releaseID: "Release 1.2",
|
|
125
|
+
cycleID: "QA Cycle",
|
|
126
|
+
},
|
|
127
|
+
expectedOutput: "Results linked to Build 1.2.3, Safari 17 platform, Release 1.2, QA Cycle",
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
description: "Import with test suite and test case fields",
|
|
131
|
+
parameters: {
|
|
132
|
+
file: "<base64_encoded_cucumber_json_content>",
|
|
133
|
+
fileName: "cucumber-results.json",
|
|
134
|
+
entityType: "CUCUMBER",
|
|
135
|
+
testsuite_fields: JSON.stringify({
|
|
136
|
+
testSuiteState: "In Progress",
|
|
137
|
+
testsuiteOwner: "jane.smith",
|
|
138
|
+
description: "Sprint 15 automation results",
|
|
139
|
+
}),
|
|
140
|
+
testcase_fields: JSON.stringify({
|
|
141
|
+
priority: "Medium",
|
|
142
|
+
component: ["UI", "Frontend"],
|
|
143
|
+
userDefinedFields: {
|
|
144
|
+
reviewedDate: "11-20-2024",
|
|
145
|
+
environment: "Staging",
|
|
146
|
+
},
|
|
147
|
+
}),
|
|
148
|
+
},
|
|
149
|
+
expectedOutput: "Test suite and test cases created with custom fields and UDFs",
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
hints: [
|
|
153
|
+
"1. CRITICAL: User MUST upload a valid result file before calling this tool",
|
|
154
|
+
"2. USER FILE UPLOAD REQUIRED: Ask user to provide file in chat - system will convert to base64",
|
|
155
|
+
"3. FILE REQUIREMENTS:",
|
|
156
|
+
" - Supported extensions: .json, .xml, .zip",
|
|
157
|
+
" - Maximum size: 30 MB",
|
|
158
|
+
" - ZIP files must contain files matching the specified entityType format",
|
|
159
|
+
"4. REQUIRED PARAMETERS:",
|
|
160
|
+
" - file: Base64 encoded content or file path",
|
|
161
|
+
" - fileName: Original filename with extension",
|
|
162
|
+
" - entityType: TESTNG, CUCUMBER, JUNIT, HPUFT, QAF, or ROBOT",
|
|
163
|
+
"5. ENTITY TYPES:",
|
|
164
|
+
" - TESTNG: TestNG XML format",
|
|
165
|
+
" - JUNIT: JUnit XML format",
|
|
166
|
+
" - CUCUMBER: Cucumber JSON format",
|
|
167
|
+
" - ROBOT: Robot Framework XML format",
|
|
168
|
+
" - HPUFT: HP UFT format",
|
|
169
|
+
" - QAF: QAF format",
|
|
170
|
+
"6. AUTOMATION HIERARCHY (TestNG/JUnit only):",
|
|
171
|
+
" - TestNG:",
|
|
172
|
+
" * 1 (default): <class name> = Test Case, <test-method> = Test Step",
|
|
173
|
+
" * 2: <test-method> = Test Case only",
|
|
174
|
+
" * 3: <name> under <test> = Test Case, <test-method> = Test Step",
|
|
175
|
+
" - JUnit:",
|
|
176
|
+
" * 1 (default): <testsuite> = Test Case, <testcase> = Test Step",
|
|
177
|
+
" * 2: <testcase> = Test Case only",
|
|
178
|
+
" * 3: <testsuite> = Test Suite, <testcase> = Test Case (creates multiple test suites)",
|
|
179
|
+
"7. TEST SUITE OPTIONS:",
|
|
180
|
+
" - testsuiteName: Custom name for new test suite",
|
|
181
|
+
" - testsuiteId: Reuse existing test suite by ID or Entity Key (e.g., 'PROJ-TS-42')",
|
|
182
|
+
" - tsFolderPath: Create test suite in specific folder (e.g., '/Automation/Regression')",
|
|
183
|
+
" - Note: testsuiteName/testsuiteId ignored if automationHierarchy=3 for JUnit or =2 for ROBOT",
|
|
184
|
+
"8. TEST CASE OPTIONS:",
|
|
185
|
+
" - tcFolderPath: Create test cases in specific folder (e.g., '/Automation/API Tests')",
|
|
186
|
+
" - Folders created automatically if they don't exist",
|
|
187
|
+
"9. LINKING OPTIONS:",
|
|
188
|
+
" - platformID: Platform ID or name (e.g., 'Chrome 120', 'Safari 17')",
|
|
189
|
+
" - projectID: Project ID, key, or name (overrides header project)",
|
|
190
|
+
" - releaseID: Release ID or name (requires projectID)",
|
|
191
|
+
" - cycleID: Cycle ID or name (requires releaseID and projectID)",
|
|
192
|
+
" - buildID: Build ID or name",
|
|
193
|
+
"10. GET IDs FROM OTHER TOOLS:",
|
|
194
|
+
" - Platform IDs: Use 'Platform/List' API (FETCH_PLATFORMS tool)",
|
|
195
|
+
" - Project IDs: Use 'Project/List' API (FETCH_PROJECTS tool)",
|
|
196
|
+
" - Release IDs: Use 'Release/List' API (FETCH_RELEASES_CYCLES tool)",
|
|
197
|
+
" - Cycle IDs: Use 'Cycle/List' API (FETCH_RELEASES_CYCLES tool)",
|
|
198
|
+
" - Build IDs: Use 'Build/List' API (FETCH_BUILDS tool)",
|
|
199
|
+
" - Test Suite IDs: Use 'Testsuite/Fetch' API (FETCH_TEST_SUITES tool)",
|
|
200
|
+
"11. CUSTOM FIELDS (testcase_fields):",
|
|
201
|
+
" - JSON string with system fields and UDFs",
|
|
202
|
+
" - System fields: component, priority, testCaseState, testCaseType, testcaseOwner, estimatedTime, description",
|
|
203
|
+
' - Example: {"component":["API"], "priority":"High", "testcaseOwner":"user"}',
|
|
204
|
+
" - Ignored if reusing existing test case",
|
|
205
|
+
"12. CUSTOM FIELDS (testsuite_fields):",
|
|
206
|
+
" - JSON string with system fields and UDFs",
|
|
207
|
+
" - System fields: testSuiteState, testsuiteOwner, description",
|
|
208
|
+
' - Example: {"testSuiteState":"Open", "testsuiteOwner":"user"}',
|
|
209
|
+
" - Ignored if reusing existing test suite",
|
|
210
|
+
"13. USER DEFINED FIELDS (UDFs):",
|
|
211
|
+
" - Include in testcase_fields or testsuite_fields under 'userDefinedFields' key",
|
|
212
|
+
' - Example: {"userDefinedFields": {"reviewedDate": "11-20-2024", "environment": "Staging"}}',
|
|
213
|
+
" - UDF types: STRING, LARGETEXT, LOOKUPLIST, MULTILOOKUPLIST, DATEPICKER, NUMBER",
|
|
214
|
+
" - See tool metadata for UDF validation rules and auto-create behavior",
|
|
215
|
+
"14. SKIP WARNING OPTIONS:",
|
|
216
|
+
" - skipWarning='0' (default): Fail import if test case summary >255 characters",
|
|
217
|
+
" - skipWarning='1': Truncate summary to 255 characters and continue import",
|
|
218
|
+
"15. MATCHING BEHAVIOR:",
|
|
219
|
+
" - is_matching_required='true' (default): Create new TC/version if summary/steps don't match",
|
|
220
|
+
" - is_matching_required='false': Reuse existing TC version if entity key or summary matches",
|
|
221
|
+
"16. IMPORT BEHAVIOR EXAMPLES:",
|
|
222
|
+
" - Only file + entityType → Auto-generated test suite, 'No Platform', test cases auto-linked",
|
|
223
|
+
" - file + entityType + platformID → Auto-generated test suite with specified platform",
|
|
224
|
+
" - file + entityType + testsuiteId → Results updated in existing test suite",
|
|
225
|
+
" - file + entityType + platformID + testsuiteId → Results updated in existing test suite with platform",
|
|
226
|
+
"17. FOLDER CREATION:",
|
|
227
|
+
" - If tsFolderPath or tcFolderPath specified and doesn't exist, it will be created automatically",
|
|
228
|
+
" - Use forward slashes for folder paths (e.g., '/Parent/Child')",
|
|
229
|
+
"18. ESTIMATED TIME FORMAT:",
|
|
230
|
+
" - Format: '2h:30m:15s' or '4h' or '7m' or '0s'",
|
|
231
|
+
" - Range: 0 to 99999 minutes",
|
|
232
|
+
"19. OWNER FIELDS:",
|
|
233
|
+
" - Use userAlias (username) not display name",
|
|
234
|
+
" - testcaseOwner: User must have Test Case module rights",
|
|
235
|
+
" - testsuiteOwner: User must have Test Suite module rights",
|
|
236
|
+
" - Owner not set if user not found or lacks permissions",
|
|
237
|
+
"20. LOOKUPLIST/MULTILOOKUPLIST BEHAVIOR:",
|
|
238
|
+
" - If value doesn't exist and auto-create is ON: Value added to list",
|
|
239
|
+
" - If value doesn't exist and auto-create is OFF: Field blank or default value",
|
|
240
|
+
" - MULTILOOKUPLIST: New values added, old values persist",
|
|
241
|
+
"21. MANDATORY FIELD VALIDATION:",
|
|
242
|
+
" - If mandatory system/UDF field missing:",
|
|
243
|
+
" * Auto-create OFF + value doesn't exist = Import FAIL",
|
|
244
|
+
" * Auto-create ON + value doesn't exist = Import SUCCESS (value created)",
|
|
245
|
+
" * Value exists = Import SUCCESS",
|
|
246
|
+
"22. ERROR HANDLING:",
|
|
247
|
+
" - Check file size before upload (must be ≤30 MB)",
|
|
248
|
+
" - Validate file extension matches entityType",
|
|
249
|
+
" - Ensure required dependencies: cycleID requires releaseID and projectID",
|
|
250
|
+
" - If import fails, check QMetry UI for detailed error messages",
|
|
251
|
+
"23. WORKFLOW:",
|
|
252
|
+
" Step 1: Ask user to upload result file in chat",
|
|
253
|
+
" Step 2: System converts file to base64",
|
|
254
|
+
" Step 3: Collect entityType and optional parameters",
|
|
255
|
+
" Step 4: Call this tool with file data and configuration",
|
|
256
|
+
" Step 5: QMetry processes file and creates/updates test artifacts",
|
|
257
|
+
" Step 6: Return import results with test suite and execution details",
|
|
258
|
+
"24. USER INTERACTION REQUIRED:",
|
|
259
|
+
" - ALWAYS ask user to upload file before calling this tool",
|
|
260
|
+
" - Display supported formats: .json, .xml, .zip (up to 30 MB)",
|
|
261
|
+
" - Ask for entityType (framework used)",
|
|
262
|
+
" - Ask for optional parameters based on user's needs",
|
|
263
|
+
"25. PERFORMANCE TIPS:",
|
|
264
|
+
" - For large imports, consider using ZIP files",
|
|
265
|
+
" - Reusing existing test suites is faster than creating new ones",
|
|
266
|
+
" - Use automationHierarchy wisely to control test case/suite structure",
|
|
267
|
+
],
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
handler: QMetryToolsHandlers.FETCH_AUTOMATION_STATUS,
|
|
271
|
+
title: "Fetch Automation Status",
|
|
272
|
+
summary: "Fetches the status of an automation import job by request ID.",
|
|
273
|
+
purpose: "Track the progress and result of an automation import operation in QMetry.",
|
|
274
|
+
inputSchema: FetchAutomationStatusPayloadSchema,
|
|
275
|
+
useCases: [
|
|
276
|
+
"1. Check if an automation import job is completed or still in progress.",
|
|
277
|
+
"2. Retrieve status, progress, and details for a specific automation import request.",
|
|
278
|
+
"3. Monitor automation result processing for CI/CD integrations.",
|
|
279
|
+
],
|
|
280
|
+
examples: [
|
|
281
|
+
{
|
|
282
|
+
description: "Fetch status for request ID 12345",
|
|
283
|
+
parameters: {
|
|
284
|
+
requestID: 12345,
|
|
285
|
+
},
|
|
286
|
+
expectedOutput: "Status, progress, and details of the automation import job for request ID 12345.",
|
|
287
|
+
},
|
|
288
|
+
],
|
|
289
|
+
},
|
|
290
|
+
];
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
export { AUTOMATION_TOOLS } from "./automation-tools.js";
|
|
1
2
|
export { ISSUE_TOOLS } from "./issue-tools.js";
|
|
2
3
|
export { PROJECT_TOOLS } from "./project-tools.js";
|
|
3
4
|
export { REQUIREMENT_TOOLS } from "./requirement-tools.js";
|
|
4
5
|
export { TESTCASE_TOOLS } from "./testcase-tools.js";
|
|
5
6
|
export { TESTSUITE_TOOLS } from "./testsuite-tools.js";
|
|
7
|
+
import { AUTOMATION_TOOLS } from "./automation-tools.js";
|
|
6
8
|
import { ISSUE_TOOLS } from "./issue-tools.js";
|
|
7
9
|
import { PROJECT_TOOLS } from "./project-tools.js";
|
|
8
10
|
import { REQUIREMENT_TOOLS } from "./requirement-tools.js";
|
|
@@ -14,4 +16,5 @@ export const TOOLS = [
|
|
|
14
16
|
...REQUIREMENT_TOOLS,
|
|
15
17
|
...TESTSUITE_TOOLS,
|
|
16
18
|
...ISSUE_TOOLS,
|
|
19
|
+
...AUTOMATION_TOOLS,
|
|
17
20
|
];
|
|
@@ -197,7 +197,7 @@ export const ISSUE_TOOLS = [
|
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
199
|
description: "Get issues with manual viewId (skip auto-resolution)",
|
|
200
|
-
parameters: { projectKey: "MAC", viewId: 166065 },
|
|
200
|
+
parameters: { projectKey: "MAC", viewId: 166065 }, // This is an example viewId, must be resolved per project IS viewId
|
|
201
201
|
expectedOutput: "Issues using manually specified viewId 166065",
|
|
202
202
|
},
|
|
203
203
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QMetryToolsHandlers } from "../../config/constants.js";
|
|
2
|
-
import { BuildArgsSchema, PlatformArgsSchema, ProjectArgsSchema, ProjectListArgsSchema, ReleasesCyclesArgsSchema, } from "../../types/common.js";
|
|
2
|
+
import { BuildArgsSchema, CreateCycleArgsSchema, CreateReleaseArgsSchema, PlatformArgsSchema, ProjectArgsSchema, ProjectListArgsSchema, ReleasesCyclesArgsSchema, UpdateCycleArgsSchema, } from "../../types/common.js";
|
|
3
3
|
export const PROJECT_TOOLS = [
|
|
4
4
|
{
|
|
5
5
|
title: "Fetch QMetry list Projects",
|
|
@@ -345,4 +345,314 @@ export const PROJECT_TOOLS = [
|
|
|
345
345
|
idempotent: true,
|
|
346
346
|
openWorld: false,
|
|
347
347
|
},
|
|
348
|
+
{
|
|
349
|
+
title: "Create Release",
|
|
350
|
+
summary: "Create a new release in QMetry with optional cycle for test planning and execution tracking",
|
|
351
|
+
handler: QMetryToolsHandlers.CREATE_RELEASE,
|
|
352
|
+
inputSchema: CreateReleaseArgsSchema,
|
|
353
|
+
purpose: "Create a new release in QMetry to organize test execution phases. " +
|
|
354
|
+
"Releases represent major versions or milestones in your project. " +
|
|
355
|
+
"Optionally create a cycle within the release for more granular test execution planning. " +
|
|
356
|
+
"This tool helps establish the test planning hierarchy and enables better test execution tracking.",
|
|
357
|
+
useCases: [
|
|
358
|
+
"Create a new release for a major product version (e.g., v2.0, Q1 Release)",
|
|
359
|
+
"Create a release with an initial cycle for immediate test planning",
|
|
360
|
+
"Set up release dates for sprint planning and milestone tracking",
|
|
361
|
+
"Organize test execution by product versions and cycles",
|
|
362
|
+
"Create release hierarchy for better test planning and reporting",
|
|
363
|
+
"Establish test execution phases with releases and cycles",
|
|
364
|
+
],
|
|
365
|
+
examples: [
|
|
366
|
+
{
|
|
367
|
+
description: "Create a basic release with just a name",
|
|
368
|
+
parameters: {
|
|
369
|
+
release: {
|
|
370
|
+
name: "Release 2.0",
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
expectedOutput: "Release 'Release 2.0' created successfully with generated release ID",
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
description: "Create a release with description and dates",
|
|
377
|
+
parameters: {
|
|
378
|
+
release: {
|
|
379
|
+
name: "Q1 2024 Release",
|
|
380
|
+
description: "First quarter release for 2024",
|
|
381
|
+
startDate: "01-01-2024",
|
|
382
|
+
targetDate: "31-03-2024",
|
|
383
|
+
},
|
|
384
|
+
},
|
|
385
|
+
expectedOutput: "Release 'Q1 2024 Release' created with start date 01-01-2024 and target date 31-03-2024",
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
description: "Create a release with an initial cycle",
|
|
389
|
+
parameters: {
|
|
390
|
+
release: {
|
|
391
|
+
name: "Release 3.0",
|
|
392
|
+
description: "Major product update",
|
|
393
|
+
},
|
|
394
|
+
cycle: {
|
|
395
|
+
name: "Sprint 1",
|
|
396
|
+
isLocked: false,
|
|
397
|
+
isArchived: false,
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
expectedOutput: "Release 'Release 3.0' created with cycle 'Sprint 1' for test execution planning",
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
description: "Create a release with all details",
|
|
404
|
+
parameters: {
|
|
405
|
+
release: {
|
|
406
|
+
name: "Summer 2024 Release",
|
|
407
|
+
description: "Summer product release with new features",
|
|
408
|
+
startDate: "01-06-2024",
|
|
409
|
+
targetDate: "31-08-2024",
|
|
410
|
+
},
|
|
411
|
+
cycle: {
|
|
412
|
+
name: "Beta Testing Cycle",
|
|
413
|
+
isLocked: false,
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
expectedOutput: "Release 'Summer 2024 Release' created with dates and 'Beta Testing Cycle' for test execution",
|
|
417
|
+
},
|
|
418
|
+
],
|
|
419
|
+
hints: [
|
|
420
|
+
"CRITICAL: release.name is REQUIRED - must provide a name for the release",
|
|
421
|
+
"Date format depends on QMetry instance configuration: DD-MM-YYYY or MM-DD-YYYY",
|
|
422
|
+
"Check your QMetry instance settings to determine the correct date format",
|
|
423
|
+
"If dates are in wrong format, QMetry will return an error - verify format with admin",
|
|
424
|
+
"projectID is optional in the release object - it will be auto-resolved from the project key if not provided",
|
|
425
|
+
"To explicitly set projectID, first call FETCH_PROJECT_INFO to get the numeric project ID",
|
|
426
|
+
"cycle parameter is completely optional - omit it if you only want to create a release",
|
|
427
|
+
"If providing cycle, cycle.name is REQUIRED",
|
|
428
|
+
"cycle.isLocked defaults to false if not provided - set to true to prevent modifications",
|
|
429
|
+
"cycle.isArchived defaults to false if not provided - set to true to archive immediately (rare)",
|
|
430
|
+
"Releases can have multiple cycles added later using other tools",
|
|
431
|
+
"Use descriptive release names like 'Release 2.0', 'Q1 2024', 'Sprint 15' for better organization",
|
|
432
|
+
"startDate and targetDate help with sprint planning and milestone tracking",
|
|
433
|
+
"Creating a release with a cycle is useful for immediate test planning after release creation",
|
|
434
|
+
"Release hierarchy: Project → Release → Cycle → Test Execution",
|
|
435
|
+
"After creating a release, you can associate test suites and test cases with it",
|
|
436
|
+
"Use FETCH_RELEASES_CYCLES tool after creation to verify the release was created successfully",
|
|
437
|
+
],
|
|
438
|
+
outputDescription: "JSON object containing the created release ID, release details, and cycle information if provided",
|
|
439
|
+
readOnly: false,
|
|
440
|
+
idempotent: false,
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
title: "Create Cycle",
|
|
444
|
+
summary: "Create a new cycle within an existing release in QMetry for test execution planning",
|
|
445
|
+
handler: QMetryToolsHandlers.CREATE_CYCLE,
|
|
446
|
+
inputSchema: CreateCycleArgsSchema,
|
|
447
|
+
purpose: "Create a new cycle within an existing release to organize test execution phases. " +
|
|
448
|
+
"Cycles represent specific testing iterations, sprints, or phases within a release. " +
|
|
449
|
+
"This tool requires an existing release and creates a cycle associated with it. " +
|
|
450
|
+
"Essential for granular test planning and sprint-based test execution tracking.",
|
|
451
|
+
useCases: [
|
|
452
|
+
"Create a new test cycle for a sprint within an existing release",
|
|
453
|
+
"Add additional testing phases to an existing release",
|
|
454
|
+
"Set up regression testing cycles for a specific release",
|
|
455
|
+
"Organize test execution by sprints, phases, or iterations",
|
|
456
|
+
"Create cycles with specific date ranges for milestone tracking",
|
|
457
|
+
"Establish test execution phases within release planning",
|
|
458
|
+
],
|
|
459
|
+
examples: [
|
|
460
|
+
{
|
|
461
|
+
description: "Create a basic cycle with just a name in a release",
|
|
462
|
+
parameters: {
|
|
463
|
+
cycle: {
|
|
464
|
+
name: "Sprint 2",
|
|
465
|
+
releaseID: 12345,
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
expectedOutput: "Cycle 'Sprint 2' created successfully in release ID 12345",
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
description: "Create a cycle with description and dates",
|
|
472
|
+
parameters: {
|
|
473
|
+
cycle: {
|
|
474
|
+
name: "Regression Testing Cycle",
|
|
475
|
+
description: "Full regression testing for release 2.0",
|
|
476
|
+
startDate: "15-01-2024",
|
|
477
|
+
targetDate: "31-01-2024",
|
|
478
|
+
releaseID: 12345,
|
|
479
|
+
},
|
|
480
|
+
},
|
|
481
|
+
expectedOutput: "Cycle 'Regression Testing Cycle' created with start date 15-01-2024 and target date 31-01-2024 in release 12345",
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
description: "Create a locked cycle to prevent modifications",
|
|
485
|
+
parameters: {
|
|
486
|
+
cycle: {
|
|
487
|
+
name: "Final QA Cycle",
|
|
488
|
+
description: "Locked cycle for final QA testing",
|
|
489
|
+
isLocked: true,
|
|
490
|
+
isArchived: false,
|
|
491
|
+
releaseID: 12345,
|
|
492
|
+
},
|
|
493
|
+
},
|
|
494
|
+
expectedOutput: "Locked cycle 'Final QA Cycle' created in release 12345 to prevent modifications",
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
description: "Create a cycle with all details including project ID and dates",
|
|
498
|
+
parameters: {
|
|
499
|
+
cycle: {
|
|
500
|
+
name: "Sprint 3 - Feature Testing",
|
|
501
|
+
description: "Testing new features for Sprint 3",
|
|
502
|
+
startDate: "01-02-2024",
|
|
503
|
+
targetDate: "15-02-2024",
|
|
504
|
+
isLocked: false,
|
|
505
|
+
isArchived: false,
|
|
506
|
+
projectID: 67890,
|
|
507
|
+
releaseID: 12345,
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
|
+
expectedOutput: "Cycle 'Sprint 3 - Feature Testing' created with dates and project context in release 12345",
|
|
511
|
+
},
|
|
512
|
+
],
|
|
513
|
+
hints: [
|
|
514
|
+
"CRITICAL: cycle.releaseID is REQUIRED - must provide the release ID to associate this cycle with",
|
|
515
|
+
"CRITICAL: cycle.name is REQUIRED - must provide a name for the cycle",
|
|
516
|
+
"HOW TO GET releaseID:",
|
|
517
|
+
"1. Call FETCH_RELEASES_CYCLES tool to get all releases and their IDs",
|
|
518
|
+
"2. From the response, get value from projects.releases[<index>].releaseID",
|
|
519
|
+
"3. Use that numeric releaseID in the cycle.releaseID parameter",
|
|
520
|
+
"Example: Release 'Q1 2024' might have releaseID: 12345",
|
|
521
|
+
"CRITICAL WORKFLOW - IF USER PROVIDES RELEASE NAME:",
|
|
522
|
+
"1. User says: 'Create cycle Sprint 2 in release Q1 2024'",
|
|
523
|
+
"2. You MUST first call FETCH_RELEASES_CYCLES tool to get all releases",
|
|
524
|
+
"3. Search the response for release with name 'Q1 2024'",
|
|
525
|
+
"4. Extract projects.releases[<index>].releaseID from matching release",
|
|
526
|
+
"5. Use that releaseID in cycle.releaseID parameter",
|
|
527
|
+
"6. If release name not found, inform user and list available releases",
|
|
528
|
+
"Example workflow:",
|
|
529
|
+
"- User request: 'Create cycle Sprint 2 in Release 2.0'",
|
|
530
|
+
"- Step 1: Call FETCH_RELEASES_CYCLES",
|
|
531
|
+
"- Step 2: Find release where name = 'Release 2.0', get its releaseID (e.g., 12345)",
|
|
532
|
+
"- Step 3: Call CREATE_CYCLE with cycle.releaseID = 12345",
|
|
533
|
+
"RELEASE NAME RESOLUTION:",
|
|
534
|
+
"- NEVER assume or guess release IDs - always fetch from API",
|
|
535
|
+
"- Release names are user-defined strings (e.g., 'Q1 2024', 'Release 2.0', 'Sprint 15')",
|
|
536
|
+
"- Release IDs are numeric identifiers assigned by QMetry (e.g., 12345, 67890)",
|
|
537
|
+
"- Match release names case-insensitively when searching",
|
|
538
|
+
"- If multiple releases match the name, ask user to clarify or use the most recent one",
|
|
539
|
+
"- FETCH_RELEASES_CYCLES returns: projects.releases[] array with name and releaseID fields",
|
|
540
|
+
"Date format depends on QMetry instance configuration: DD-MM-YYYY or MM-DD-YYYY",
|
|
541
|
+
"Check your QMetry instance settings to determine the correct date format",
|
|
542
|
+
"If dates are in wrong format, QMetry will return an error - verify format with admin",
|
|
543
|
+
"projectID is optional in the cycle object - it will be auto-resolved from the project key if not provided",
|
|
544
|
+
"To explicitly set projectID, first call FETCH_PROJECT_INFO to get the numeric project ID",
|
|
545
|
+
"cycle.isLocked defaults to false if not provided - set to true to prevent modifications",
|
|
546
|
+
"cycle.isArchived defaults to false if not provided - set to true to archive immediately (rare)",
|
|
547
|
+
"Use descriptive cycle names like 'Sprint 2', 'Regression Cycle', 'Alpha Testing' for better organization",
|
|
548
|
+
"startDate and targetDate help with sprint planning and milestone tracking",
|
|
549
|
+
"Cycle hierarchy: Project → Release → Cycle → Test Execution",
|
|
550
|
+
"After creating a cycle, you can associate test suites and test cases with it",
|
|
551
|
+
"Use FETCH_RELEASES_CYCLES tool after creation to verify the cycle was created successfully",
|
|
552
|
+
"DIFFERENCE FROM CREATE_RELEASE: This tool creates a cycle in an EXISTING release, while CREATE_RELEASE can create a release with an optional cycle",
|
|
553
|
+
"If you need to create both a release and a cycle together, use CREATE_RELEASE tool instead",
|
|
554
|
+
"If release doesn't exist yet, create it first with CREATE_RELEASE, then add more cycles with this tool",
|
|
555
|
+
],
|
|
556
|
+
outputDescription: "JSON object containing the created cycle ID, cycle details, and association with the release",
|
|
557
|
+
readOnly: false,
|
|
558
|
+
idempotent: false,
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
title: "Update Cycle",
|
|
562
|
+
summary: "Update an existing cycle in QMetry for test execution planning",
|
|
563
|
+
handler: QMetryToolsHandlers.UPDATE_CYCLE,
|
|
564
|
+
inputSchema: UpdateCycleArgsSchema,
|
|
565
|
+
purpose: "Update an existing cycle within a release to modify test execution phase details. " +
|
|
566
|
+
"Cycles represent specific testing iterations, sprints, or phases within a release. " +
|
|
567
|
+
"This tool requires buildID and releaseID to identify the cycle to update. " +
|
|
568
|
+
"Essential for maintaining accurate test planning and sprint-based test execution tracking.",
|
|
569
|
+
useCases: [
|
|
570
|
+
"Update cycle name for better organization",
|
|
571
|
+
"Modify cycle dates to reflect schedule changes",
|
|
572
|
+
"Adjust testing phase timelines within a release",
|
|
573
|
+
"Update cycle metadata for sprint tracking",
|
|
574
|
+
"Revise milestone dates for test execution planning",
|
|
575
|
+
"Rename cycles to match updated sprint naming conventions",
|
|
576
|
+
],
|
|
577
|
+
examples: [
|
|
578
|
+
{
|
|
579
|
+
description: "Update cycle name",
|
|
580
|
+
parameters: {
|
|
581
|
+
cycle: {
|
|
582
|
+
name: "Alpha_v1_Updated",
|
|
583
|
+
buildID: 1494,
|
|
584
|
+
releaseID: 3729,
|
|
585
|
+
},
|
|
586
|
+
},
|
|
587
|
+
expectedOutput: "Cycle updated successfully with new name 'Alpha_v1_Updated'",
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
description: "Update cycle dates",
|
|
591
|
+
parameters: {
|
|
592
|
+
cycle: {
|
|
593
|
+
startDate: "10-10-2018",
|
|
594
|
+
targetDate: "11-11-2018",
|
|
595
|
+
buildID: 1494,
|
|
596
|
+
releaseID: 3729,
|
|
597
|
+
},
|
|
598
|
+
},
|
|
599
|
+
expectedOutput: "Cycle dates updated successfully with new start date 10-10-2018 and target date 11-11-2018",
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
description: "Update cycle name and dates together",
|
|
603
|
+
parameters: {
|
|
604
|
+
cycle: {
|
|
605
|
+
name: "Sprint 2 - Updated",
|
|
606
|
+
startDate: "15-01-2024",
|
|
607
|
+
targetDate: "31-01-2024",
|
|
608
|
+
buildID: 1494,
|
|
609
|
+
releaseID: 3729,
|
|
610
|
+
},
|
|
611
|
+
},
|
|
612
|
+
expectedOutput: "Cycle updated with new name and dates successfully",
|
|
613
|
+
},
|
|
614
|
+
],
|
|
615
|
+
hints: [
|
|
616
|
+
"CRITICAL: cycle.buildID is REQUIRED - must provide the build ID to identify the cycle to update",
|
|
617
|
+
"CRITICAL: cycle.releaseID is REQUIRED - must provide the release ID to identify the cycle to update",
|
|
618
|
+
"HOW TO GET buildID and releaseID:",
|
|
619
|
+
"1. Call FETCH_RELEASES_CYCLES tool (API: 'Cycle/List') to get all cycles",
|
|
620
|
+
"2. From the response, get buildID from projects.releases[<index>].builds[<index>].buildID",
|
|
621
|
+
"3. From the response, get releaseID from projects.releases[<index>].releaseID",
|
|
622
|
+
"4. Use those numeric IDs in cycle.buildID and cycle.releaseID parameters",
|
|
623
|
+
"Example: Cycle 'Sprint 2' might have buildID: 1494 and releaseID: 3729",
|
|
624
|
+
"CRITICAL WORKFLOW - IF USER PROVIDES CYCLE NAME:",
|
|
625
|
+
"1. User says: 'Update cycle Sprint 2 to change dates'",
|
|
626
|
+
"2. You MUST first call FETCH_RELEASES_CYCLES tool to get all cycles",
|
|
627
|
+
"3. Search the response for cycle with matching name 'Sprint 2'",
|
|
628
|
+
"4. Extract buildID and releaseID from the matching cycle",
|
|
629
|
+
"5. Use those IDs in cycle.buildID and cycle.releaseID parameters",
|
|
630
|
+
"6. If cycle name not found, inform user and list available cycles",
|
|
631
|
+
"Example workflow:",
|
|
632
|
+
"- User request: 'Update cycle Alpha_v1 name to Alpha_v1_Updated'",
|
|
633
|
+
"- Step 1: Call FETCH_RELEASES_CYCLES",
|
|
634
|
+
"- Step 2: Find cycle where name = 'Alpha_v1', get its buildID (e.g., 1494) and releaseID (e.g., 3729)",
|
|
635
|
+
"- Step 3: Call UPDATE_CYCLE with cycle.buildID = 1494 and cycle.releaseID = 3729",
|
|
636
|
+
"CYCLE IDENTIFICATION:",
|
|
637
|
+
"- NEVER assume or guess buildID or releaseID - always fetch from API",
|
|
638
|
+
"- Cycle names are user-defined strings (e.g., 'Sprint 2', 'Alpha_v1', 'Regression Cycle')",
|
|
639
|
+
"- buildID and releaseID are numeric identifiers assigned by QMetry",
|
|
640
|
+
"- Match cycle names case-insensitively when searching",
|
|
641
|
+
"- If multiple cycles match the name, ask user to clarify or use the most recent one",
|
|
642
|
+
"- FETCH_RELEASES_CYCLES returns: projects.releases[].builds[] array with name, buildID, and releaseID",
|
|
643
|
+
"Date format depends on QMetry instance configuration: DD-MM-YYYY or MM-DD-YYYY",
|
|
644
|
+
"Check your QMetry instance settings to determine the correct date format",
|
|
645
|
+
"NOTE: To verify/update the Date Format - Go to QMetry -> User Profile",
|
|
646
|
+
"If dates are in wrong format, QMetry will return an error - verify format with admin",
|
|
647
|
+
"You can update name, startDate, or targetDate independently or together",
|
|
648
|
+
"Only include the fields you want to update - other fields will remain unchanged",
|
|
649
|
+
"startDate and targetDate help with sprint planning and milestone tracking",
|
|
650
|
+
"Cycle hierarchy: Project → Release → Cycle → Test Execution",
|
|
651
|
+
"After updating a cycle, you can verify changes using FETCH_RELEASES_CYCLES tool",
|
|
652
|
+
"DIFFERENCE FROM CREATE_CYCLE: This tool updates an EXISTING cycle, while CREATE_CYCLE creates a new one",
|
|
653
|
+
],
|
|
654
|
+
outputDescription: "JSON object containing the updated cycle details and confirmation of update",
|
|
655
|
+
readOnly: false,
|
|
656
|
+
idempotent: true,
|
|
657
|
+
},
|
|
348
658
|
];
|
|
@@ -30,7 +30,7 @@ export const REQUIREMENT_TOOLS = [
|
|
|
30
30
|
description: "Get requirements with manual viewId (skip auto-resolution)",
|
|
31
31
|
parameters: {
|
|
32
32
|
projectKey: "MAC",
|
|
33
|
-
viewId: 7397,
|
|
33
|
+
viewId: 7397, // This is an example viewId, must be resolved per project RQ viewId
|
|
34
34
|
folderPath: "/APIARY 88",
|
|
35
35
|
},
|
|
36
36
|
expectedOutput: "Requirements using manually specified viewId 7397",
|