@smartbear/mcp 0.14.0 → 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 +1675 -1955
- package/dist/zephyr/tool/environment/get-environments.js +4 -4
- 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/priority/get-priorities.js +4 -4
- package/dist/zephyr/tool/project/get-project.js +4 -4
- package/dist/zephyr/tool/project/get-projects.js +4 -4
- package/dist/zephyr/tool/status/get-statuses.js +4 -4
- package/dist/zephyr/tool/test-case/create-issue-link.js +36 -0
- package/dist/zephyr/tool/test-case/create-test-case.js +4 -4
- 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/create-web-link.js +6 -6
- package/dist/zephyr/tool/test-case/get-links.js +32 -0
- package/dist/zephyr/tool/test-case/get-test-case.js +4 -4
- package/dist/zephyr/tool/test-case/get-test-cases.js +4 -4
- 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-case/update-test-case.js +5 -3
- package/dist/zephyr/tool/test-cycle/create-issue-link.js +43 -0
- package/dist/zephyr/tool/test-cycle/create-test-cycle.js +4 -4
- 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-cycle/get-test-cycle.js +4 -4
- package/dist/zephyr/tool/test-cycle/get-test-cycles.js +4 -4
- package/dist/zephyr/tool/test-cycle/update-test-cycle.js +5 -3
- package/dist/zephyr/tool/test-execution/create-issue-link.js +43 -0
- package/dist/zephyr/tool/test-execution/create-test-execution.js +4 -4
- package/dist/zephyr/tool/test-execution/get-test-execution-links.js +39 -0
- package/dist/zephyr/tool/test-execution/get-test-execution.js +4 -4
- package/dist/zephyr/tool/test-execution/get-test-executions.js +4 -4
- 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,54 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { GetTestCaseTestSteps200Response, GetTestCaseTestStepsParams, GetTestCaseTestStepsQueryParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetTestCaseSteps extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get Test Case Steps",
|
|
6
|
+
summary: "Get details of test case steps in Zephyr",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: GetTestCaseTestStepsParams.and(
|
|
10
|
+
GetTestCaseTestStepsQueryParams.partial()
|
|
11
|
+
),
|
|
12
|
+
outputSchema: GetTestCaseTestSteps200Response,
|
|
13
|
+
examples: [
|
|
14
|
+
{
|
|
15
|
+
description: "Get the first 10 test case steps for test case with key 'SA-T1'",
|
|
16
|
+
parameters: {
|
|
17
|
+
testCaseKey: "SA-T1",
|
|
18
|
+
maxResults: 10,
|
|
19
|
+
startAt: 0
|
|
20
|
+
},
|
|
21
|
+
expectedOutput: "The first 10 test case steps with their details"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
description: "Get any test case step for test case with key 'SA-T1'",
|
|
25
|
+
parameters: {
|
|
26
|
+
testCaseKey: "SA-T1",
|
|
27
|
+
maxResults: 1
|
|
28
|
+
},
|
|
29
|
+
expectedOutput: "One test case step with its details"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
description: "Get five test case steps starting from the 7th test case step of the list for test case with key 'SA-T1'",
|
|
33
|
+
parameters: {
|
|
34
|
+
testCaseKey: "SA-T1",
|
|
35
|
+
maxResults: 5,
|
|
36
|
+
startAt: 6
|
|
37
|
+
},
|
|
38
|
+
expectedOutput: "The 7th to the 11th test case steps with their details"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
};
|
|
42
|
+
handle = async (args) => {
|
|
43
|
+
const { testCaseKey } = GetTestCaseTestStepsParams.parse(args);
|
|
44
|
+
const parsedArgs = GetTestCaseTestStepsQueryParams.parse(args);
|
|
45
|
+
const response = await this.client.getApiClient().get(`/testcases/${testCaseKey}/teststeps`, parsedArgs);
|
|
46
|
+
return {
|
|
47
|
+
structuredContent: response,
|
|
48
|
+
content: []
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
GetTestCaseSteps
|
|
54
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { UpdateTestCaseParams, UpdateTestCaseBody } from "../../common/rest-api-schemas.js";
|
|
3
3
|
import { deepMerge } from "../../common/utils.js";
|
|
4
4
|
class UpdateTestCase extends Tool {
|
|
5
5
|
specification = {
|
|
@@ -7,7 +7,7 @@ class UpdateTestCase extends Tool {
|
|
|
7
7
|
summary: 'Update an existing Test Case in Zephyr. This operation fetches the current test case and merges your updates with it to prevent accidental property deletion. Properties which are not included in the tool call will be left unchanged. To remove a property, set it to null explicitly. For fields that accept multiple values, such as `labels`, if the field is provided, it will override the previous values. For example, if `labels` is provided with the values `["label1", "label2"]`, the Test Case will now only have those two labels, and any previous labels will be removed. If you want to add a label, you would need to specify in the prompt the intention to add a label.',
|
|
8
8
|
readOnly: false,
|
|
9
9
|
idempotent: true,
|
|
10
|
-
inputSchema:
|
|
10
|
+
inputSchema: UpdateTestCaseParams.and(UpdateTestCaseBody.partial()),
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Update the name of the test case 'SA-T10' to 'Check axial pump' and objective to 'To ensure the axial pump can be enabled'",
|
|
@@ -61,7 +61,9 @@ class UpdateTestCase extends Tool {
|
|
|
61
61
|
]
|
|
62
62
|
};
|
|
63
63
|
handle = async (args) => {
|
|
64
|
-
const parsed =
|
|
64
|
+
const parsed = UpdateTestCaseParams.and(UpdateTestCaseBody.partial()).parse(
|
|
65
|
+
args
|
|
66
|
+
);
|
|
65
67
|
const { testCaseKey, ...updates } = parsed;
|
|
66
68
|
const existingTestCase = await this.client.getApiClient().get(`/testcases/${testCaseKey}`);
|
|
67
69
|
const mergedBody = deepMerge(existingTestCase, updates);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { CreateTestCycleIssueLinkParams, CreateTestCycleIssueLinkBody } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class CreateTestCycleIssueLink extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Create Test Cycle Issue Link",
|
|
6
|
+
summary: "Create a new link between an issue in Jira and a Test Cycle in Zephyr",
|
|
7
|
+
readOnly: false,
|
|
8
|
+
idempotent: false,
|
|
9
|
+
inputSchema: CreateTestCycleIssueLinkParams.and(
|
|
10
|
+
CreateTestCycleIssueLinkBody
|
|
11
|
+
),
|
|
12
|
+
examples: [
|
|
13
|
+
{
|
|
14
|
+
description: "Create a link between the test cycle with key SA-R1 and the Jira Issue ID 10100",
|
|
15
|
+
parameters: {
|
|
16
|
+
testCycleIdOrKey: "SA-R1",
|
|
17
|
+
issueId: 10100
|
|
18
|
+
},
|
|
19
|
+
expectedOutput: "The link between Test Cycle and Jira issue should be created, but no output is expected."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
description: "Create a link between the test cycle with ID 1001 and the Jira issue ID 20200",
|
|
23
|
+
parameters: {
|
|
24
|
+
testCycleIdOrKey: "1001",
|
|
25
|
+
issueId: 20200
|
|
26
|
+
},
|
|
27
|
+
expectedOutput: "The link between Test Cycle and Jira issue should be created, but no output is expected."
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
};
|
|
31
|
+
handle = async (args) => {
|
|
32
|
+
const { testCycleIdOrKey } = CreateTestCycleIssueLinkParams.parse(args);
|
|
33
|
+
const body = CreateTestCycleIssueLinkBody.parse(args);
|
|
34
|
+
await this.client.getApiClient().post(`/testcycles/${testCycleIdOrKey}/links/issues`, body);
|
|
35
|
+
return {
|
|
36
|
+
structuredContent: {},
|
|
37
|
+
content: []
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
CreateTestCycleIssueLink
|
|
43
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { CreateTestCycle201Response, CreateTestCycleBody } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class CreateTestCycle extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Create Test Cycle",
|
|
6
6
|
summary: "Create a new Test Cycle in Zephyr specified project",
|
|
7
7
|
readOnly: false,
|
|
8
8
|
idempotent: false,
|
|
9
|
-
inputSchema:
|
|
10
|
-
outputSchema:
|
|
9
|
+
inputSchema: CreateTestCycleBody,
|
|
10
|
+
outputSchema: CreateTestCycle201Response,
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Create a Test Cycle in project SA to ensure that the axial pump can be enabled",
|
|
@@ -57,7 +57,7 @@ class CreateTestCycle extends Tool {
|
|
|
57
57
|
]
|
|
58
58
|
};
|
|
59
59
|
handle = async (args) => {
|
|
60
|
-
const body =
|
|
60
|
+
const body = CreateTestCycleBody.parse(args);
|
|
61
61
|
const response = await this.client.getApiClient().post(`/testcycles/`, body);
|
|
62
62
|
return {
|
|
63
63
|
structuredContent: response,
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { CreateTestCycleWebLinkParams, CreateTestCycleWebLinkBody } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class CreateTestCycleWebLink extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Create Test Cycle Web Link",
|
|
6
|
+
summary: "Create a new Web Link for a Test Cycle in Zephyr",
|
|
7
|
+
readOnly: false,
|
|
8
|
+
idempotent: false,
|
|
9
|
+
inputSchema: CreateTestCycleWebLinkParams.and(
|
|
10
|
+
CreateTestCycleWebLinkBody.partial()
|
|
11
|
+
),
|
|
12
|
+
examples: [
|
|
13
|
+
{
|
|
14
|
+
description: "Create a link between the specified test cycle by Id '100001' and generic URL 'https://www.atlassian.com' with description 'Atlassian homepage'",
|
|
15
|
+
parameters: {
|
|
16
|
+
testCycleIdOrKey: "100001",
|
|
17
|
+
url: "https://www.atlassian.com",
|
|
18
|
+
description: "Atlassian homepage"
|
|
19
|
+
},
|
|
20
|
+
expectedOutput: "The newly created Web Link with its ID and self link"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
description: "Create a web link for test cycle 'SA-R15' pointing to url: 'https://atlassian.com' with description 'Atlassian homepage'",
|
|
24
|
+
parameters: {
|
|
25
|
+
testCycleIdOrKey: "SA-R15",
|
|
26
|
+
url: "https://atlassian.com",
|
|
27
|
+
description: "Documentation for pump specifications"
|
|
28
|
+
},
|
|
29
|
+
expectedOutput: "The newly created Web Link with its ID and self link"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
description: "Attach a documentation link 'https://docs.atlassian.com' to test cycle MM2-R15 for pump specifications",
|
|
33
|
+
parameters: {
|
|
34
|
+
testCycleIdOrKey: "10001",
|
|
35
|
+
url: "https://docs.atlassian.com",
|
|
36
|
+
description: "Documentation for pump specifications"
|
|
37
|
+
},
|
|
38
|
+
expectedOutput: "The newly created Web Link with its ID and self link"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
};
|
|
42
|
+
handle = async (args) => {
|
|
43
|
+
const { testCycleIdOrKey } = CreateTestCycleWebLinkParams.parse(args);
|
|
44
|
+
const body = CreateTestCycleWebLinkBody.parse(args);
|
|
45
|
+
const response = await this.client.getApiClient().post(`/testcycles/${testCycleIdOrKey}/links/weblinks`, body);
|
|
46
|
+
return {
|
|
47
|
+
structuredContent: response,
|
|
48
|
+
content: []
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
CreateTestCycleWebLink
|
|
54
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { GetTestCycleLinks200Response, GetTestCycleLinksParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetTestCycleLinks extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get Test Cycle Links",
|
|
6
|
+
summary: "Get all links (issues, web links, and test plans) associated with a test cycle in Zephyr",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: GetTestCycleLinksParams,
|
|
10
|
+
outputSchema: GetTestCycleLinks200Response,
|
|
11
|
+
examples: [
|
|
12
|
+
{
|
|
13
|
+
description: "Get all links for test cycle with id 1",
|
|
14
|
+
parameters: {
|
|
15
|
+
testCycleIdOrKey: "1"
|
|
16
|
+
},
|
|
17
|
+
expectedOutput: "All links (issues, web links, test plans) for the test cycle"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
description: "Get all links for test cycle with key 'SA-R40'",
|
|
21
|
+
parameters: {
|
|
22
|
+
testCycleIdOrKey: "SA-R40"
|
|
23
|
+
},
|
|
24
|
+
expectedOutput: "All links (issues, web links, test plans) for the test cycle with key SA-R40"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
};
|
|
28
|
+
handle = async (args) => {
|
|
29
|
+
const { testCycleIdOrKey } = GetTestCycleLinksParams.parse(args);
|
|
30
|
+
const response = await this.client.getApiClient().get(`/testcycles/${testCycleIdOrKey}/links`);
|
|
31
|
+
return {
|
|
32
|
+
structuredContent: response,
|
|
33
|
+
content: []
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
GetTestCycleLinks
|
|
39
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { GetTestCycle200Response, GetTestCycleParams } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class GetTestCycle extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Get Test Cycle",
|
|
6
6
|
summary: "Get details of test cycle specified by id or key in Zephyr",
|
|
7
7
|
readOnly: true,
|
|
8
8
|
idempotent: true,
|
|
9
|
-
inputSchema:
|
|
10
|
-
outputSchema:
|
|
9
|
+
inputSchema: GetTestCycleParams,
|
|
10
|
+
outputSchema: GetTestCycle200Response,
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Get the test cycle with id 1",
|
|
@@ -26,7 +26,7 @@ class GetTestCycle extends Tool {
|
|
|
26
26
|
]
|
|
27
27
|
};
|
|
28
28
|
handle = async (args) => {
|
|
29
|
-
const { testCycleIdOrKey } =
|
|
29
|
+
const { testCycleIdOrKey } = GetTestCycleParams.parse(args);
|
|
30
30
|
const response = await this.client.getApiClient().get(`/testcycles/${testCycleIdOrKey}`);
|
|
31
31
|
return {
|
|
32
32
|
structuredContent: response,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ListTestCycles200Response, ListTestCyclesQueryParams } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class GetTestCycles extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Get Test Cycles",
|
|
6
6
|
summary: "Get details of Test Cycles in Zephyr",
|
|
7
7
|
readOnly: true,
|
|
8
8
|
idempotent: true,
|
|
9
|
-
inputSchema:
|
|
10
|
-
outputSchema:
|
|
9
|
+
inputSchema: ListTestCyclesQueryParams,
|
|
10
|
+
outputSchema: ListTestCycles200Response,
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Get the first 10 Test Cycles",
|
|
@@ -59,7 +59,7 @@ class GetTestCycles extends Tool {
|
|
|
59
59
|
]
|
|
60
60
|
};
|
|
61
61
|
handle = async (args) => {
|
|
62
|
-
const parsedArgs =
|
|
62
|
+
const parsedArgs = ListTestCyclesQueryParams.parse(args);
|
|
63
63
|
const response = await this.client.getApiClient().get("/testcycles", parsedArgs);
|
|
64
64
|
return {
|
|
65
65
|
structuredContent: response,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { UpdateTestCycleParams, UpdateTestCycleBody } from "../../common/rest-api-schemas.js";
|
|
3
3
|
import { deepMerge } from "../../common/utils.js";
|
|
4
4
|
class UpdateTestCycle extends Tool {
|
|
5
5
|
specification = {
|
|
@@ -7,7 +7,7 @@ class UpdateTestCycle extends Tool {
|
|
|
7
7
|
summary: "Update an existing Test Cycle in Zephyr. This operation fetches the current test cycle and merges your updates with it to prevent accidental property deletion. To remove a property, set it to null explicitly. The plannedStartDate and plannedEndDate fields cannot be cleared",
|
|
8
8
|
readOnly: false,
|
|
9
9
|
idempotent: true,
|
|
10
|
-
inputSchema:
|
|
10
|
+
inputSchema: UpdateTestCycleParams.and(UpdateTestCycleBody.partial()),
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Update the name of the test cycle 'SA-R40' to 'Sprint 1 Regression - Updated' and set description.",
|
|
@@ -69,7 +69,9 @@ class UpdateTestCycle extends Tool {
|
|
|
69
69
|
]
|
|
70
70
|
};
|
|
71
71
|
handle = async (args) => {
|
|
72
|
-
const parsed =
|
|
72
|
+
const parsed = UpdateTestCycleParams.and(
|
|
73
|
+
UpdateTestCycleBody.partial()
|
|
74
|
+
).parse(args);
|
|
73
75
|
const { testCycleIdOrKey, ...updatesRaw } = parsed;
|
|
74
76
|
const updates = { ...updatesRaw };
|
|
75
77
|
if (updates.plannedStartDate === null) delete updates.plannedStartDate;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { CreateTestExecutionIssueLinkParams, CreateTestExecutionIssueLinkBody } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class CreateTestExecutionIssueLink extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Create Test Execution Issue Link",
|
|
6
|
+
summary: "Create a new link between a Jira issue and a Test Execution in Zephyr",
|
|
7
|
+
readOnly: false,
|
|
8
|
+
idempotent: false,
|
|
9
|
+
inputSchema: CreateTestExecutionIssueLinkParams.and(
|
|
10
|
+
CreateTestExecutionIssueLinkBody
|
|
11
|
+
),
|
|
12
|
+
examples: [
|
|
13
|
+
{
|
|
14
|
+
description: "Create a link between the test execution with key SA-E40 and the Jira Issue ID 10100",
|
|
15
|
+
parameters: {
|
|
16
|
+
testExecutionIdOrKey: "SA-E40",
|
|
17
|
+
issueId: 10100
|
|
18
|
+
},
|
|
19
|
+
expectedOutput: "The link between Test Execution and Jira issue should be created, but no output is expected."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
description: "Create a link between the test execution with ID 1 and the Jira Issue ID 20050",
|
|
23
|
+
parameters: {
|
|
24
|
+
testExecutionIdOrKey: "1",
|
|
25
|
+
issueId: 20050
|
|
26
|
+
},
|
|
27
|
+
expectedOutput: "The link between Test Execution and Jira issue should be created, but no output is expected."
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
};
|
|
31
|
+
handle = async (args) => {
|
|
32
|
+
const { testExecutionIdOrKey } = CreateTestExecutionIssueLinkParams.parse(args);
|
|
33
|
+
const body = CreateTestExecutionIssueLinkBody.parse(args);
|
|
34
|
+
await this.client.getApiClient().post(`/testexecutions/${testExecutionIdOrKey}/links/issues`, body);
|
|
35
|
+
return {
|
|
36
|
+
structuredContent: {},
|
|
37
|
+
content: []
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
CreateTestExecutionIssueLink
|
|
43
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { CreateTestExecution201Response, CreateTestExecutionBody } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class CreateTestExecution extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Create Test Execution",
|
|
6
6
|
summary: "Create a new Test Execution for a Test Case within a specific Test Cycle",
|
|
7
7
|
readOnly: false,
|
|
8
8
|
idempotent: false,
|
|
9
|
-
inputSchema:
|
|
10
|
-
outputSchema:
|
|
9
|
+
inputSchema: CreateTestExecutionBody,
|
|
10
|
+
outputSchema: CreateTestExecution201Response,
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Create a Passed execution for test case SA-T1 in cycle SA-R1",
|
|
@@ -53,7 +53,7 @@ class CreateTestExecution extends Tool {
|
|
|
53
53
|
]
|
|
54
54
|
};
|
|
55
55
|
handle = async (args) => {
|
|
56
|
-
const body =
|
|
56
|
+
const body = CreateTestExecutionBody.parse(args);
|
|
57
57
|
const response = await this.client.getApiClient().post(`/testexecutions/`, body);
|
|
58
58
|
return {
|
|
59
59
|
structuredContent: response,
|
|
@@ -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
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { GetTestExecution200Response, GetTestExecutionParams } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class GetTestExecution extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Get Test Execution",
|
|
6
6
|
summary: "Get details of test execution specified by id or key in Zephyr",
|
|
7
7
|
readOnly: true,
|
|
8
8
|
idempotent: true,
|
|
9
|
-
inputSchema:
|
|
10
|
-
outputSchema:
|
|
9
|
+
inputSchema: GetTestExecutionParams,
|
|
10
|
+
outputSchema: GetTestExecution200Response,
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Get the test execution with id 1",
|
|
@@ -26,7 +26,7 @@ class GetTestExecution extends Tool {
|
|
|
26
26
|
]
|
|
27
27
|
};
|
|
28
28
|
handle = async (args) => {
|
|
29
|
-
const { testExecutionIdOrKey } =
|
|
29
|
+
const { testExecutionIdOrKey } = GetTestExecutionParams.parse(args);
|
|
30
30
|
const response = await this.client.getApiClient().get(`/testexecutions/${testExecutionIdOrKey}`);
|
|
31
31
|
return {
|
|
32
32
|
structuredContent: response,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ListTestExecutionsNextgen200Response, ListTestExecutionsNextgenQueryParams } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class GetTestExecutions extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Get Test Executions",
|
|
6
6
|
summary: "Get test executions with optional filters",
|
|
7
7
|
readOnly: true,
|
|
8
8
|
idempotent: true,
|
|
9
|
-
inputSchema:
|
|
10
|
-
outputSchema:
|
|
9
|
+
inputSchema: ListTestExecutionsNextgenQueryParams,
|
|
10
|
+
outputSchema: ListTestExecutionsNextgen200Response,
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Get the first 10 test executions",
|
|
@@ -32,7 +32,7 @@ class GetTestExecutions extends Tool {
|
|
|
32
32
|
]
|
|
33
33
|
};
|
|
34
34
|
handle = async (args) => {
|
|
35
|
-
const parsedArgs =
|
|
35
|
+
const parsedArgs = ListTestExecutionsNextgenQueryParams.parse(args);
|
|
36
36
|
const response = await this.client.getApiClient().get("/testexecutions/nextgen", parsedArgs);
|
|
37
37
|
return {
|
|
38
38
|
structuredContent: response,
|
|
@@ -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
|
+
};
|