@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QMetryToolsHandlers } from "../../config/constants.js";
|
|
2
|
-
import { CreateTestSuiteArgsSchema, ExecutionsByTestSuiteArgsSchema, LinkPlatformsToTestSuiteArgsSchema, LinkTestCasesToTestSuiteArgsSchema, RequirementsLinkedTestCasesToTestSuiteArgsSchema, TestCaseRunsByTestSuiteRunArgsSchema, TestCasesByTestSuiteArgsSchema, TestSuiteListArgsSchema, TestSuitesForTestCaseArgsSchema, UpdateTestSuiteArgsSchema, } from "../../types/common.js";
|
|
2
|
+
import { BulkUpdateExecutionStatusArgsSchema, CreateTestSuiteArgsSchema, ExecutionsByTestSuiteArgsSchema, LinkPlatformsToTestSuiteArgsSchema, LinkTestCasesToTestSuiteArgsSchema, RequirementsLinkedTestCasesToTestSuiteArgsSchema, TestCaseRunsByTestSuiteRunArgsSchema, TestCasesByTestSuiteArgsSchema, TestSuiteListArgsSchema, TestSuitesForTestCaseArgsSchema, UpdateTestSuiteArgsSchema, } from "../../types/common.js";
|
|
3
3
|
export const TESTSUITE_TOOLS = [
|
|
4
4
|
{
|
|
5
5
|
title: "Create Test Suite",
|
|
@@ -167,17 +167,17 @@ export const TESTSUITE_TOOLS = [
|
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
description: "Get test suites with manual viewId (skip auto-resolution)",
|
|
170
|
-
parameters: { projectKey: "MAC", viewId: 103097, folderPath: "" },
|
|
171
|
-
expectedOutput: "Test suites using manually specified viewId 103097",
|
|
170
|
+
parameters: { projectKey: "MAC", viewId: 103097, folderPath: "" }, // This is an example viewId, must be resolved per project TS viewId
|
|
171
|
+
expectedOutput: "Test suites using manually specified viewId 103097", // This is an example viewId, must be resolved per project TS viewId
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
174
|
description: "List test suites from specific project (ex: project key can be anything (VT, UT, PROJ1, TEST9)",
|
|
175
175
|
parameters: {
|
|
176
176
|
projectKey: "use specific given project key",
|
|
177
|
-
viewId: "fetch specific project given projectKey Test Suite ViewId",
|
|
177
|
+
viewId: "fetch specific project given projectKey Test Suite ViewId", // auto-resolved
|
|
178
178
|
folderPath: "",
|
|
179
179
|
},
|
|
180
|
-
expectedOutput: "Test suites using manually specified viewId 103097 or projectKey",
|
|
180
|
+
expectedOutput: "Test suites using manually specified viewId 103097 or projectKey", // This is an example viewId, must be resolved per project TS viewId
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
183
|
description: "Get test suites by release/cycle filter",
|
|
@@ -274,7 +274,7 @@ export const TESTSUITE_TOOLS = [
|
|
|
274
274
|
},
|
|
275
275
|
{
|
|
276
276
|
description: "Get test suites with custom pagination and auto-resolved viewId",
|
|
277
|
-
parameters: { tsFolderID: 113557, page: 1, limit:
|
|
277
|
+
parameters: { tsFolderID: 113557, page: 1, limit: 25 },
|
|
278
278
|
expectedOutput: "Paginated list of test suites with 20 items per page",
|
|
279
279
|
},
|
|
280
280
|
{
|
|
@@ -316,7 +316,7 @@ export const TESTSUITE_TOOLS = [
|
|
|
316
316
|
},
|
|
317
317
|
{
|
|
318
318
|
description: "Search test suites from specific sub-folder with manual viewId",
|
|
319
|
-
parameters: { tsFolderID: 42, viewId: 104316 },
|
|
319
|
+
parameters: { tsFolderID: 42, viewId: 104316 }, // This is an example viewId, must be resolved per project TS viewId
|
|
320
320
|
expectedOutput: "Test suites available in specific folder ID 42 for test case linking",
|
|
321
321
|
},
|
|
322
322
|
],
|
|
@@ -331,7 +331,7 @@ export const TESTSUITE_TOOLS = [
|
|
|
331
331
|
"VIEWID AUTO-RESOLUTION:",
|
|
332
332
|
"1. System automatically fetches project info using the projectKey",
|
|
333
333
|
"2. Extracts latestViews.TSFS.viewId automatically",
|
|
334
|
-
"3. Example: latestViews.TSFS.viewId = 104316 (MAC project TSFS view)",
|
|
334
|
+
"3. Example: latestViews.TSFS.viewId = 104316 (MAC project TSFS view)", // This is an example viewId, must be resolved per project TSFS viewId
|
|
335
335
|
"4. Manual viewId only needed if you want to override the automatic resolution",
|
|
336
336
|
"WORKFLOW: System automatically handles project info if tsFolderID or viewId is not provided",
|
|
337
337
|
"PROJECT INFO STRUCTURE: clientData.rootFolders.TS.id contains the root test suite folder ID",
|
|
@@ -544,7 +544,7 @@ export const TESTSUITE_TOOLS = [
|
|
|
544
544
|
},
|
|
545
545
|
{
|
|
546
546
|
description: "Get linked test cases with custom pagination",
|
|
547
|
-
parameters: { tsID: 1497291, getLinked: true, page: 1, limit:
|
|
547
|
+
parameters: { tsID: 1497291, getLinked: true, page: 1, limit: 25 },
|
|
548
548
|
expectedOutput: "Paginated list of linked test cases with 50 items per page",
|
|
549
549
|
},
|
|
550
550
|
{
|
|
@@ -624,7 +624,7 @@ export const TESTSUITE_TOOLS = [
|
|
|
624
624
|
parameters: {
|
|
625
625
|
tsID: 194955,
|
|
626
626
|
tsFolderID: 126554,
|
|
627
|
-
viewId: 41799,
|
|
627
|
+
viewId: 41799, // This is an example viewId, must be resolved per project TEL viewId
|
|
628
628
|
},
|
|
629
629
|
expectedOutput: "Executions filtered by test suite folder and specific view configuration",
|
|
630
630
|
},
|
|
@@ -664,6 +664,20 @@ export const TESTSUITE_TOOLS = [
|
|
|
664
664
|
},
|
|
665
665
|
],
|
|
666
666
|
hints: [
|
|
667
|
+
"!MOST IMPORTANT HOW TO GET viewId:",
|
|
668
|
+
"CRITICAL: Always resolve and use the correct test execution viewId for the current project when calling this tool.",
|
|
669
|
+
"The viewId parameter must be fetched from the active project's info (latestViews.TEL.viewId).",
|
|
670
|
+
"Each QMetry project may have a different test execution list viewId, so using a stale or incorrect viewId will result in incomplete or invalid executions list data by test suite id.",
|
|
671
|
+
"Usage workflow:",
|
|
672
|
+
"1. Fetch project info for the current project (Admin/Get info Service).",
|
|
673
|
+
"2. Extract latestViews.TEL.viewId from the response.",
|
|
674
|
+
"3. Use this viewId in the Fetch Test Case Runs by Test Suite Run API call.",
|
|
675
|
+
"Example:",
|
|
676
|
+
" {",
|
|
677
|
+
" tsID: 1533730,",
|
|
678
|
+
" viewId: 94194,", // This is an example viewId, must be resolved per project TEL viewId
|
|
679
|
+
" gridName: 'TESTEXECUTIONLIST'",
|
|
680
|
+
" }",
|
|
667
681
|
"CRITICAL: tsID parameter is REQUIRED - this is the Test Suite numeric ID",
|
|
668
682
|
"HOW TO GET tsID:",
|
|
669
683
|
"1. Call API 'Testsuite/Fetch Testsuite' to get available test suites",
|
|
@@ -716,14 +730,14 @@ export const TESTSUITE_TOOLS = [
|
|
|
716
730
|
examples: [
|
|
717
731
|
{
|
|
718
732
|
description: "Get all test case runs for test suite run ID '107021'",
|
|
719
|
-
parameters: { tsrunID: "107021", viewId: 6887 },
|
|
733
|
+
parameters: { tsrunID: "107021", viewId: 6887 }, // This is an example viewId, must be resolved per project TE viewId
|
|
720
734
|
expectedOutput: "List of test case runs with execution details, status, and metadata",
|
|
721
735
|
},
|
|
722
736
|
{
|
|
723
737
|
description: "Get test case runs with linked defects",
|
|
724
738
|
parameters: {
|
|
725
739
|
tsrunID: "107021",
|
|
726
|
-
viewId: 6887,
|
|
740
|
+
viewId: 6887, // This is an example viewId, must be resolved per project TE viewId
|
|
727
741
|
page: 1,
|
|
728
742
|
limit: 25,
|
|
729
743
|
},
|
|
@@ -733,32 +747,106 @@ export const TESTSUITE_TOOLS = [
|
|
|
733
747
|
description: "Get test case runs for test suite run ID '2362144'",
|
|
734
748
|
parameters: {
|
|
735
749
|
tsrunID: "2362144",
|
|
736
|
-
viewId: 104123,
|
|
750
|
+
viewId: 104123, // This is an example viewId, must be resolved per project TE viewId
|
|
737
751
|
start: 0,
|
|
738
752
|
page: 1,
|
|
739
|
-
limit:
|
|
753
|
+
limit: 25,
|
|
740
754
|
},
|
|
741
755
|
expectedOutput: "Test case runs from the specified test suite run execution",
|
|
742
756
|
},
|
|
743
757
|
],
|
|
744
758
|
hints: [
|
|
759
|
+
"CRITICAL WORKFLOW FOR FETCHING ALL EXECUTIONS OF A TEST SUITE:",
|
|
760
|
+
"When user asks to:",
|
|
761
|
+
" - 'fetch all executions'",
|
|
762
|
+
" - 'get all test runs'",
|
|
763
|
+
" - 'fetch all tcRunIDs for test suite X'",
|
|
764
|
+
" - 'update status for all executions of test suite X'",
|
|
765
|
+
"STEP 1: First call FETCH_EXECUTIONS_BY_TESTSUITE tool with the test suite ID (tsID, not entityKey)",
|
|
766
|
+
" - This returns ALL execution records for that test suite (could be 3, 5, 9, or any number)",
|
|
767
|
+
" - Extract ALL tsRunID values from the response data array",
|
|
768
|
+
" - Example response: data: [{tsRunID: '2739237', ...}, {tsRunID: '2739236', ...}, {tsRunID: '2739235', ...}]",
|
|
769
|
+
"STEP 2: For EACH tsRunID from Step 1, call this tool (FETCH_TEST_CASE_RUNS_BY_TESTSUITE_RUN)",
|
|
770
|
+
" - This returns all test case runs (tcRunID values) for that specific execution",
|
|
771
|
+
" - Repeat for ALL tsRunID values discovered in Step 1",
|
|
772
|
+
"STEP 3: Collect all tcRunID values from all executions",
|
|
773
|
+
" - Now you have the complete list of test case runs across ALL executions",
|
|
774
|
+
" - Use these for bulk status updates or other operations",
|
|
775
|
+
"CRITICAL ERROR TO AVOID:",
|
|
776
|
+
"- NEVER assume or hard-code only 2-3 execution IDs",
|
|
777
|
+
"- NEVER skip Step 1 - always discover ALL executions first",
|
|
778
|
+
"- NEVER fetch tcRunIDs for only some executions - get ALL of them",
|
|
779
|
+
"- If there are 9 executions, you must fetch tcRunIDs for all 9, not just 2",
|
|
780
|
+
"EXAMPLE WORKFLOW:",
|
|
781
|
+
"User: 'Fetch all test case runs for test suite VKMCP-TS-21'",
|
|
782
|
+
"Step 1: Call FETCH_EXECUTIONS_BY_TESTSUITE with tsID (resolved from VKMCP-TS-21)",
|
|
783
|
+
" Result: Found 9 executions with tsRunIDs: 2739237, 2739236, 2739235, 2739234, 2739233, 2739232, 2739231, 2739230, 2739229",
|
|
784
|
+
"Step 2: Call this tool 9 times (once for each tsRunID)",
|
|
785
|
+
" Call 1: tsrunID='2739237' -> returns 54 tcRunIDs",
|
|
786
|
+
" Call 2: tsrunID='2739236' -> returns 54 tcRunIDs",
|
|
787
|
+
" ... (repeat for all 9)",
|
|
788
|
+
"Step 3: Total collected: 9 executions × 54 test cases = 486 total tcRunIDs",
|
|
789
|
+
"",
|
|
790
|
+
"PERFORMANCE CONSIDERATIONS FOR LARGE TEST RUNS:",
|
|
791
|
+
"When dealing with large numbers of test case runs (500+, 1000+), follow these guidelines:",
|
|
792
|
+
"1. ALWAYS inform the user about the scale BEFORE starting operations:",
|
|
793
|
+
" Example: 'Found 9 executions with approximately 486 test case runs. This will require fetching data from all 9 executions and may take a moment.'",
|
|
794
|
+
"2. For bulk status updates on 1000+ test case runs:",
|
|
795
|
+
" - NEVER attempt to update all 1000+ in a single operation",
|
|
796
|
+
" - Break into smaller batches of 10-20 test case runs per update",
|
|
797
|
+
" - Inform user: 'Found 1000 test case runs. Will process in batches of 20 to ensure reliability and performance.'",
|
|
798
|
+
" - Show progress: 'Processing batch 1/50 (20 test runs)...', 'Batch 2/50...'",
|
|
799
|
+
"3. Recommended batch sizes:",
|
|
800
|
+
" - For status updates: 10-20 test case runs per batch",
|
|
801
|
+
" - For fetching data: Can handle larger batches (50-100)",
|
|
802
|
+
" - Adjust based on API response times and timeout limits",
|
|
803
|
+
"4. Always provide progress updates for long-running operations:",
|
|
804
|
+
" - Before: 'Processing 1000 test runs in 50 batches of 20...'",
|
|
805
|
+
" - During: 'Completed 200/1000 test runs (10 batches)...'",
|
|
806
|
+
" - After: 'Successfully updated all 1000 test case runs.'",
|
|
807
|
+
"5. Error handling for batch operations:",
|
|
808
|
+
" - If a batch fails, report which batch and continue with remaining",
|
|
809
|
+
" - Provide summary at the end: 'Completed 48/50 batches. 2 batches failed (batch 23, 45).'",
|
|
810
|
+
" - Allow user to retry failed batches specifically",
|
|
811
|
+
"EXAMPLE LARGE-SCALE WORKFLOW:",
|
|
812
|
+
"User: 'Update status to Failed for all test runs in VKMCP-TS-21'",
|
|
813
|
+
"Step 1: Discover all executions (9 found)",
|
|
814
|
+
"Step 2: Fetch all tcRunIDs (486 total)",
|
|
815
|
+
"Step 3: Inform user: 'Found 486 test case runs across 9 executions. Will update in 25 batches of 20 runs each.'",
|
|
816
|
+
"Step 4: Process in batches with progress updates",
|
|
817
|
+
"Step 5: Report completion: 'Successfully updated all 486 test case runs to Failed status.'",
|
|
818
|
+
"",
|
|
745
819
|
"CRITICAL: tsrunID and viewId parameters are REQUIRED",
|
|
746
820
|
"tsrunID is a STRING identifier for the test suite run execution",
|
|
747
821
|
"viewId is a NUMERIC identifier for the test execution view",
|
|
748
|
-
"HOW TO GET tsrunID:",
|
|
749
|
-
"1. Call API 'Execution/Fetch Executions' to get available executions",
|
|
750
|
-
"2. From the response, get value of following attribute -> data[<index>].tsRunID",
|
|
751
|
-
"3. Example: Test Suite
|
|
752
|
-
"
|
|
753
|
-
"
|
|
754
|
-
"
|
|
755
|
-
"
|
|
822
|
+
"!MOST IMPORTANT HOW TO GET tsrunID:",
|
|
823
|
+
"1. Call API 'Execution/Fetch Executions' (FETCH_EXECUTIONS_BY_TESTSUITE) to get ALL available executions",
|
|
824
|
+
"2. From the response, get value of following attribute -> data[<index>].tsRunID for EVERY execution",
|
|
825
|
+
"3. Example: Test Suite might have multiple executions with IDs '107021', '107022', '107023', etc.",
|
|
826
|
+
"4. NEVER assume there are only 2-3 executions - always fetch to discover the actual count",
|
|
827
|
+
"!MOST IMPORTANT HOW TO GET viewId:",
|
|
828
|
+
"CRITICAL: Always resolve and use the correct test execution viewId for the current project when calling this tool.",
|
|
829
|
+
"The viewId parameter must be fetched from the active project's info (latestViews.TE.viewId).",
|
|
830
|
+
"Each QMetry project may have a different test execution viewId, so using a stale or incorrect viewId will result in incomplete or invalid test case run data.",
|
|
831
|
+
"Usage workflow:",
|
|
832
|
+
"1. Fetch project info for the current project (Admin/Get info Service).",
|
|
833
|
+
"2. Extract latestViews.TE.viewId from the response.",
|
|
834
|
+
"3. Use this viewId in the Fetch Test Case Runs by Test Suite Run API call.",
|
|
835
|
+
"Example:",
|
|
836
|
+
" {",
|
|
837
|
+
' tsrunID: "2362144",',
|
|
838
|
+
" viewId: 104123,", // This is an example viewId, must be resolved per project TE viewId
|
|
839
|
+
" start: 0,",
|
|
840
|
+
" page: 1,",
|
|
841
|
+
" limit: 25",
|
|
842
|
+
" }",
|
|
843
|
+
"This ensures the tool fetches the proper execution runs data for the selected project context.",
|
|
756
844
|
"SIMPLIFIED PAYLOAD: API only accepts essential parameters",
|
|
757
845
|
"SUPPORTED PARAMETERS: start, page, limit, tsrunID, viewId",
|
|
758
846
|
"REMOVED PARAMETERS: filter, sort, showTcWithDefects, udfFilter (cause API errors)",
|
|
759
847
|
"PAGINATION: Use start, page, and limit for result pagination",
|
|
760
848
|
"API REQUIREMENT: Must use exact payload structure that works in Postman",
|
|
761
|
-
'PAYLOAD FORMAT: {"start": 0, "page": 1, "limit": 10, "tsrunID": "2362144", "viewId": 104123}',
|
|
849
|
+
'PAYLOAD FORMAT: {"start": 0, "page": 1, "limit": 10, "tsrunID": "2362144", "viewId": 104123}', // Example payload, must use resolved viewId per project TE viewId
|
|
762
850
|
"Use pagination for large result sets (start, page, limit parameters)",
|
|
763
851
|
"This tool is essential for detailed test execution analysis and reporting",
|
|
764
852
|
"Critical for monitoring individual test case execution performance",
|
|
@@ -769,4 +857,230 @@ export const TESTSUITE_TOOLS = [
|
|
|
769
857
|
readOnly: true,
|
|
770
858
|
idempotent: true,
|
|
771
859
|
},
|
|
860
|
+
{
|
|
861
|
+
title: "Bulk Update Test Case Execution Status",
|
|
862
|
+
summary: "Update execution status for individual or multiple test case runs in bulk",
|
|
863
|
+
handler: QMetryToolsHandlers.BULK_UPDATE_EXECUTION_STATUS,
|
|
864
|
+
inputSchema: BulkUpdateExecutionStatusArgsSchema,
|
|
865
|
+
purpose: "Update the execution status (Pass, Fail, Blocked, Not Run, WIP, etc.) for one or more test case runs. " +
|
|
866
|
+
"This tool enables both single and bulk status updates for test executions, providing flexibility for " +
|
|
867
|
+
"manual test execution management, automated test result updates, and test execution tracking. " +
|
|
868
|
+
"Essential for maintaining accurate test execution records and execution status reporting.",
|
|
869
|
+
useCases: [
|
|
870
|
+
"Update single test case run status to Pass, Fail, Blocked, or Not Run",
|
|
871
|
+
"Bulk update multiple test case run statuses in a single operation",
|
|
872
|
+
"Mark all selected test case runs as Not Run for re-execution",
|
|
873
|
+
"Update execution status after manual test execution",
|
|
874
|
+
"Set execution status based on automated test results",
|
|
875
|
+
"Update test execution status across different test environments",
|
|
876
|
+
"Track test execution progress and completion",
|
|
877
|
+
"Manage test execution status for compliance and reporting",
|
|
878
|
+
],
|
|
879
|
+
examples: [
|
|
880
|
+
{
|
|
881
|
+
description: "Update single test case run status to Failed (single execution)",
|
|
882
|
+
parameters: {
|
|
883
|
+
entityIDs: "66095087",
|
|
884
|
+
entityType: "TCR",
|
|
885
|
+
qmTsRunId: "2720260",
|
|
886
|
+
runStatusID: 123266,
|
|
887
|
+
isBulkOperation: false,
|
|
888
|
+
},
|
|
889
|
+
expectedOutput: "Test case run 66095087 status updated to Failed successfully",
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
description: "Bulk update two test case runs to Pass status (bulk execution)",
|
|
893
|
+
parameters: {
|
|
894
|
+
entityIDs: "66095069,66095075",
|
|
895
|
+
entityType: "TCR",
|
|
896
|
+
qmTsRunId: "2720260",
|
|
897
|
+
runStatusID: 123268,
|
|
898
|
+
isBulkOperation: true,
|
|
899
|
+
comments: "All test cases passed successfully",
|
|
900
|
+
},
|
|
901
|
+
expectedOutput: "Test case runs 66095069 and 66095075 updated to Pass status successfully",
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
description: "Bulk update all selected test case runs to Not Run status",
|
|
905
|
+
parameters: {
|
|
906
|
+
entityIDs: "66095069,66095075,66095081,66095087,66095093,66095099,66095105",
|
|
907
|
+
entityType: "TCR",
|
|
908
|
+
qmTsRunId: "2720260",
|
|
909
|
+
runStatusID: 123269,
|
|
910
|
+
isBulkOperation: true,
|
|
911
|
+
},
|
|
912
|
+
expectedOutput: "7 test case runs updated to Not Run status successfully for re-execution",
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
description: "Update test case run with build/drop information",
|
|
916
|
+
parameters: {
|
|
917
|
+
entityIDs: "66095087",
|
|
918
|
+
entityType: "TCR",
|
|
919
|
+
qmTsRunId: "2720260",
|
|
920
|
+
runStatusID: 123266,
|
|
921
|
+
dropID: 947,
|
|
922
|
+
isBulkOperation: false,
|
|
923
|
+
},
|
|
924
|
+
expectedOutput: "Test case run updated with execution status and build information",
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
description: "Update automated test execution status with automation flag",
|
|
928
|
+
parameters: {
|
|
929
|
+
entityIDs: "66095069,66095075",
|
|
930
|
+
entityType: "TCR",
|
|
931
|
+
qmTsRunId: "2720260",
|
|
932
|
+
runStatusID: 123268,
|
|
933
|
+
isAutoExecuted: "1",
|
|
934
|
+
isBulkOperation: true,
|
|
935
|
+
comments: "Automated test execution completed",
|
|
936
|
+
},
|
|
937
|
+
expectedOutput: "Automated test case runs updated to Pass status with automation flag",
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
description: "Update test case run status with Part 11 Compliance authentication",
|
|
941
|
+
parameters: {
|
|
942
|
+
entityIDs: "66095087",
|
|
943
|
+
entityType: "TCR",
|
|
944
|
+
qmTsRunId: "2720260",
|
|
945
|
+
runStatusID: 123266,
|
|
946
|
+
username: "dhaval.mistry",
|
|
947
|
+
password: "Ispl123#",
|
|
948
|
+
isBulkOperation: false,
|
|
949
|
+
},
|
|
950
|
+
expectedOutput: "Test case run status updated with Part 11 Compliance authentication",
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
description: "Update ALL executions of test suite VKMC-TS-20 to Failed (MULTI-CALL OPERATION)",
|
|
954
|
+
parameters: {
|
|
955
|
+
entityIDs: "66341841,66342887,66342893,66342899",
|
|
956
|
+
entityType: "TCR",
|
|
957
|
+
qmTsRunId: "2733104",
|
|
958
|
+
runStatusID: 123269,
|
|
959
|
+
isBulkOperation: true,
|
|
960
|
+
},
|
|
961
|
+
expectedOutput: "Execution 1/4 updated. The MCP Agent will automatically repeat this operation for executions 2733205, 2733306, and 2733407 using their corresponding entityIDs.",
|
|
962
|
+
},
|
|
963
|
+
],
|
|
964
|
+
hints: [
|
|
965
|
+
"CRITICAL: entityIDs, entityType, qmTsRunId, and runStatusID are REQUIRED parameters",
|
|
966
|
+
"",
|
|
967
|
+
"⚠️ CRITICAL - ALWAYS FETCH STATUS IDs FROM PROJECT INFO:",
|
|
968
|
+
"NEVER use hardcoded or memorized status IDs. Status IDs are PROJECT-SPECIFIC and must be fetched dynamically.",
|
|
969
|
+
"MANDATORY WORKFLOW BEFORE USING runStatusID:",
|
|
970
|
+
"1. Call mcp_smartbear_qmetry_fetch_qmetry_project_info with the current projectKey",
|
|
971
|
+
"2. Extract the 'allstatus' array from the response",
|
|
972
|
+
"3. Match the desired status NAME to find its corresponding ID",
|
|
973
|
+
"4. Use the fetched ID in the runStatusID parameter",
|
|
974
|
+
"",
|
|
975
|
+
"EXAMPLE STATUS ID RESOLUTION:",
|
|
976
|
+
"User says: 'Update status to Failed'",
|
|
977
|
+
"Step 1: Call FETCH_PROJECT_INFO → Get allstatus array",
|
|
978
|
+
"Step 2: Find status where name='Failed' → Extract its id property",
|
|
979
|
+
"Step 3: Use that id as runStatusID (e.g., 123269 for 'Failed')",
|
|
980
|
+
"",
|
|
981
|
+
"COMMON STATUS NAMES (IDs vary by project - MUST VALIDATE):",
|
|
982
|
+
"- 'Passed' / 'Pass' - Test case executed successfully",
|
|
983
|
+
"- 'Failed' / 'Fail' - Test case failed with errors",
|
|
984
|
+
"- 'Blocked' - Test case cannot be executed due to blockers",
|
|
985
|
+
"- 'Not Run' - Test case not yet executed or needs re-execution",
|
|
986
|
+
"- 'WIP' / 'Work In Progress' - Test case execution in progress",
|
|
987
|
+
"- 'Not Applicable' - Test case not applicable for this execution",
|
|
988
|
+
"",
|
|
989
|
+
"WHY THIS IS CRITICAL:",
|
|
990
|
+
"- Status IDs are assigned per QMetry project and are NOT universal",
|
|
991
|
+
"- Using wrong status ID will update tests with incorrect status",
|
|
992
|
+
"- Example: ID 123268 might be 'Blocked' in one project but 'Passed' in another",
|
|
993
|
+
"- The allstatus array is the AUTHORITATIVE source for all status mappings",
|
|
994
|
+
"",
|
|
995
|
+
"HOW TO GET entityIDs (Test Case Run IDs):",
|
|
996
|
+
"1. Call API 'Execution/Fetch Testcase Run ID' (FETCH_TESTCASE_RUNS_BY_TESTSUITE_RUN tool)",
|
|
997
|
+
"2. From the response, get value of following attribute -> data[<index>].tcRunID",
|
|
998
|
+
"3. Example: Single ID '66095087' or Multiple IDs '66095069,66095075,66095081'",
|
|
999
|
+
"4. For bulk operations, provide comma-separated IDs without spaces",
|
|
1000
|
+
"HOW TO GET qmTsRunId (Test Suite Run ID):",
|
|
1001
|
+
"1. Call API 'Execution/Fetch Executions' (FETCH_EXECUTIONS_BY_TESTSUITE tool)",
|
|
1002
|
+
"2. From the response, get value of following attribute -> data[<index>].tsRunID",
|
|
1003
|
+
"3. Example: Test Suite Run ID might be '2720260'",
|
|
1004
|
+
"HOW TO GET runStatusID (Execution Status ID) - DETAILED PROCESS:",
|
|
1005
|
+
"1. Call API 'Admin/Get info Service' (FETCH_PROJECT_INFO tool) with projectKey",
|
|
1006
|
+
"2. From the response, locate the 'allstatus' array",
|
|
1007
|
+
"3. Search for the status object where name matches your desired status (case-insensitive)",
|
|
1008
|
+
"4. Extract the 'id' property from the matching status object",
|
|
1009
|
+
"5. NEVER use example IDs from documentation - they are project-specific",
|
|
1010
|
+
"",
|
|
1011
|
+
"EXAMPLE allstatus ARRAY STRUCTURE:",
|
|
1012
|
+
"allstatus: [",
|
|
1013
|
+
" { name: 'Passed', defaultName: 'passed', id: 123266, color: '#14892C|#FFFFFF' },",
|
|
1014
|
+
" { name: 'Failed', defaultName: 'failed', id: 123269, color: '#FF6666|#FFFFFF' },",
|
|
1015
|
+
" { name: 'Blocked', defaultName: 'blocked', id: 123268, color: '#CCCCCC|#FFFFFF' },",
|
|
1016
|
+
" { name: 'Not Run', defaultName: 'notrun', id: 123270, color: '#205081|#FFFFFF', isdefault: true },",
|
|
1017
|
+
" { name: 'Not Applicable', defaultName: 'empty', id: 123267, color: '#59AFE1|#FFFFFF' }",
|
|
1018
|
+
"]",
|
|
1019
|
+
"Note: Above IDs are EXAMPLES ONLY - fetch actual IDs from your project",
|
|
1020
|
+
"HOW TO GET dropID (Build/Drop ID) - OPTIONAL:",
|
|
1021
|
+
"1. Call API 'Build/List' (FETCH_BUILDS tool)",
|
|
1022
|
+
"2. From the response, get value of following attribute -> data[<index>].dropID",
|
|
1023
|
+
"3. Example: Build/Drop ID might be 947",
|
|
1024
|
+
"ENTITY TYPES:",
|
|
1025
|
+
"- 'TCR' = Test Case Run (most common use case)",
|
|
1026
|
+
"- 'TCSR' = Test Case Step Run (for step-level execution updates)",
|
|
1027
|
+
"BULK OPERATION FLAG:",
|
|
1028
|
+
"- isBulkOperation=false: Single test case run update (one entityID)",
|
|
1029
|
+
"- isBulkOperation=true: Multiple test case runs update (comma-separated entityIDs)",
|
|
1030
|
+
"- Auto-detected: If entityIDs contains comma, defaults to true; otherwise false",
|
|
1031
|
+
"AUTOMATION FLAG (isAutoExecuted) - OPTIONAL:",
|
|
1032
|
+
"- '1' = Automated execution (test run by automation framework)",
|
|
1033
|
+
"- '0' = Manual execution (test run by human tester)",
|
|
1034
|
+
"- Used for execution tracking and reporting purposes",
|
|
1035
|
+
"PART 11 COMPLIANCE (username & password) - CONDITIONAL:",
|
|
1036
|
+
"- Required ONLY if Part 11 Compliance is active in your QMetry instance",
|
|
1037
|
+
"- Used for regulatory compliance and audit trail purposes",
|
|
1038
|
+
"- Not needed for standard QMetry installations",
|
|
1039
|
+
"COMMENTS FIELD - OPTIONAL:",
|
|
1040
|
+
"- Add execution notes, failure reasons, or status change context",
|
|
1041
|
+
"- Useful for tracking why status was changed",
|
|
1042
|
+
"- Appears in execution history and audit logs",
|
|
1043
|
+
"COMMON EXECUTION STATUS NAMES:",
|
|
1044
|
+
"- Pass: Test case executed successfully",
|
|
1045
|
+
"- Fail: Test case failed with errors",
|
|
1046
|
+
"- Blocked: Test case cannot be executed due to blockers",
|
|
1047
|
+
"- Not Run: Test case not yet executed or needs re-execution",
|
|
1048
|
+
"- WIP: Work In Progress - test case execution in progress",
|
|
1049
|
+
"WORKFLOW FOR USER PROMPTS:",
|
|
1050
|
+
"1. If user says 'execute test case run by id to failed' or 'update status to fail':",
|
|
1051
|
+
" - Fetch test case runs to get tcRunID (entityIDs)",
|
|
1052
|
+
" - Fetch project info to get 'Fail' status ID (runStatusID)",
|
|
1053
|
+
" - Set isBulkOperation=false for single ID",
|
|
1054
|
+
"2. If user says 'bulk update test case run status to pass' or 'update all to passed':",
|
|
1055
|
+
" - Fetch test case runs to get multiple tcRunIDs",
|
|
1056
|
+
" - Fetch project info to get 'Pass' status ID",
|
|
1057
|
+
" - Set isBulkOperation=true",
|
|
1058
|
+
" - Join multiple IDs with commas (no spaces)",
|
|
1059
|
+
"3. If user says 'execute status to not run of given test case run ids':",
|
|
1060
|
+
" - Use provided IDs or fetch if needed",
|
|
1061
|
+
" - Fetch project info to get 'Not Run' status ID",
|
|
1062
|
+
" - Set isBulkOperation based on ID count",
|
|
1063
|
+
"4. If the user requests updating status for ALL executions of a test suite, the agent must:",
|
|
1064
|
+
" 1. Call FETCH_EXECUTIONS_BY_TESTSUITE to get all qmTsRunIds.",
|
|
1065
|
+
" 2. For each qmTsRunId:",
|
|
1066
|
+
" - Call FETCH_TESTCASE_RUNS_BY_TESTSUITE_RUN to get tcRunID (entityIDs)",
|
|
1067
|
+
" - Fetch project info to get 'Fail' status ID (runStatusID)",
|
|
1068
|
+
" - Call BULK_UPDATE_EXECUTION_STATUS with the corresponding qmTsRunId + tcRunID + desired runStatusID",
|
|
1069
|
+
" 3. Repeat until all executions are updated.",
|
|
1070
|
+
" This tool is intended to be invoked multiple times in sequence for multi-execution updates.",
|
|
1071
|
+
"FIELD MAPPING CRITICAL NOTES:",
|
|
1072
|
+
"- entityIDs must be comma-separated STRING (e.g., '66095069,66095075')",
|
|
1073
|
+
"- qmTsRunId must be STRING format (e.g., '2720260')",
|
|
1074
|
+
"- runStatusID must be NUMERIC (e.g., 123268)",
|
|
1075
|
+
"- dropID can be numeric or string (flexible)",
|
|
1076
|
+
"API ENDPOINT: PUT /rest/execution/runstatus/bulkupdate",
|
|
1077
|
+
"This tool is essential for test execution management and status tracking",
|
|
1078
|
+
"Critical for maintaining accurate test execution records and reporting",
|
|
1079
|
+
"Use for manual test execution updates and automated test result integration",
|
|
1080
|
+
"Essential for test execution audit trails and compliance requirements",
|
|
1081
|
+
],
|
|
1082
|
+
outputDescription: "JSON object with success status, updated execution details, and confirmation message",
|
|
1083
|
+
readOnly: false,
|
|
1084
|
+
idempotent: false,
|
|
1085
|
+
},
|
|
772
1086
|
];
|
|
@@ -27,6 +27,7 @@ export const QMetryToolsHandlers = {
|
|
|
27
27
|
FETCH_TESTSUITES_FOR_TESTCASE: "getTestSuitesForTestCase",
|
|
28
28
|
FETCH_TESTCASES_BY_TESTSUITE: "getTestCasesByTestSuite",
|
|
29
29
|
FETCH_EXECUTIONS_BY_TESTSUITE: "getExecutionsByTestSuite",
|
|
30
|
+
BULK_UPDATE_EXECUTION_STATUS: "bulkUpdateExecutionStatus",
|
|
30
31
|
FETCH_TESTCASE_RUNS_BY_TESTSUITE_RUN: "getTestCaseRunsByTestSuiteRun",
|
|
31
32
|
FETCH_LINKED_ISSUES_BY_TESTCASE_RUN: "getLinkedIssuesByTestCaseRun",
|
|
32
33
|
FETCH_ISSUES_LINKED_TO_TESTCASE: "getIssuesLinkedToTestCase",
|
|
@@ -37,4 +38,9 @@ export const QMetryToolsHandlers = {
|
|
|
37
38
|
FETCH_ISSUES: "getIssues",
|
|
38
39
|
LINK_ISSUES_TO_TESTCASE_RUN: "linkIssuesToTestcaseRun",
|
|
39
40
|
LINK_PLATFORMS_TO_TESTSUITE: "linkPlatformsToTestSuite",
|
|
41
|
+
IMPORT_AUTOMATION_RESULTS: "importAutomationResults",
|
|
42
|
+
FETCH_AUTOMATION_STATUS: "fetchAutomationStatus",
|
|
43
|
+
CREATE_RELEASE: "createRelease",
|
|
44
|
+
CREATE_CYCLE: "createCycle",
|
|
45
|
+
UPDATE_CYCLE: "updateCycle",
|
|
40
46
|
};
|
|
@@ -5,6 +5,9 @@ export const QMETRY_PATHS = {
|
|
|
5
5
|
GET_RELEASES_CYCLES: "/rest/admin/scope/tree",
|
|
6
6
|
GET_BUILD: "/rest/admin/drop/list",
|
|
7
7
|
GET_PLATFORMS: "/rest/admin/platform/list",
|
|
8
|
+
CREATE_RELEASE: "/rest/admin/release",
|
|
9
|
+
CREATE_CYCLE: "/rest/admin/cycle",
|
|
10
|
+
UPDATE_CYCLE: "/rest/admin/cycle",
|
|
8
11
|
},
|
|
9
12
|
TESTCASE: {
|
|
10
13
|
GET_TC_LIST: "/rest/testcases/list/viewColumns",
|
|
@@ -31,6 +34,7 @@ export const QMETRY_PATHS = {
|
|
|
31
34
|
GET_TESTCASE_RUNS_BY_TESTSUITE_RUN: "/rest/execution/list/viewColumns",
|
|
32
35
|
GET_LINKED_ISSUES_BY_TESTCASE_RUN: "/rest/execution/issue/list/forTCRun",
|
|
33
36
|
LINK_PLATFORMS_TO_TESTSUITE: "/rest/testsuites/link/platforms",
|
|
37
|
+
BULK_UPDATE_EXECUTION_STATUS: "/rest/execution/runstatus/bulkupdate",
|
|
34
38
|
},
|
|
35
39
|
ISSUES: {
|
|
36
40
|
GET_ISSUES_LIST: "/rest/issues/list/viewColumns",
|
|
@@ -38,4 +42,8 @@ export const QMETRY_PATHS = {
|
|
|
38
42
|
GET_ISSUES_LINKED_TO_TC: "/rest/issues/list/ForTC",
|
|
39
43
|
LINK_ISSUES_TO_TESTCASE_RUN: "/rest/execution/link/issue",
|
|
40
44
|
},
|
|
45
|
+
AUTOMATION: {
|
|
46
|
+
IMPORT_RESULTS: "/rest/import/createandscheduletestresults/1",
|
|
47
|
+
GET_STATUS: "/rest/admin/status/automation/:requestID",
|
|
48
|
+
},
|
|
41
49
|
};
|