@smartbear/mcp 0.24.0 → 0.25.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/dist/bearq/tool/tasks/chat-with-qa-lead.js +1 -0
- package/dist/bearq/tool/tasks/expand-application-model.js +1 -0
- package/dist/bearq/tool/tasks/get-task-status.js +1 -0
- package/dist/bearq/tool/tasks/get-task.js +1 -0
- package/dist/bearq/tool/tasks/refine-all-draft-tests.js +1 -0
- package/dist/bearq/tool/tasks/refine-test-cases.js +1 -0
- package/dist/bearq/tool/tasks/refine-tests-in-functional-areas.js +1 -0
- package/dist/bearq/tool/tasks/run-regression-tests.js +1 -0
- package/dist/bearq/tool/tasks/run-test-cases.js +1 -0
- package/dist/bearq/tool/tasks/run-tests-in-functional-areas.js +1 -0
- package/dist/bearq/tool/tasks/stop-task.js +1 -0
- package/dist/bearq/tool/tasks/wait-for-task.js +1 -0
- package/dist/bugsnag/client.js +1 -0
- package/dist/bugsnag/tool/error/get-error.js +1 -0
- package/dist/bugsnag/tool/error/list-project-errors.js +1 -0
- package/dist/bugsnag/tool/error/update-error.js +1 -0
- package/dist/bugsnag/tool/event/get-event-details-from-dashboard-url.js +1 -0
- package/dist/bugsnag/tool/event/get-event.js +1 -0
- package/dist/bugsnag/tool/event/list-error-events.js +1 -0
- package/dist/bugsnag/tool/performance/get-network-endpoint-groupings.js +1 -0
- package/dist/bugsnag/tool/performance/get-span-group.js +1 -0
- package/dist/bugsnag/tool/performance/get-trace.js +1 -0
- package/dist/bugsnag/tool/performance/list-span-groups.js +1 -0
- package/dist/bugsnag/tool/performance/list-spans.js +1 -0
- package/dist/bugsnag/tool/performance/list-trace-fields.js +1 -0
- package/dist/bugsnag/tool/performance/set-network-endpoint-groupings.js +1 -0
- package/dist/bugsnag/tool/project/get-current-project.js +1 -0
- package/dist/bugsnag/tool/project/list-project-event-filters.js +1 -0
- package/dist/bugsnag/tool/project/list-projects.js +1 -0
- package/dist/bugsnag/tool/release/get-build.js +1 -0
- package/dist/bugsnag/tool/release/get-release.js +1 -0
- package/dist/bugsnag/tool/release/list-releases.js +1 -0
- package/dist/collaborator/client.js +10 -0
- package/dist/common/client-registry.js +17 -9
- package/dist/common/server.js +44 -1
- package/dist/common/transport-http.js +24 -20
- package/dist/common/transport-stdio.js +7 -5
- package/dist/package.json.js +1 -1
- package/dist/pactflow/client/tools.js +102 -0
- package/dist/qmetry/client/tools/automation-tools.js +2 -0
- package/dist/qmetry/client/tools/issue-tools.js +6 -0
- package/dist/qmetry/client/tools/project-tools.js +9 -0
- package/dist/qmetry/client/tools/requirement-tools.js +5 -0
- package/dist/qmetry/client/tools/testcase-tools.js +7 -0
- package/dist/qmetry/client/tools/testsuite-tools.js +11 -0
- package/dist/qtm4j/client.js +25 -1
- package/dist/qtm4j/config/constants.js +101 -1
- package/dist/qtm4j/config/field-resolution.types.js +3 -1
- package/dist/qtm4j/http/api-client.js +20 -2
- package/dist/qtm4j/resolver/resolver-registry.js +7 -1
- package/dist/qtm4j/resolver/resolvers/requirement-id-resolver.js +28 -0
- package/dist/qtm4j/resolver/resolvers/test-cycle-uid-resolver.js +28 -0
- package/dist/qtm4j/schema/linked-items.schema.js +95 -0
- package/dist/qtm4j/schema/requirements.schema.js +109 -0
- package/dist/qtm4j/schema/test-cycle.link.schema.js +260 -0
- package/dist/qtm4j/tool/project/get-projects.js +2 -1
- package/dist/qtm4j/tool/project/set-project-context.js +2 -1
- package/dist/qtm4j/tool/requirement/get-linked-testcases.js +93 -0
- package/dist/qtm4j/tool/requirement/link-testcases.js +107 -0
- package/dist/qtm4j/tool/requirement/unlink-testcases.js +97 -0
- package/dist/qtm4j/tool/test-automation/get-automation-history.js +2 -1
- package/dist/qtm4j/tool/test-automation/upload-automation-result.js +2 -1
- package/dist/qtm4j/tool/test-case/create-test-case.js +2 -1
- package/dist/qtm4j/tool/test-case/get-linked-requirements.js +67 -0
- package/dist/qtm4j/tool/test-case/get-test-cases.js +2 -1
- package/dist/qtm4j/tool/test-case/get-test-steps.js +2 -1
- package/dist/qtm4j/tool/test-case/link-requirements.js +124 -0
- package/dist/qtm4j/tool/test-case/unlink-requirements.js +116 -0
- package/dist/qtm4j/tool/test-case/update-test-case.js +2 -1
- package/dist/qtm4j/tool/test-cycle/create-test-cycle.js +2 -1
- package/dist/qtm4j/tool/test-cycle/get-linked-requirements.js +71 -0
- package/dist/qtm4j/tool/test-cycle/link-requirements.js +91 -0
- package/dist/qtm4j/tool/test-cycle/link-testcases.js +118 -0
- package/dist/qtm4j/tool/test-cycle/search-linked-testcases.js +114 -0
- package/dist/qtm4j/tool/test-cycle/search-test-cycle.js +2 -1
- package/dist/qtm4j/tool/test-cycle/unlink-requirements.js +87 -0
- package/dist/qtm4j/tool/test-cycle/unlink-testcases.js +103 -0
- package/dist/qtm4j/tool/test-cycle/update-test-cycle.js +2 -1
- package/dist/reflect/tool/recording/add-prompt-step.js +1 -0
- package/dist/reflect/tool/recording/add-segment.js +1 -0
- package/dist/reflect/tool/recording/connect-to-session.js +1 -0
- package/dist/reflect/tool/recording/delete-previous-step.js +1 -0
- package/dist/reflect/tool/recording/get-screenshot.js +1 -0
- package/dist/reflect/tool/suites/cancel-suite-execution.js +1 -0
- package/dist/reflect/tool/suites/execute-suite.js +1 -0
- package/dist/reflect/tool/suites/get-suite-execution-status.js +1 -0
- package/dist/reflect/tool/suites/list-suite-executions.js +1 -0
- package/dist/reflect/tool/suites/list-suites.js +1 -0
- package/dist/reflect/tool/tests/get-test-status.js +1 -0
- package/dist/reflect/tool/tests/list-segments.js +1 -0
- package/dist/reflect/tool/tests/list-tests.js +1 -0
- package/dist/reflect/tool/tests/run-test.js +1 -0
- package/dist/swagger/client/tools.js +23 -0
- package/dist/zephyr/tool/environment/get-environments.js +1 -0
- package/dist/zephyr/tool/folder/create-folder.js +1 -0
- package/dist/zephyr/tool/issue-link/get-test-cases.js +1 -0
- package/dist/zephyr/tool/issue-link/get-test-cycles.js +1 -0
- package/dist/zephyr/tool/issue-link/get-test-executions.js +1 -0
- package/dist/zephyr/tool/priority/get-priorities.js +1 -0
- package/dist/zephyr/tool/project/get-project.js +1 -0
- package/dist/zephyr/tool/project/get-projects.js +1 -0
- package/dist/zephyr/tool/status/get-statuses.js +1 -0
- package/dist/zephyr/tool/test-case/create-issue-link.js +1 -0
- package/dist/zephyr/tool/test-case/create-test-case.js +1 -0
- package/dist/zephyr/tool/test-case/create-test-script.js +1 -0
- package/dist/zephyr/tool/test-case/create-test-steps.js +1 -0
- package/dist/zephyr/tool/test-case/create-web-link.js +1 -0
- package/dist/zephyr/tool/test-case/get-links.js +1 -0
- package/dist/zephyr/tool/test-case/get-test-case.js +1 -0
- package/dist/zephyr/tool/test-case/get-test-cases.js +1 -0
- package/dist/zephyr/tool/test-case/get-test-script.js +1 -0
- package/dist/zephyr/tool/test-case/get-test-steps.js +1 -0
- package/dist/zephyr/tool/test-case/update-test-case.js +1 -0
- package/dist/zephyr/tool/test-cycle/create-issue-link.js +1 -0
- package/dist/zephyr/tool/test-cycle/create-test-cycle.js +1 -0
- package/dist/zephyr/tool/test-cycle/create-web-link.js +1 -0
- package/dist/zephyr/tool/test-cycle/get-links.js +1 -0
- package/dist/zephyr/tool/test-cycle/get-test-cycle.js +1 -0
- package/dist/zephyr/tool/test-cycle/get-test-cycles.js +1 -0
- package/dist/zephyr/tool/test-cycle/update-test-cycle.js +1 -0
- package/dist/zephyr/tool/test-execution/create-issue-link.js +1 -0
- package/dist/zephyr/tool/test-execution/create-test-execution.js +1 -0
- package/dist/zephyr/tool/test-execution/get-test-execution-links.js +1 -0
- package/dist/zephyr/tool/test-execution/get-test-execution.js +1 -0
- package/dist/zephyr/tool/test-execution/get-test-executions.js +1 -0
- package/dist/zephyr/tool/test-execution/get-test-steps.js +1 -0
- package/dist/zephyr/tool/test-execution/update-test-execution.js +1 -0
- package/dist/zephyr/tool/test-execution/update-test-steps.js +1 -0
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ const AUTOMATION_TOOLS = [
|
|
|
4
4
|
{
|
|
5
5
|
handler: QMetryToolsHandlers.IMPORT_AUTOMATION_RESULTS,
|
|
6
6
|
title: "Import Automation Test Results",
|
|
7
|
+
toolset: "Automation",
|
|
7
8
|
summary: "Import/Publish automation test results from TestNG, JUnit, Cucumber, Robot, HPUFT, or QAF frameworks into QMetry",
|
|
8
9
|
purpose: "Upload and import automation test result files to create test suites, test cases, and execution records in QMetry",
|
|
9
10
|
inputSchema: ImportAutomationResultsPayloadSchema,
|
|
@@ -269,6 +270,7 @@ const AUTOMATION_TOOLS = [
|
|
|
269
270
|
{
|
|
270
271
|
handler: QMetryToolsHandlers.FETCH_AUTOMATION_STATUS,
|
|
271
272
|
title: "Fetch Automation Status",
|
|
273
|
+
toolset: "Automation",
|
|
272
274
|
summary: "Fetches the status of an automation import job by request ID.",
|
|
273
275
|
purpose: "Track the progress and result of an automation import operation in QMetry.",
|
|
274
276
|
inputSchema: FetchAutomationStatusPayloadSchema,
|
|
@@ -3,6 +3,7 @@ import { CreateIssueArgsSchema, UpdateIssueArgsSchema, IssuesListArgsSchema, Lin
|
|
|
3
3
|
const ISSUE_TOOLS = [
|
|
4
4
|
{
|
|
5
5
|
title: "Create Defect or Issue",
|
|
6
|
+
toolset: "Issues",
|
|
6
7
|
summary: "Create a new defect/issue internally in QMetry.",
|
|
7
8
|
handler: QMetryToolsHandlers.CREATE_ISSUE,
|
|
8
9
|
inputSchema: CreateIssueArgsSchema,
|
|
@@ -120,6 +121,7 @@ const ISSUE_TOOLS = [
|
|
|
120
121
|
},
|
|
121
122
|
{
|
|
122
123
|
title: "Update Issue",
|
|
124
|
+
toolset: "Issues",
|
|
123
125
|
summary: "Update an existing QMetry issue by DefectId and/or entityKey.",
|
|
124
126
|
handler: QMetryToolsHandlers.UPDATE_ISSUE,
|
|
125
127
|
inputSchema: UpdateIssueArgsSchema,
|
|
@@ -170,6 +172,7 @@ const ISSUE_TOOLS = [
|
|
|
170
172
|
},
|
|
171
173
|
{
|
|
172
174
|
title: "Fetch Defects or Issues",
|
|
175
|
+
toolset: "Issues",
|
|
173
176
|
summary: "Fetch QMetry defects or issues - automatically handles viewId resolution based on project",
|
|
174
177
|
handler: QMetryToolsHandlers.FETCH_ISSUES,
|
|
175
178
|
inputSchema: IssuesListArgsSchema,
|
|
@@ -274,6 +277,7 @@ const ISSUE_TOOLS = [
|
|
|
274
277
|
},
|
|
275
278
|
{
|
|
276
279
|
title: "Fetch Linked Issues of Test Case Run",
|
|
280
|
+
toolset: "Issues",
|
|
277
281
|
summary: "Get issues that are linked (or not linked) to a specific test case run in QMetry",
|
|
278
282
|
handler: QMetryToolsHandlers.FETCH_LINKED_ISSUES_BY_TESTCASE_RUN,
|
|
279
283
|
inputSchema: LinkedIssuesByTestCaseRunArgsSchema,
|
|
@@ -403,6 +407,7 @@ const ISSUE_TOOLS = [
|
|
|
403
407
|
},
|
|
404
408
|
{
|
|
405
409
|
title: "Link Issues to Testcase Run",
|
|
410
|
+
toolset: "Issues",
|
|
406
411
|
summary: "Link one or more issues to a QMetry Testcase Run (execution).",
|
|
407
412
|
handler: QMetryToolsHandlers.LINK_ISSUES_TO_TESTCASE_RUN,
|
|
408
413
|
inputSchema: LinkIssuesToTestcaseRunArgsSchema,
|
|
@@ -438,6 +443,7 @@ const ISSUE_TOOLS = [
|
|
|
438
443
|
},
|
|
439
444
|
{
|
|
440
445
|
title: "Fetch Issues Linked to Test Case",
|
|
446
|
+
toolset: "Issues",
|
|
441
447
|
summary: "Get issues that are linked (or not linked) to a specific test case in QMetry",
|
|
442
448
|
handler: QMetryToolsHandlers.FETCH_ISSUES_LINKED_TO_TESTCASE,
|
|
443
449
|
inputSchema: IssuesLinkedToTestCaseArgsSchema,
|
|
@@ -3,6 +3,7 @@ import { ProjectListArgsSchema, ProjectArgsSchema, ReleasesCyclesArgsSchema, Bui
|
|
|
3
3
|
const PROJECT_TOOLS = [
|
|
4
4
|
{
|
|
5
5
|
title: "Fetch QMetry list Projects",
|
|
6
|
+
toolset: "Projects",
|
|
6
7
|
summary: "Fetch QMetry projects list including projectID, name, projectKey, isArchived, viewIds and folderPath needed for other operations",
|
|
7
8
|
handler: QMetryToolsHandlers.FETCH_PROJECTS,
|
|
8
9
|
inputSchema: ProjectListArgsSchema,
|
|
@@ -72,6 +73,7 @@ const PROJECT_TOOLS = [
|
|
|
72
73
|
},
|
|
73
74
|
{
|
|
74
75
|
title: "Set QMetry Project Info",
|
|
76
|
+
toolset: "Projects",
|
|
75
77
|
summary: "Set current QMetry project for your account",
|
|
76
78
|
handler: QMetryToolsHandlers.SET_PROJECT_INFO,
|
|
77
79
|
inputSchema: ProjectArgsSchema,
|
|
@@ -112,6 +114,7 @@ const PROJECT_TOOLS = [
|
|
|
112
114
|
},
|
|
113
115
|
{
|
|
114
116
|
title: "Fetch QMetry Project Info",
|
|
117
|
+
toolset: "Projects",
|
|
115
118
|
summary: "Fetch QMetry project information including viewId and folderPath needed for other operations",
|
|
116
119
|
handler: QMetryToolsHandlers.FETCH_PROJECT_INFO,
|
|
117
120
|
inputSchema: ProjectArgsSchema,
|
|
@@ -146,6 +149,7 @@ const PROJECT_TOOLS = [
|
|
|
146
149
|
},
|
|
147
150
|
{
|
|
148
151
|
title: "Fetch Releases and Cycles",
|
|
152
|
+
toolset: "Projects",
|
|
149
153
|
summary: "Fetch QMetry releases and cycles from the current project",
|
|
150
154
|
handler: QMetryToolsHandlers.FETCH_RELEASES_CYCLES,
|
|
151
155
|
inputSchema: ReleasesCyclesArgsSchema,
|
|
@@ -195,6 +199,7 @@ const PROJECT_TOOLS = [
|
|
|
195
199
|
},
|
|
196
200
|
{
|
|
197
201
|
title: "Fetch Builds",
|
|
202
|
+
toolset: "Projects",
|
|
198
203
|
summary: "Fetch QMetry builds from the current project",
|
|
199
204
|
handler: QMetryToolsHandlers.FETCH_BUILDS,
|
|
200
205
|
inputSchema: BuildArgsSchema,
|
|
@@ -252,6 +257,7 @@ const PROJECT_TOOLS = [
|
|
|
252
257
|
},
|
|
253
258
|
{
|
|
254
259
|
title: "Fetch Platforms",
|
|
260
|
+
toolset: "Projects",
|
|
255
261
|
summary: "Fetch QMetry platforms from the current project",
|
|
256
262
|
handler: QMetryToolsHandlers.FETCH_PLATFORMS,
|
|
257
263
|
inputSchema: PlatformArgsSchema,
|
|
@@ -332,6 +338,7 @@ const PROJECT_TOOLS = [
|
|
|
332
338
|
},
|
|
333
339
|
{
|
|
334
340
|
title: "Create Release",
|
|
341
|
+
toolset: "Projects",
|
|
335
342
|
summary: "Create a new release in QMetry with optional cycle for test planning and execution tracking",
|
|
336
343
|
handler: QMetryToolsHandlers.CREATE_RELEASE,
|
|
337
344
|
inputSchema: CreateReleaseArgsSchema,
|
|
@@ -423,6 +430,7 @@ const PROJECT_TOOLS = [
|
|
|
423
430
|
},
|
|
424
431
|
{
|
|
425
432
|
title: "Create Cycle",
|
|
433
|
+
toolset: "Projects",
|
|
426
434
|
summary: "Create a new cycle within an existing release in QMetry for test execution planning",
|
|
427
435
|
handler: QMetryToolsHandlers.CREATE_CYCLE,
|
|
428
436
|
inputSchema: CreateCycleArgsSchema,
|
|
@@ -538,6 +546,7 @@ const PROJECT_TOOLS = [
|
|
|
538
546
|
},
|
|
539
547
|
{
|
|
540
548
|
title: "Update Cycle",
|
|
549
|
+
toolset: "Projects",
|
|
541
550
|
summary: "Update an existing cycle in QMetry for test execution planning",
|
|
542
551
|
handler: QMetryToolsHandlers.UPDATE_CYCLE,
|
|
543
552
|
inputSchema: UpdateCycleArgsSchema,
|
|
@@ -3,6 +3,7 @@ import { RequirementListArgsSchema, RequirementDetailsArgsSchema, LinkRequiremen
|
|
|
3
3
|
const REQUIREMENT_TOOLS = [
|
|
4
4
|
{
|
|
5
5
|
title: "Fetch Requirements",
|
|
6
|
+
toolset: "Requirements",
|
|
6
7
|
summary: "Fetch QMetry requirements - automatically handles viewId resolution based on project",
|
|
7
8
|
handler: QMetryToolsHandlers.FETCH_REQUIREMENTS,
|
|
8
9
|
inputSchema: RequirementListArgsSchema,
|
|
@@ -178,6 +179,7 @@ const REQUIREMENT_TOOLS = [
|
|
|
178
179
|
},
|
|
179
180
|
{
|
|
180
181
|
title: "Fetch Requirement Details",
|
|
182
|
+
toolset: "Requirements",
|
|
181
183
|
summary: "Get detailed information for a specific QMetry requirement by numeric ID",
|
|
182
184
|
handler: QMetryToolsHandlers.FETCH_REQUIREMENT_DETAILS,
|
|
183
185
|
inputSchema: RequirementDetailsArgsSchema,
|
|
@@ -211,6 +213,7 @@ const REQUIREMENT_TOOLS = [
|
|
|
211
213
|
},
|
|
212
214
|
{
|
|
213
215
|
title: "Link Requirements to Testcase",
|
|
216
|
+
toolset: "Requirements",
|
|
214
217
|
summary: "Link one or more requirements to a test case by entityKey and version IDs.",
|
|
215
218
|
handler: QMetryToolsHandlers.LINK_REQUIREMENT_TO_TESTCASE,
|
|
216
219
|
inputSchema: LinkRequirementToTestCaseArgsSchema,
|
|
@@ -245,6 +248,7 @@ const REQUIREMENT_TOOLS = [
|
|
|
245
248
|
},
|
|
246
249
|
{
|
|
247
250
|
title: "Fetch Test Cases Linked to Requirement",
|
|
251
|
+
toolset: "Requirements",
|
|
248
252
|
summary: "Get test cases that are linked (or not linked) to a specific requirement in QMetry",
|
|
249
253
|
handler: QMetryToolsHandlers.FETCH_TESTCASES_LINKED_TO_REQUIREMENT,
|
|
250
254
|
inputSchema: TestCasesLinkedToRequirementArgsSchema,
|
|
@@ -408,6 +412,7 @@ const REQUIREMENT_TOOLS = [
|
|
|
408
412
|
},
|
|
409
413
|
{
|
|
410
414
|
title: "Fetch Requirements Linked to Test Case",
|
|
415
|
+
toolset: "Requirements",
|
|
411
416
|
summary: "Get requirements that are linked (or not linked) to a specific test case in QMetry",
|
|
412
417
|
handler: QMetryToolsHandlers.FETCH_REQUIREMENTS_LINKED_TO_TESTCASE,
|
|
413
418
|
inputSchema: RequirementsLinkedToTestCaseArgsSchema,
|
|
@@ -3,6 +3,7 @@ import { CreateTestCaseArgsSchema, UpdateTestCaseArgsSchema, TestCaseListArgsSch
|
|
|
3
3
|
const TESTCASE_TOOLS = [
|
|
4
4
|
{
|
|
5
5
|
title: "Create Test Case",
|
|
6
|
+
toolset: "Test Cases",
|
|
6
7
|
summary: "Create a new test case in QMetry with steps, metadata, and release/cycle mapping.",
|
|
7
8
|
handler: QMetryToolsHandlers.CREATE_TEST_CASE,
|
|
8
9
|
inputSchema: CreateTestCaseArgsSchema,
|
|
@@ -106,6 +107,7 @@ const TESTCASE_TOOLS = [
|
|
|
106
107
|
},
|
|
107
108
|
{
|
|
108
109
|
title: "Update Test Case",
|
|
110
|
+
toolset: "Test Cases",
|
|
109
111
|
summary: "Update an existing QMetry test case OR create a new version by tcID and tcVersionID, with auto-resolution from entityKey.",
|
|
110
112
|
handler: QMetryToolsHandlers.UPDATE_TEST_CASE,
|
|
111
113
|
inputSchema: UpdateTestCaseArgsSchema,
|
|
@@ -722,6 +724,7 @@ const TESTCASE_TOOLS = [
|
|
|
722
724
|
},
|
|
723
725
|
{
|
|
724
726
|
title: "Fetch Test Cases",
|
|
727
|
+
toolset: "Test Cases",
|
|
725
728
|
summary: "Fetch QMetry test cases - automatically handles viewId resolution based on project",
|
|
726
729
|
handler: QMetryToolsHandlers.FETCH_TEST_CASES,
|
|
727
730
|
inputSchema: TestCaseListArgsSchema,
|
|
@@ -843,6 +846,7 @@ const TESTCASE_TOOLS = [
|
|
|
843
846
|
},
|
|
844
847
|
{
|
|
845
848
|
title: "Fetch Test Case Details",
|
|
849
|
+
toolset: "Test Cases",
|
|
846
850
|
summary: "Get detailed information for a specific QMetry test case by numeric ID - USE THIS for single test case lookup",
|
|
847
851
|
handler: QMetryToolsHandlers.FETCH_TEST_CASE_DETAILS,
|
|
848
852
|
inputSchema: TestCaseDetailsArgsSchema,
|
|
@@ -879,6 +883,7 @@ const TESTCASE_TOOLS = [
|
|
|
879
883
|
},
|
|
880
884
|
{
|
|
881
885
|
title: "Fetch Test Case Version Details",
|
|
886
|
+
toolset: "Test Cases",
|
|
882
887
|
summary: "Get QMetry test case details for a specific version by numeric ID",
|
|
883
888
|
handler: QMetryToolsHandlers.FETCH_TEST_CASE_VERSION_DETAILS,
|
|
884
889
|
inputSchema: TestCaseVersionDetailsArgsSchema,
|
|
@@ -908,6 +913,7 @@ const TESTCASE_TOOLS = [
|
|
|
908
913
|
},
|
|
909
914
|
{
|
|
910
915
|
title: "Fetch Test Case Steps",
|
|
916
|
+
toolset: "Test Cases",
|
|
911
917
|
summary: "Get detailed test case steps for a specific test case by numeric ID",
|
|
912
918
|
handler: QMetryToolsHandlers.FETCH_TEST_CASE_STEPS,
|
|
913
919
|
inputSchema: TestCaseStepsArgsSchema,
|
|
@@ -937,6 +943,7 @@ const TESTCASE_TOOLS = [
|
|
|
937
943
|
},
|
|
938
944
|
{
|
|
939
945
|
title: "Fetch Test Case Executions",
|
|
946
|
+
toolset: "Test Cases",
|
|
940
947
|
summary: "Get execution records for a specific test case by numeric ID",
|
|
941
948
|
handler: QMetryToolsHandlers.FETCH_TEST_CASE_EXECUTIONS,
|
|
942
949
|
inputSchema: TestCaseExecutionsArgsSchema,
|
|
@@ -3,6 +3,7 @@ import { CreateTestSuiteArgsSchema, UpdateTestSuiteArgsSchema, TestSuiteListArgs
|
|
|
3
3
|
const TESTSUITE_TOOLS = [
|
|
4
4
|
{
|
|
5
5
|
title: "Create Test Suite",
|
|
6
|
+
toolset: "Test Suites",
|
|
6
7
|
summary: "Create a new test suite in QMetry with metadata and release/cycle mapping.",
|
|
7
8
|
handler: QMetryToolsHandlers.CREATE_TEST_SUITE,
|
|
8
9
|
inputSchema: CreateTestSuiteArgsSchema,
|
|
@@ -78,6 +79,7 @@ const TESTSUITE_TOOLS = [
|
|
|
78
79
|
},
|
|
79
80
|
{
|
|
80
81
|
title: "Update Test Suite",
|
|
82
|
+
toolset: "Test Suites",
|
|
81
83
|
summary: "Update an existing QMetry test suite by id(testsuite numeric id), with auto-resolution from entityKey.",
|
|
82
84
|
handler: QMetryToolsHandlers.UPDATE_TEST_SUITE,
|
|
83
85
|
inputSchema: UpdateTestSuiteArgsSchema,
|
|
@@ -139,6 +141,7 @@ const TESTSUITE_TOOLS = [
|
|
|
139
141
|
},
|
|
140
142
|
{
|
|
141
143
|
title: "Fetch Test Suites",
|
|
144
|
+
toolset: "Test Suites",
|
|
142
145
|
summary: "Fetch QMetry test suites - automatically handles viewId resolution based on project",
|
|
143
146
|
handler: QMetryToolsHandlers.FETCH_TEST_SUITES,
|
|
144
147
|
inputSchema: TestSuiteListArgsSchema,
|
|
@@ -244,6 +247,7 @@ const TESTSUITE_TOOLS = [
|
|
|
244
247
|
},
|
|
245
248
|
{
|
|
246
249
|
title: "Fetch Test Suites for Test Case",
|
|
250
|
+
toolset: "Test Suites",
|
|
247
251
|
summary: "Get test suites that can be linked to test cases in QMetry with automatic viewId resolution",
|
|
248
252
|
handler: QMetryToolsHandlers.FETCH_TESTSUITES_FOR_TESTCASE,
|
|
249
253
|
inputSchema: TestSuitesForTestCaseArgsSchema,
|
|
@@ -349,6 +353,7 @@ const TESTSUITE_TOOLS = [
|
|
|
349
353
|
},
|
|
350
354
|
{
|
|
351
355
|
title: "Link Test Cases to Test Suite",
|
|
356
|
+
toolset: "Test Suites",
|
|
352
357
|
summary: "Link test cases to a test suite in QMetry.",
|
|
353
358
|
handler: QMetryToolsHandlers.LINK_TESTCASES_TO_TESTSUITE,
|
|
354
359
|
inputSchema: LinkTestCasesToTestSuiteArgsSchema,
|
|
@@ -398,6 +403,7 @@ const TESTSUITE_TOOLS = [
|
|
|
398
403
|
},
|
|
399
404
|
{
|
|
400
405
|
title: "Requirements Linked Test Cases to Test Suite",
|
|
406
|
+
toolset: "Test Suites",
|
|
401
407
|
summary: "Link test cases (including those linked to requirements) to a test suite in QMetry.",
|
|
402
408
|
handler: QMetryToolsHandlers.REQUIREMENTS_LINKED_TESTCASES_TO_TESTSUITE,
|
|
403
409
|
inputSchema: RequirementsLinkedTestCasesToTestSuiteArgsSchema,
|
|
@@ -443,6 +449,7 @@ const TESTSUITE_TOOLS = [
|
|
|
443
449
|
},
|
|
444
450
|
{
|
|
445
451
|
title: "Link Platforms to Test Suite",
|
|
452
|
+
toolset: "Test Suites",
|
|
446
453
|
summary: "Link one or more platforms to a QMetry Test Suite.",
|
|
447
454
|
handler: QMetryToolsHandlers.LINK_PLATFORMS_TO_TESTSUITE,
|
|
448
455
|
inputSchema: LinkPlatformsToTestSuiteArgsSchema,
|
|
@@ -496,6 +503,7 @@ const TESTSUITE_TOOLS = [
|
|
|
496
503
|
},
|
|
497
504
|
{
|
|
498
505
|
title: "Fetch Test Cases Linked to Test Suite",
|
|
506
|
+
toolset: "Test Suites",
|
|
499
507
|
summary: "Get test cases that are linked (or not linked) to a specific test suite in QMetry",
|
|
500
508
|
handler: QMetryToolsHandlers.FETCH_TESTCASES_BY_TESTSUITE,
|
|
501
509
|
inputSchema: TestCasesByTestSuiteArgsSchema,
|
|
@@ -581,6 +589,7 @@ const TESTSUITE_TOOLS = [
|
|
|
581
589
|
},
|
|
582
590
|
{
|
|
583
591
|
title: "Fetch Executions by Test Suite",
|
|
592
|
+
toolset: "Test Suites",
|
|
584
593
|
summary: "Get executions for a given test suite in QMetry",
|
|
585
594
|
handler: QMetryToolsHandlers.FETCH_EXECUTIONS_BY_TESTSUITE,
|
|
586
595
|
inputSchema: ExecutionsByTestSuiteArgsSchema,
|
|
@@ -693,6 +702,7 @@ const TESTSUITE_TOOLS = [
|
|
|
693
702
|
},
|
|
694
703
|
{
|
|
695
704
|
title: "Fetch Test Case Runs by Test Suite Run",
|
|
705
|
+
toolset: "Test Suites",
|
|
696
706
|
summary: "Get test case runs under a specific test suite run execution in QMetry",
|
|
697
707
|
handler: QMetryToolsHandlers.FETCH_TESTCASE_RUNS_BY_TESTSUITE_RUN,
|
|
698
708
|
inputSchema: TestCaseRunsByTestSuiteRunArgsSchema,
|
|
@@ -845,6 +855,7 @@ const TESTSUITE_TOOLS = [
|
|
|
845
855
|
},
|
|
846
856
|
{
|
|
847
857
|
title: "Bulk Update Test Case Execution Status",
|
|
858
|
+
toolset: "Test Suites",
|
|
848
859
|
summary: "Update execution status for individual or multiple test case runs in bulk",
|
|
849
860
|
handler: QMetryToolsHandlers.BULK_UPDATE_EXECUTION_STATUS,
|
|
850
861
|
inputSchema: BulkUpdateExecutionStatusArgsSchema,
|
package/dist/qtm4j/client.js
CHANGED
|
@@ -110,6 +110,18 @@ class Qtm4jClient {
|
|
|
110
110
|
const { CreateTestCycle } = await import("./tool/test-cycle/create-test-cycle.js");
|
|
111
111
|
const { SearchTestCycles } = await import("./tool/test-cycle/search-test-cycle.js");
|
|
112
112
|
const { UpdateTestCycle } = await import("./tool/test-cycle/update-test-cycle.js");
|
|
113
|
+
const { LinkRequirements } = await import("./tool/test-case/link-requirements.js");
|
|
114
|
+
const { UnlinkRequirements } = await import("./tool/test-case/unlink-requirements.js");
|
|
115
|
+
const { LinkTestCasesToRequirement } = await import("./tool/requirement/link-testcases.js");
|
|
116
|
+
const { UnlinkTestCasesFromRequirement } = await import("./tool/requirement/unlink-testcases.js");
|
|
117
|
+
const { GetLinkedRequirements } = await import("./tool/test-case/get-linked-requirements.js");
|
|
118
|
+
const { GetLinkedTestCasesForRequirement } = await import("./tool/requirement/get-linked-testcases.js");
|
|
119
|
+
const { LinkTestCasesToCycle } = await import("./tool/test-cycle/link-testcases.js");
|
|
120
|
+
const { UnlinkTestCasesFromCycle } = await import("./tool/test-cycle/unlink-testcases.js");
|
|
121
|
+
const { SearchLinkedTestCasesInCycle } = await import("./tool/test-cycle/search-linked-testcases.js");
|
|
122
|
+
const { LinkRequirementsToCycle } = await import("./tool/test-cycle/link-requirements.js");
|
|
123
|
+
const { UnlinkRequirementsFromCycle } = await import("./tool/test-cycle/unlink-requirements.js");
|
|
124
|
+
const { GetLinkedRequirementsForCycle } = await import("./tool/test-cycle/get-linked-requirements.js");
|
|
113
125
|
const tools = [
|
|
114
126
|
new GetProjects(this),
|
|
115
127
|
new SetProjectContext(this),
|
|
@@ -121,7 +133,19 @@ class Qtm4jClient {
|
|
|
121
133
|
new SearchTestCycles(this),
|
|
122
134
|
new UpdateTestCycle(this),
|
|
123
135
|
new UploadAutomationResult(this),
|
|
124
|
-
new GetAutomationHistory(this)
|
|
136
|
+
new GetAutomationHistory(this),
|
|
137
|
+
new LinkRequirements(this),
|
|
138
|
+
new UnlinkRequirements(this),
|
|
139
|
+
new LinkTestCasesToRequirement(this),
|
|
140
|
+
new UnlinkTestCasesFromRequirement(this),
|
|
141
|
+
new GetLinkedRequirements(this),
|
|
142
|
+
new GetLinkedTestCasesForRequirement(this),
|
|
143
|
+
new LinkTestCasesToCycle(this),
|
|
144
|
+
new UnlinkTestCasesFromCycle(this),
|
|
145
|
+
new SearchLinkedTestCasesInCycle(this),
|
|
146
|
+
new LinkRequirementsToCycle(this),
|
|
147
|
+
new UnlinkRequirementsFromCycle(this),
|
|
148
|
+
new GetLinkedRequirementsForCycle(this)
|
|
125
149
|
];
|
|
126
150
|
for (const tool of tools) {
|
|
127
151
|
register(tool.specification, tool.handle);
|
|
@@ -21,6 +21,33 @@ const ENDPOINTS = {
|
|
|
21
21
|
SEARCH_TEST_CYCLES: `${API_CONFIG.API_VERSION}/testcycles/search`,
|
|
22
22
|
/** Update test case endpoint */
|
|
23
23
|
UPDATE_TEST_CASE: (id, versionNo) => `${API_CONFIG.API_VERSION}/testcases/${id}/versions/${versionNo}`,
|
|
24
|
+
RESOLVE_TEST_CYCLE_IDS: (projectId) => `${API_CONFIG.API_VERSION}/projects/${projectId}/mcp/testcycles/resolve-ids`,
|
|
25
|
+
/** Resolve requirement keys → internal Jira issue IDs for a given project */
|
|
26
|
+
RESOLVE_REQUIREMENT_IDS: (projectId) => `${API_CONFIG.API_VERSION}/projects/${projectId}/mcp/requirement/resolve-ids`,
|
|
27
|
+
/** Link requirements to test case endpoint */
|
|
28
|
+
LINK_REQUIREMENTS: (id, versionNo) => `${API_CONFIG.API_VERSION}/testcases/${id}/version/${versionNo}/requirements/link`,
|
|
29
|
+
/** Unlink requirements from test case endpoint */
|
|
30
|
+
UNLINK_REQUIREMENTS: (id, versionNo) => `${API_CONFIG.API_VERSION}/testcases/${id}/versions/${versionNo}/requirements/unlink`,
|
|
31
|
+
/** Link test cases to requirement endpoint */
|
|
32
|
+
LINK_TESTCASES_TO_REQUIREMENT: (requirementId) => `${API_CONFIG.API_VERSION}/requirements/${requirementId}/testcases/link`,
|
|
33
|
+
/** Unlink test cases from requirement endpoint */
|
|
34
|
+
UNLINK_TESTCASES_FROM_REQUIREMENT: (requirementId) => `${API_CONFIG.API_VERSION}/requirements/${requirementId}/testcases/unlink`,
|
|
35
|
+
/** Get linked requirements for a test case endpoint */
|
|
36
|
+
GET_LINKED_REQUIREMENTS: (id) => `${API_CONFIG.API_VERSION}/testcases/${id}/requirements`,
|
|
37
|
+
/** Get linked test cases for a requirement endpoint */
|
|
38
|
+
GET_LINKED_TESTCASES_FOR_REQUIREMENT: (requirementId) => `${API_CONFIG.API_VERSION}/requirements/${requirementId}/testcases`,
|
|
39
|
+
/** Link test cases to test cycle endpoint */
|
|
40
|
+
LINK_TESTCASES_TO_CYCLE: (cycleId) => `${API_CONFIG.API_VERSION}/testcycles/${cycleId}/testcases`,
|
|
41
|
+
/** Unlink test cases from test cycle endpoint */
|
|
42
|
+
UNLINK_TESTCASES_FROM_CYCLE: (cycleId) => `${API_CONFIG.API_VERSION}/testcycles/${cycleId}/testcases`,
|
|
43
|
+
/** Search test cases linked to a test cycle endpoint */
|
|
44
|
+
SEARCH_LINKED_TESTCASES_IN_CYCLE: (cycleId) => `${API_CONFIG.API_VERSION}/testcycles/${cycleId}/testcases/search`,
|
|
45
|
+
/** Get linked requirements for a test cycle endpoint */
|
|
46
|
+
GET_LINKED_REQUIREMENTS_FOR_CYCLE: (cycleId) => `${API_CONFIG.API_VERSION}/testcycles/${cycleId}/requirements`,
|
|
47
|
+
/** Link requirements to test cycle endpoint */
|
|
48
|
+
LINK_REQUIREMENTS_TO_CYCLE: (cycleId) => `${API_CONFIG.API_VERSION}/testcycles/${cycleId}/requirements/link`,
|
|
49
|
+
/** Unlink requirements from test cycle endpoint */
|
|
50
|
+
UNLINK_REQUIREMENTS_FROM_CYCLE: (cycleId) => `${API_CONFIG.API_VERSION}/testcycles/${cycleId}/requirements/unlink`,
|
|
24
51
|
/** Test steps search endpoint */
|
|
25
52
|
TEST_STEPS: (id, versionNo) => `${API_CONFIG.API_VERSION}/testcases/${id}/versions/${versionNo}/teststeps/search`,
|
|
26
53
|
/** Common attributes endpoint (priority, statuses) */
|
|
@@ -57,7 +84,8 @@ const CONTENT_TYPES = {
|
|
|
57
84
|
const HTTP_METHODS = {
|
|
58
85
|
GET: "GET",
|
|
59
86
|
POST: "POST",
|
|
60
|
-
PUT: "PUT"
|
|
87
|
+
PUT: "PUT",
|
|
88
|
+
DELETE: "DELETE"
|
|
61
89
|
};
|
|
62
90
|
const HTTP_STATUS = {
|
|
63
91
|
/** No content status code */
|
|
@@ -160,8 +188,79 @@ const TOOL_NAMES = {
|
|
|
160
188
|
UPDATE_TEST_CYCLE: {
|
|
161
189
|
TITLE: "Update Test Cycle",
|
|
162
190
|
SUMMARY: "Update an existing test cycle in QTM4J by its human-readable key (e.g. 'SCRUM-TR-101'). Supports auto-resolving human-readable names for status and priority. Labels and components support add/delete operations. Only the fields you provide are changed — omitted fields are left as-is. projectId is injected automatically from the active project context."
|
|
191
|
+
},
|
|
192
|
+
/** Link Requirements tool */
|
|
193
|
+
LINK_REQUIREMENTS: {
|
|
194
|
+
TITLE: "Link Requirements to Test Case",
|
|
195
|
+
SUMMARY: "Link one or more Jira requirements to a test case in QTM4J by requirement keys or JQL filter. Requirement keys are resolved to internal IDs automatically."
|
|
196
|
+
},
|
|
197
|
+
/** Unlink Requirements tool */
|
|
198
|
+
UNLINK_REQUIREMENTS: {
|
|
199
|
+
TITLE: "Unlink Requirements from Test Case",
|
|
200
|
+
SUMMARY: "Unlink one or more Jira requirements from a test case in QTM4J by requirement keys, or unlink all requirements at once with unLinkAll."
|
|
201
|
+
},
|
|
202
|
+
/** Link Test Cases to Requirement tool */
|
|
203
|
+
LINK_TESTCASES_TO_REQUIREMENT: {
|
|
204
|
+
TITLE: "Link Test Cases to Requirement",
|
|
205
|
+
SUMMARY: "Link test cases to a Jira requirement in QTM4J by test case keys or filter criteria. Test case keys are resolved to internal IDs automatically."
|
|
206
|
+
},
|
|
207
|
+
/** Unlink Test Cases from Requirement tool */
|
|
208
|
+
UNLINK_TESTCASES_FROM_REQUIREMENT: {
|
|
209
|
+
TITLE: "Unlink Test Cases from Requirement",
|
|
210
|
+
SUMMARY: "Unlink test cases from a Jira requirement in QTM4J by test case keys or filter criteria. Test case keys are resolved to internal IDs automatically."
|
|
211
|
+
},
|
|
212
|
+
/** Get Linked Requirements tool */
|
|
213
|
+
GET_LINKED_REQUIREMENTS: {
|
|
214
|
+
TITLE: "Get Linked Requirements",
|
|
215
|
+
SUMMARY: "Retrieve the Jira requirements linked to a specific test case in QTM4J. Test case key is resolved to internal ID automatically."
|
|
216
|
+
},
|
|
217
|
+
/** Get Linked Test Cases for Requirement tool */
|
|
218
|
+
GET_LINKED_TESTCASES_FOR_REQUIREMENT: {
|
|
219
|
+
TITLE: "Get Linked Test Cases for Requirement",
|
|
220
|
+
SUMMARY: "Retrieve the test cases linked to a Jira requirement in QTM4J. Requirement key is resolved to internal ID automatically."
|
|
221
|
+
},
|
|
222
|
+
/** Link Test Cases to Test Cycle tool */
|
|
223
|
+
LINK_TESTCASES_TO_CYCLE: {
|
|
224
|
+
TITLE: "Link Test Cases to Test Cycle",
|
|
225
|
+
SUMMARY: "Link test cases to a QTM4J test cycle by test case keys or filter criteria. Test case keys are resolved to internal IDs and latest versions automatically."
|
|
226
|
+
},
|
|
227
|
+
/** Unlink Test Cases from Test Cycle tool */
|
|
228
|
+
UNLINK_TESTCASES_FROM_CYCLE: {
|
|
229
|
+
TITLE: "Unlink Test Cases from Test Cycle",
|
|
230
|
+
SUMMARY: "Unlink test cases from a QTM4J test cycle by test case keys, filter criteria, or all at once with unlinkAll."
|
|
231
|
+
},
|
|
232
|
+
/** Search Linked Test Cases in Test Cycle tool */
|
|
233
|
+
SEARCH_LINKED_TESTCASES_IN_CYCLE: {
|
|
234
|
+
TITLE: "Search Linked Test Cases in Test Cycle",
|
|
235
|
+
SUMMARY: "Search and filter test case executions linked to a QTM4J test cycle. Supports pagination, field selection, sorting, and rich filter criteria."
|
|
236
|
+
},
|
|
237
|
+
/** Get Linked Requirements for Test Cycle tool */
|
|
238
|
+
GET_LINKED_REQUIREMENTS_FOR_CYCLE: {
|
|
239
|
+
TITLE: "Get Linked Requirements for Test Cycle",
|
|
240
|
+
SUMMARY: "Retrieve Jira requirements linked to a QTM4J test cycle. Test cycle key is resolved to internal UID automatically."
|
|
241
|
+
},
|
|
242
|
+
/** Link Requirements to Test Cycle tool */
|
|
243
|
+
LINK_REQUIREMENTS_TO_CYCLE: {
|
|
244
|
+
TITLE: "Link Requirements to Test Cycle",
|
|
245
|
+
SUMMARY: "Link one or more Jira requirements to a QTM4J test cycle by requirement keys or JQL filter. Requirement keys are resolved to internal IDs automatically."
|
|
246
|
+
},
|
|
247
|
+
/** Unlink Requirements from Test Cycle tool */
|
|
248
|
+
UNLINK_REQUIREMENTS_FROM_CYCLE: {
|
|
249
|
+
TITLE: "Unlink Requirements from Test Cycle",
|
|
250
|
+
SUMMARY: "Unlink one or more Jira requirements from a QTM4J test cycle by requirement keys, or unlink all requirements at once with unLinkAll."
|
|
163
251
|
}
|
|
164
252
|
};
|
|
253
|
+
const TOOLSETS = {
|
|
254
|
+
/** Test Automation toolset */
|
|
255
|
+
TEST_AUTOMATION: "Test Automation",
|
|
256
|
+
/** Test Cases toolset */
|
|
257
|
+
TEST_CASES: "Test Cases",
|
|
258
|
+
/** Test Cycle Management toolset */
|
|
259
|
+
TEST_CYCLES: "Test Cycles",
|
|
260
|
+
/** Projects toolset */
|
|
261
|
+
PROJECTS: "Projects",
|
|
262
|
+
REQUIREMENTS: "Requirements"
|
|
263
|
+
};
|
|
165
264
|
const CONFIG_KEYS = {
|
|
166
265
|
/** API key configuration key */
|
|
167
266
|
API_KEY: "api_key",
|
|
@@ -257,5 +356,6 @@ export {
|
|
|
257
356
|
RESPONSE_FIELDS,
|
|
258
357
|
SCHEMA_DESCRIPTIONS,
|
|
259
358
|
SORT_DEFAULTS,
|
|
359
|
+
TOOLSETS,
|
|
260
360
|
TOOL_NAMES
|
|
261
361
|
};
|
|
@@ -18,7 +18,9 @@ const ResolverKeys = {
|
|
|
18
18
|
SearchableField: {
|
|
19
19
|
LABEL: "label",
|
|
20
20
|
COMPONENTS: "components",
|
|
21
|
-
TEST_CASE_KEY_TO_UID: "testCaseKeyToUid"
|
|
21
|
+
TEST_CASE_KEY_TO_UID: "testCaseKeyToUid",
|
|
22
|
+
TEST_CYCLE_KEY_TO_UID: "testCycleKeyToUid",
|
|
23
|
+
REQUIREMENT_KEY_TO_ID: "requirementKeyToId"
|
|
22
24
|
}
|
|
23
25
|
};
|
|
24
26
|
var InputField = /* @__PURE__ */ ((InputField2) => {
|
|
@@ -72,10 +72,11 @@ class ApiClient {
|
|
|
72
72
|
* Perform POST request
|
|
73
73
|
* @param endpoint - API endpoint path
|
|
74
74
|
* @param body - Request body object
|
|
75
|
+
* @param params - Optional query parameters
|
|
75
76
|
* @returns Parsed response data
|
|
76
77
|
*/
|
|
77
|
-
async post(endpoint, body) {
|
|
78
|
-
const response = await fetch(this.getUrl(endpoint), {
|
|
78
|
+
async post(endpoint, body, params) {
|
|
79
|
+
const response = await fetch(this.getUrl(endpoint, params), {
|
|
79
80
|
method: HTTP_METHODS.POST,
|
|
80
81
|
headers: {
|
|
81
82
|
...this.getHeaders(),
|
|
@@ -137,6 +138,23 @@ class ApiClient {
|
|
|
137
138
|
});
|
|
138
139
|
return await this.validateAndGetResponseBody(response);
|
|
139
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Perform DELETE request with optional body
|
|
143
|
+
* @param endpoint - API endpoint path
|
|
144
|
+
* @param body - Optional request body object
|
|
145
|
+
* @returns Parsed response data
|
|
146
|
+
*/
|
|
147
|
+
async delete(endpoint, body) {
|
|
148
|
+
const response = await fetch(this.getUrl(endpoint), {
|
|
149
|
+
method: HTTP_METHODS.DELETE,
|
|
150
|
+
headers: {
|
|
151
|
+
...this.getHeaders(),
|
|
152
|
+
[HTTP_HEADERS.CONTENT_TYPE]: CONTENT_TYPES.JSON
|
|
153
|
+
},
|
|
154
|
+
body: body !== void 0 ? JSON.stringify(body) : void 0
|
|
155
|
+
});
|
|
156
|
+
return await this.validateAndGetResponseBody(response);
|
|
157
|
+
}
|
|
140
158
|
/**
|
|
141
159
|
* Upload a file as multipart/form-data using the automation API key.
|
|
142
160
|
* Content-Type is not set manually — fetch sets it with the correct multipart boundary.
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { CommonAttributeResolver } from "./resolvers/common-attribute-resolver.js";
|
|
2
2
|
import { ComponentResolver } from "./resolvers/component-resolver.js";
|
|
3
3
|
import { LabelResolver } from "./resolvers/label-resolver.js";
|
|
4
|
+
import { RequirementIdResolver } from "./resolvers/requirement-id-resolver.js";
|
|
4
5
|
import { TestCaseUidResolver } from "./resolvers/test-case-uid-resolver.js";
|
|
6
|
+
import { TestCycleUidResolver } from "./resolvers/test-cycle-uid-resolver.js";
|
|
5
7
|
const ERROR_NO_PROJECT_CONTEXT = "No active project set. Please call set_project_context before performing this operation.";
|
|
6
8
|
class ResolverRegistry {
|
|
7
9
|
resolverByKey;
|
|
@@ -16,12 +18,16 @@ class ResolverRegistry {
|
|
|
16
18
|
this.testCaseUidResolver = new TestCaseUidResolver(apiClient);
|
|
17
19
|
const labelResolver = new LabelResolver(apiClient, cacheService);
|
|
18
20
|
const componentResolver = new ComponentResolver(apiClient, cacheService);
|
|
21
|
+
const requirementIdResolver = new RequirementIdResolver(apiClient);
|
|
22
|
+
const testcycleUidResolver = new TestCycleUidResolver(apiClient);
|
|
19
23
|
this.resolverByKey = /* @__PURE__ */ new Map();
|
|
20
24
|
for (const resolver of [
|
|
21
25
|
this.commonAttributes,
|
|
22
26
|
labelResolver,
|
|
23
27
|
componentResolver,
|
|
24
|
-
this.testCaseUidResolver
|
|
28
|
+
this.testCaseUidResolver,
|
|
29
|
+
requirementIdResolver,
|
|
30
|
+
testcycleUidResolver
|
|
25
31
|
]) {
|
|
26
32
|
for (const key of resolver.fieldKeys) {
|
|
27
33
|
this.resolverByKey.set(key, resolver);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ENDPOINTS } from "../../config/constants.js";
|
|
2
|
+
import { ResolverKeys } from "../../config/field-resolution.types.js";
|
|
3
|
+
import { Resolver } from "./resolver.js";
|
|
4
|
+
class RequirementIdResolver extends Resolver {
|
|
5
|
+
fieldKeys = [
|
|
6
|
+
ResolverKeys.SearchableField.REQUIREMENT_KEY_TO_ID
|
|
7
|
+
];
|
|
8
|
+
apiClient;
|
|
9
|
+
constructor(apiClient) {
|
|
10
|
+
super();
|
|
11
|
+
this.apiClient = apiClient;
|
|
12
|
+
}
|
|
13
|
+
async resolve(_inputField, _resolverKey, _body, _context, _warnings) {
|
|
14
|
+
}
|
|
15
|
+
async resolveAndReturn(projectId, keys) {
|
|
16
|
+
if (keys.length === 0) return {};
|
|
17
|
+
const response = await this.apiClient.get(
|
|
18
|
+
ENDPOINTS.RESOLVE_REQUIREMENT_IDS(projectId),
|
|
19
|
+
{ keys: keys.join(",") }
|
|
20
|
+
);
|
|
21
|
+
return response;
|
|
22
|
+
}
|
|
23
|
+
clearCache(_projectKey) {
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
RequirementIdResolver
|
|
28
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ENDPOINTS } from "../../config/constants.js";
|
|
2
|
+
import { ResolverKeys } from "../../config/field-resolution.types.js";
|
|
3
|
+
import { Resolver } from "./resolver.js";
|
|
4
|
+
class TestCycleUidResolver extends Resolver {
|
|
5
|
+
fieldKeys = [
|
|
6
|
+
ResolverKeys.SearchableField.TEST_CYCLE_KEY_TO_UID
|
|
7
|
+
];
|
|
8
|
+
apiClient;
|
|
9
|
+
constructor(apiClient) {
|
|
10
|
+
super();
|
|
11
|
+
this.apiClient = apiClient;
|
|
12
|
+
}
|
|
13
|
+
async resolve(_inputField, _resolverKey, _body, _context, _warnings) {
|
|
14
|
+
}
|
|
15
|
+
async resolveAndReturn(projectId, keys) {
|
|
16
|
+
if (keys.length === 0) return {};
|
|
17
|
+
const response = await this.apiClient.get(
|
|
18
|
+
ENDPOINTS.RESOLVE_TEST_CYCLE_IDS(projectId),
|
|
19
|
+
{ keys: keys.join(",") }
|
|
20
|
+
);
|
|
21
|
+
return response;
|
|
22
|
+
}
|
|
23
|
+
clearCache(_projectKey) {
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
TestCycleUidResolver
|
|
28
|
+
};
|