@smartbear/mcp 0.14.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/bugsnag/client.js +5 -30
- package/dist/package.json.js +1 -1
- package/dist/qmetry/client/api/client-api.js +2 -1
- package/dist/qmetry/client/automation.js +2 -1
- package/dist/qmetry/client/tools/testcase-tools.js +269 -1
- package/dist/qmetry/client/tools/testsuite-tools.js +1 -1
- package/dist/reflect/client.js +25 -263
- package/dist/reflect/config/constants.js +6 -0
- package/dist/reflect/tool/suites/cancel-suite-execution.js +50 -0
- package/dist/reflect/tool/suites/execute-suite.js +40 -0
- package/dist/reflect/tool/suites/get-suite-execution-status.js +50 -0
- package/dist/reflect/tool/suites/list-suite-executions.js +40 -0
- package/dist/reflect/tool/suites/list-suites.js +27 -0
- package/dist/reflect/tool/tests/get-test-status.js +42 -0
- package/dist/reflect/tool/tests/list-tests.js +27 -0
- package/dist/reflect/tool/tests/run-test.js +40 -0
- package/dist/zephyr/client.js +35 -1
- package/dist/zephyr/common/rest-api-schemas.js +282 -237
- package/dist/zephyr/tool/folder/create-folder.js +55 -0
- package/dist/zephyr/tool/issue-link/get-test-cases.js +33 -0
- package/dist/zephyr/tool/issue-link/get-test-cycles.js +32 -0
- package/dist/zephyr/tool/issue-link/get-test-executions.js +32 -0
- package/dist/zephyr/tool/test-case/create-issue-link.js +36 -0
- package/dist/zephyr/tool/test-case/create-test-script.js +55 -0
- package/dist/zephyr/tool/test-case/create-test-steps.js +89 -0
- package/dist/zephyr/tool/test-case/get-links.js +32 -0
- package/dist/zephyr/tool/test-case/get-test-script.js +46 -0
- package/dist/zephyr/tool/test-case/get-test-steps.js +54 -0
- package/dist/zephyr/tool/test-cycle/create-issue-link.js +43 -0
- package/dist/zephyr/tool/test-cycle/create-web-link.js +54 -0
- package/dist/zephyr/tool/test-cycle/get-links.js +39 -0
- package/dist/zephyr/tool/test-execution/create-issue-link.js +43 -0
- package/dist/zephyr/tool/test-execution/get-test-execution-links.js +39 -0
- package/dist/zephyr/tool/test-execution/get-test-steps.js +73 -0
- package/dist/zephyr/tool/test-execution/update-test-execution.js +70 -0
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { ListTestExecutionLinks200Response, ListTestExecutionLinksParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetTestExecutionLinks extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get Test Execution Links",
|
|
6
|
+
summary: "Get links for a specific test execution in Zephyr",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: ListTestExecutionLinksParams,
|
|
10
|
+
outputSchema: ListTestExecutionLinks200Response,
|
|
11
|
+
examples: [
|
|
12
|
+
{
|
|
13
|
+
description: "Get the links oftest execution with id 1",
|
|
14
|
+
parameters: {
|
|
15
|
+
testExecutionIdOrKey: "1"
|
|
16
|
+
},
|
|
17
|
+
expectedOutput: "The test execution links with its details"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
description: "Get the links of test execution with key 'PROJ-E123'",
|
|
21
|
+
parameters: {
|
|
22
|
+
testExecutionIdOrKey: "PROJ-E123"
|
|
23
|
+
},
|
|
24
|
+
expectedOutput: "The test execution links with its details"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
};
|
|
28
|
+
handle = async (args) => {
|
|
29
|
+
const { testExecutionIdOrKey } = ListTestExecutionLinksParams.parse(args);
|
|
30
|
+
const response = await this.client.getApiClient().get(`/testexecutions/${testExecutionIdOrKey}/links`);
|
|
31
|
+
return {
|
|
32
|
+
structuredContent: response,
|
|
33
|
+
content: []
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
GetTestExecutionLinks
|
|
39
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { GetTestExecutionTestSteps200Response, GetTestExecutionTestStepsParams, GetTestExecutionTestStepsQueryParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetTestExecutionSteps extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get Test Execution Steps",
|
|
6
|
+
summary: "Get details of test execution steps in Zephyr",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: GetTestExecutionTestStepsParams.and(
|
|
10
|
+
GetTestExecutionTestStepsQueryParams.partial()
|
|
11
|
+
),
|
|
12
|
+
outputSchema: GetTestExecutionTestSteps200Response,
|
|
13
|
+
examples: [
|
|
14
|
+
{
|
|
15
|
+
description: "Get the first 10 test execution steps for test execution with ID 1",
|
|
16
|
+
parameters: {
|
|
17
|
+
testExecutionIdOrKey: "1",
|
|
18
|
+
maxResults: 10,
|
|
19
|
+
startAt: 0
|
|
20
|
+
},
|
|
21
|
+
expectedOutput: "The first 10 test execution steps with their details"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
description: "Get the first 10 test execution steps for test execution with key 'SA-E1'",
|
|
25
|
+
parameters: {
|
|
26
|
+
testExecutionIdOrKey: "SA-E1",
|
|
27
|
+
maxResults: 10,
|
|
28
|
+
startAt: 0
|
|
29
|
+
},
|
|
30
|
+
expectedOutput: "The first 10 test execution steps with their details"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
description: "Get any test execution step for test execution with key 'SA-E1'",
|
|
34
|
+
parameters: {
|
|
35
|
+
testExecutionIdOrKey: "SA-E1",
|
|
36
|
+
maxResults: 1
|
|
37
|
+
},
|
|
38
|
+
expectedOutput: "One test execution step with its details"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
description: "Get five test execution steps starting from the 7th test execution step for test execution with key 'SA-E1'",
|
|
42
|
+
parameters: {
|
|
43
|
+
testExecutionIdOrKey: "SA-E1",
|
|
44
|
+
maxResults: 5,
|
|
45
|
+
startAt: 6
|
|
46
|
+
},
|
|
47
|
+
expectedOutput: "The 7th to the 11th test execution steps with their details"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
description: "Get test execution steps from the test data row 1 from test execution with key 'SA-E1'",
|
|
51
|
+
parameters: {
|
|
52
|
+
testExecutionIdOrKey: "SA-E1",
|
|
53
|
+
testDataRowNumber: 1,
|
|
54
|
+
maxResults: 10,
|
|
55
|
+
startAt: 0
|
|
56
|
+
},
|
|
57
|
+
expectedOutput: "Test execution steps for the specified test data row"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
};
|
|
61
|
+
handle = async (args) => {
|
|
62
|
+
const { testExecutionIdOrKey } = GetTestExecutionTestStepsParams.parse(args);
|
|
63
|
+
const parsedArgs = GetTestExecutionTestStepsQueryParams.parse(args);
|
|
64
|
+
const response = await this.client.getApiClient().get(`/testexecutions/${testExecutionIdOrKey}/teststeps`, parsedArgs);
|
|
65
|
+
return {
|
|
66
|
+
structuredContent: response,
|
|
67
|
+
content: []
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
GetTestExecutionSteps
|
|
73
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { UpdateTestExecutionParams, UpdateTestExecutionBody } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class UpdateTestExecution extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Update Test Execution",
|
|
6
|
+
summary: "Update an existing Test Execution in Zephyr. This operation only updates specified fields in the payload and ignores `null` or `undefined` values.",
|
|
7
|
+
readOnly: false,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: UpdateTestExecutionParams.and(
|
|
10
|
+
UpdateTestExecutionBody.partial()
|
|
11
|
+
),
|
|
12
|
+
examples: [
|
|
13
|
+
{
|
|
14
|
+
description: "Update the status name to 'PASS' and the environment name to 'ENV-1' in the test execution 'SA-E40'.",
|
|
15
|
+
parameters: {
|
|
16
|
+
testExecutionIdOrKey: "SA-E40",
|
|
17
|
+
statusName: "PASS",
|
|
18
|
+
environmentName: "ENV-1"
|
|
19
|
+
},
|
|
20
|
+
expectedOutput: "The test execution should be updated, but no output is expected."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
description: "Update execution time and actual end date for test execution id '1' (keep everything else unchanged).",
|
|
24
|
+
parameters: {
|
|
25
|
+
testExecutionIdOrKey: "1",
|
|
26
|
+
executionTime: "2018-05-19T13:15:13Z",
|
|
27
|
+
actualEndDate: "2018-05-20T13:15:13Z"
|
|
28
|
+
},
|
|
29
|
+
expectedOutput: "The test execution should be updated, but no output is expected."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
description: "For test execution 'SA-E40', update the test executor and assignee to be the user with ID 10000.",
|
|
33
|
+
parameters: {
|
|
34
|
+
testExecutionIdOrKey: "SA-E40",
|
|
35
|
+
executedById: "10000",
|
|
36
|
+
assignedToId: "10000"
|
|
37
|
+
},
|
|
38
|
+
expectedOutput: "The test execution should be updated, but no output is expected."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
description: "In test execution 'SA-E40', add a comment saying that this execution was updated via API.",
|
|
42
|
+
parameters: {
|
|
43
|
+
testExecutionIdOrKey: "SA-E40",
|
|
44
|
+
comment: "execution updated via API"
|
|
45
|
+
},
|
|
46
|
+
expectedOutput: "The test execution should be updated, but no output is expected."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
description: "Remove the assigned user from test execution 'SA-E40'.",
|
|
50
|
+
parameters: {
|
|
51
|
+
testExecutionIdOrKey: "SA-E40",
|
|
52
|
+
assignedToId: null
|
|
53
|
+
},
|
|
54
|
+
expectedOutput: "The test execution should be updated, but no output is expected."
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
};
|
|
58
|
+
handle = async (args) => {
|
|
59
|
+
const { testExecutionIdOrKey } = UpdateTestExecutionParams.parse(args);
|
|
60
|
+
const body = UpdateTestExecutionBody.partial().parse(args);
|
|
61
|
+
await this.client.getApiClient().put(`/testexecutions/${testExecutionIdOrKey}`, body);
|
|
62
|
+
return {
|
|
63
|
+
structuredContent: {},
|
|
64
|
+
content: []
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
UpdateTestExecution
|
|
70
|
+
};
|