@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
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ListEnvironments200Response, ListEnvironmentsQueryParams } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class GetEnvironments extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Get Environments",
|
|
6
6
|
summary: "Get environments in Zephyr",
|
|
7
7
|
readOnly: true,
|
|
8
8
|
idempotent: true,
|
|
9
|
-
inputSchema:
|
|
10
|
-
outputSchema:
|
|
9
|
+
inputSchema: ListEnvironmentsQueryParams,
|
|
10
|
+
outputSchema: ListEnvironments200Response,
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Get the first 20 Environments",
|
|
@@ -55,7 +55,7 @@ class GetEnvironments extends Tool {
|
|
|
55
55
|
]
|
|
56
56
|
};
|
|
57
57
|
handle = async (args) => {
|
|
58
|
-
const getEnvironmentsInput =
|
|
58
|
+
const getEnvironmentsInput = ListEnvironmentsQueryParams.parse(args);
|
|
59
59
|
const response = await this.client.getApiClient().get("/environments", getEnvironmentsInput);
|
|
60
60
|
return {
|
|
61
61
|
structuredContent: response,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { CreateFolder201Response, CreateFolderBody } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class CreateFolder extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Create Folder",
|
|
6
|
+
summary: "Create a folder called 'Axial Pump Tests' in the project SA for organizing test cases",
|
|
7
|
+
readOnly: false,
|
|
8
|
+
idempotent: false,
|
|
9
|
+
inputSchema: CreateFolderBody,
|
|
10
|
+
outputSchema: CreateFolder201Response,
|
|
11
|
+
examples: [
|
|
12
|
+
{
|
|
13
|
+
description: "Create a root Folder in project SA for organizing test cases",
|
|
14
|
+
parameters: {
|
|
15
|
+
parentId: null,
|
|
16
|
+
name: "Axial Pump Tests",
|
|
17
|
+
projectKey: "SA",
|
|
18
|
+
folderType: "TEST_CASE"
|
|
19
|
+
},
|
|
20
|
+
expectedOutput: "The newly created Folder with its ID and self link"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
description: "Create a sub-folder under folder ID 5 in the project MM2 for test plans related to pumps",
|
|
24
|
+
parameters: {
|
|
25
|
+
parentId: 5,
|
|
26
|
+
name: "Pump-related Test Plans",
|
|
27
|
+
projectKey: "MM2",
|
|
28
|
+
folderType: "TEST_PLAN"
|
|
29
|
+
},
|
|
30
|
+
expectedOutput: "The newly created Folder with its ID and self link"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
description: "Create a Folder called 'Regression Cycles' in project TIS for organizing test cycles",
|
|
34
|
+
parameters: {
|
|
35
|
+
parentId: null,
|
|
36
|
+
name: "Regression Cycles",
|
|
37
|
+
projectKey: "TIS",
|
|
38
|
+
folderType: "TEST_CYCLE"
|
|
39
|
+
},
|
|
40
|
+
expectedOutput: "The newly created Folder with its ID and self link"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
};
|
|
44
|
+
handle = async (args) => {
|
|
45
|
+
const body = CreateFolderBody.parse(args);
|
|
46
|
+
const response = await this.client.getApiClient().post(`/folders`, body);
|
|
47
|
+
return {
|
|
48
|
+
structuredContent: response,
|
|
49
|
+
content: []
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
CreateFolder
|
|
55
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { GetIssueLinkTestCases200Response, GetIssueLinkTestCasesParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetTestCases extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get Issue Link Test Cases",
|
|
6
|
+
summary: "Get test cases linked to a Jira issue in Zephyr",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: GetIssueLinkTestCasesParams,
|
|
10
|
+
outputSchema: GetIssueLinkTestCases200Response,
|
|
11
|
+
examples: [
|
|
12
|
+
{
|
|
13
|
+
description: "Check which test cases are linked to Jira issue PROJ-123",
|
|
14
|
+
parameters: {
|
|
15
|
+
issueKey: "PROJ-123"
|
|
16
|
+
},
|
|
17
|
+
expectedOutput: "The List of test cases linked to Jira issue PROJ-123 with their keys and versions"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
};
|
|
21
|
+
handle = async (args) => {
|
|
22
|
+
const { issueKey } = GetIssueLinkTestCasesParams.parse(args);
|
|
23
|
+
const response = await this.client.getApiClient().get(`/issuelinks/${issueKey}/testcases`);
|
|
24
|
+
return {
|
|
25
|
+
// requires structuredContent to be a record, not an array.
|
|
26
|
+
structuredContent: { testCases: response },
|
|
27
|
+
content: []
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
GetTestCases
|
|
33
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { GetIssueLinkTestCycles200Response, GetIssueLinkTestCyclesParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetTestCycles extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get Test Cycles linked to a Jira issue",
|
|
6
|
+
summary: "Get test cycles linked to a Jira issue in Zephyr",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: GetIssueLinkTestCyclesParams,
|
|
10
|
+
outputSchema: GetIssueLinkTestCycles200Response,
|
|
11
|
+
examples: [
|
|
12
|
+
{
|
|
13
|
+
description: "Check which test cycles are linked to Jira issue PROJ-123",
|
|
14
|
+
parameters: {
|
|
15
|
+
issueKey: "PROJ-123"
|
|
16
|
+
},
|
|
17
|
+
expectedOutput: "The List of test cycles linked to Jira issue PROJ-123 with their IDs"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
};
|
|
21
|
+
handle = async (args) => {
|
|
22
|
+
const { issueKey } = GetIssueLinkTestCyclesParams.parse(args);
|
|
23
|
+
const response = await this.client.getApiClient().get(`/issuelinks/${issueKey}/testcycles`);
|
|
24
|
+
return {
|
|
25
|
+
structuredContent: { testCycles: response },
|
|
26
|
+
content: []
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
GetTestCycles
|
|
32
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { GetIssueLinkTestExecutions200Response, GetIssueLinkTestExecutionsParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetTestExecutions extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get test executions linked to a Jira issue",
|
|
6
|
+
summary: "Get test executions linked to a Jira issue in Zephyr",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: GetIssueLinkTestExecutionsParams,
|
|
10
|
+
outputSchema: GetIssueLinkTestExecutions200Response,
|
|
11
|
+
examples: [
|
|
12
|
+
{
|
|
13
|
+
description: "Check which test executions are linked to Jira issue PROJ-123",
|
|
14
|
+
parameters: {
|
|
15
|
+
issueKey: "PROJ-123"
|
|
16
|
+
},
|
|
17
|
+
expectedOutput: "The List of test executions linked to Jira issue PROJ-123 with their keys and versions"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
};
|
|
21
|
+
handle = async (args) => {
|
|
22
|
+
const { issueKey } = GetIssueLinkTestExecutionsParams.parse(args);
|
|
23
|
+
const response = await this.client.getApiClient().get(`/issuelinks/${issueKey}/testexecutions`);
|
|
24
|
+
return {
|
|
25
|
+
structuredContent: { testExecutions: response },
|
|
26
|
+
content: []
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
GetTestExecutions
|
|
32
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ListPriorities200Response, ListPrioritiesQueryParams } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class GetPriorities extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Get priorities",
|
|
6
6
|
summary: "Get Zephyr Test Case priorities with optional filters",
|
|
7
7
|
readOnly: true,
|
|
8
8
|
idempotent: true,
|
|
9
|
-
inputSchema:
|
|
10
|
-
outputSchema:
|
|
9
|
+
inputSchema: ListPrioritiesQueryParams,
|
|
10
|
+
outputSchema: ListPriorities200Response,
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Get the first 10 priorities",
|
|
@@ -30,7 +30,7 @@ class GetPriorities extends Tool {
|
|
|
30
30
|
]
|
|
31
31
|
};
|
|
32
32
|
handle = async (args) => {
|
|
33
|
-
const getPrioritiesInput =
|
|
33
|
+
const getPrioritiesInput = ListPrioritiesQueryParams.parse(args);
|
|
34
34
|
const response = await this.client.getApiClient().get("/priorities", getPrioritiesInput);
|
|
35
35
|
return {
|
|
36
36
|
structuredContent: response,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { GetProject200Response, GetProjectParams } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class GetProject extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Get Project",
|
|
6
6
|
summary: "Get details of project specified by id or key in Zephyr",
|
|
7
7
|
readOnly: true,
|
|
8
8
|
idempotent: true,
|
|
9
|
-
inputSchema:
|
|
10
|
-
outputSchema:
|
|
9
|
+
inputSchema: GetProjectParams,
|
|
10
|
+
outputSchema: GetProject200Response,
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Get the project with id 1",
|
|
@@ -26,7 +26,7 @@ class GetProject extends Tool {
|
|
|
26
26
|
]
|
|
27
27
|
};
|
|
28
28
|
handle = async (args) => {
|
|
29
|
-
const { projectIdOrKey } =
|
|
29
|
+
const { projectIdOrKey } = GetProjectParams.parse(args);
|
|
30
30
|
const response = await this.client.getApiClient().get(`/projects/${projectIdOrKey}`);
|
|
31
31
|
return {
|
|
32
32
|
structuredContent: response,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ListProjects200Response, ListProjectsQueryParams } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class GetProjects extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Get Projects",
|
|
6
6
|
summary: "Get details of projects in Zephyr",
|
|
7
7
|
readOnly: true,
|
|
8
8
|
idempotent: true,
|
|
9
|
-
inputSchema:
|
|
10
|
-
outputSchema:
|
|
9
|
+
inputSchema: ListProjectsQueryParams,
|
|
10
|
+
outputSchema: ListProjects200Response,
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Get the first 10 projects",
|
|
@@ -35,7 +35,7 @@ class GetProjects extends Tool {
|
|
|
35
35
|
]
|
|
36
36
|
};
|
|
37
37
|
handle = async (args) => {
|
|
38
|
-
const parsedArgs =
|
|
38
|
+
const parsedArgs = ListProjectsQueryParams.parse(args);
|
|
39
39
|
const response = await this.client.getApiClient().get("/projects", parsedArgs);
|
|
40
40
|
return {
|
|
41
41
|
structuredContent: response,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ListStatuses200Response, ListStatusesQueryParams } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class GetStatuses extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Get Statuses",
|
|
6
6
|
summary: "Get statuses of different types of test artifacts in Zephyr",
|
|
7
7
|
readOnly: true,
|
|
8
8
|
idempotent: true,
|
|
9
|
-
inputSchema:
|
|
10
|
-
outputSchema:
|
|
9
|
+
inputSchema: ListStatusesQueryParams,
|
|
10
|
+
outputSchema: ListStatuses200Response,
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Get the first 10 statuses",
|
|
@@ -36,7 +36,7 @@ class GetStatuses extends Tool {
|
|
|
36
36
|
]
|
|
37
37
|
};
|
|
38
38
|
handle = async (args) => {
|
|
39
|
-
const getStatusesInput =
|
|
39
|
+
const getStatusesInput = ListStatusesQueryParams.parse(args);
|
|
40
40
|
const response = await this.client.getApiClient().get("/statuses", getStatusesInput);
|
|
41
41
|
return {
|
|
42
42
|
structuredContent: response,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { CreateTestCaseIssueLink201Response, CreateTestCaseIssueLinkParams, CreateTestCaseIssueLinkBody } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class CreateTestCaseIssueLink extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Create Test Case Issue Link",
|
|
6
|
+
summary: "Create a new link between an issue in Jira and a Test Case in Zephyr",
|
|
7
|
+
readOnly: false,
|
|
8
|
+
idempotent: false,
|
|
9
|
+
inputSchema: CreateTestCaseIssueLinkParams.and(
|
|
10
|
+
CreateTestCaseIssueLinkBody.partial()
|
|
11
|
+
),
|
|
12
|
+
outputSchema: CreateTestCaseIssueLink201Response,
|
|
13
|
+
examples: [
|
|
14
|
+
{
|
|
15
|
+
description: "Create a link between the test case SA-T1 and the Jira Issue ID 10100",
|
|
16
|
+
parameters: {
|
|
17
|
+
testCaseKey: "SA-T1",
|
|
18
|
+
issueId: "10100"
|
|
19
|
+
},
|
|
20
|
+
expectedOutput: "The newly created Issue Link with its ID and self link"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
};
|
|
24
|
+
handle = async (args) => {
|
|
25
|
+
const { testCaseKey } = CreateTestCaseIssueLinkParams.parse(args);
|
|
26
|
+
const body = CreateTestCaseIssueLinkBody.parse(args);
|
|
27
|
+
const response = await this.client.getApiClient().post(`/testcases/${testCaseKey}/links/issues`, body);
|
|
28
|
+
return {
|
|
29
|
+
structuredContent: response,
|
|
30
|
+
content: []
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
CreateTestCaseIssueLink
|
|
36
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { CreateTestCase201Response, CreateTestCaseBody } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class CreateTestCase extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Create Test Case",
|
|
6
6
|
summary: "Create a new Test Case in Zephyr specified project",
|
|
7
7
|
readOnly: false,
|
|
8
8
|
idempotent: false,
|
|
9
|
-
inputSchema:
|
|
10
|
-
outputSchema:
|
|
9
|
+
inputSchema: CreateTestCaseBody,
|
|
10
|
+
outputSchema: CreateTestCase201Response,
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Create a Test Case in project SA to ensure that the axial pump can be enabled",
|
|
@@ -56,7 +56,7 @@ class CreateTestCase extends Tool {
|
|
|
56
56
|
]
|
|
57
57
|
};
|
|
58
58
|
handle = async (args) => {
|
|
59
|
-
const body =
|
|
59
|
+
const body = CreateTestCaseBody.parse(args);
|
|
60
60
|
const response = await this.client.getApiClient().post(`/testcases/`, body);
|
|
61
61
|
return {
|
|
62
62
|
structuredContent: response,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { CreateTestCaseTestScript201Response, CreateTestCaseTestScriptParams, CreateTestCaseTestScriptBody } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class CreateTestScript extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Create Test Script",
|
|
6
|
+
summary: "Create a new Test Script of the types Plain Text or BDD in a Zephyr Test Case.",
|
|
7
|
+
readOnly: false,
|
|
8
|
+
idempotent: false,
|
|
9
|
+
inputSchema: CreateTestCaseTestScriptParams.and(
|
|
10
|
+
CreateTestCaseTestScriptBody.partial()
|
|
11
|
+
),
|
|
12
|
+
outputSchema: CreateTestCaseTestScript201Response,
|
|
13
|
+
examples: [
|
|
14
|
+
{
|
|
15
|
+
description: "Create a plain text test script for test case SA-T1 to verify that the axial pump can be enabled",
|
|
16
|
+
parameters: {
|
|
17
|
+
testCaseKey: "SA-T1",
|
|
18
|
+
type: "plain",
|
|
19
|
+
text: "1. Navigate to Pump Settings</br>2. Enable Axial Pump</br>3. Verify pump status is 'Active'"
|
|
20
|
+
},
|
|
21
|
+
expectedOutput: "The created test script metadata including its id and self link"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
description: "Create a BDD test script for test case MM2-T15 to validate axial pump activation",
|
|
25
|
+
parameters: {
|
|
26
|
+
testCaseKey: "MM2-T15",
|
|
27
|
+
type: "bdd",
|
|
28
|
+
text: "Given the axial pump is installed\nWhen the user enables the axial pump\nThen the pump status should be Active"
|
|
29
|
+
},
|
|
30
|
+
expectedOutput: "The created test script metadata including its id and self link"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
description: "Create a BDD test script for test case QA-T100 for axial pump performance validation",
|
|
34
|
+
parameters: {
|
|
35
|
+
testCaseKey: "QA-T100",
|
|
36
|
+
type: "bdd",
|
|
37
|
+
text: "Given the system is running\nWhen the axial pump operates under load\nThen performance metrics should remain within thresholds"
|
|
38
|
+
},
|
|
39
|
+
expectedOutput: "The created test script metadata including its id and self link"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
};
|
|
43
|
+
handle = async (args) => {
|
|
44
|
+
const { testCaseKey } = CreateTestCaseTestScriptParams.parse(args);
|
|
45
|
+
const body = CreateTestCaseTestScriptBody.parse(args);
|
|
46
|
+
const response = await this.client.getApiClient().post(`/testcases/${testCaseKey}/testscript`, body);
|
|
47
|
+
return {
|
|
48
|
+
structuredContent: response,
|
|
49
|
+
content: []
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
CreateTestScript
|
|
55
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { CreateTestCaseTestSteps201Response, CreateTestCaseTestStepsParams, CreateTestCaseTestStepsBody } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class CreateTestSteps extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Create Test Case Steps",
|
|
6
|
+
summary: "Create steps for a Test Case in Zephyr. Supports inline step definitions or delegating execution to another test case (also known as 'call to test' via UI).",
|
|
7
|
+
readOnly: false,
|
|
8
|
+
idempotent: false,
|
|
9
|
+
inputSchema: CreateTestCaseTestStepsParams.and(
|
|
10
|
+
CreateTestCaseTestStepsBody.partial()
|
|
11
|
+
),
|
|
12
|
+
outputSchema: CreateTestCaseTestSteps201Response,
|
|
13
|
+
examples: [
|
|
14
|
+
{
|
|
15
|
+
description: "To the Test Case SA-T1, add steps that will test a login page.",
|
|
16
|
+
parameters: {
|
|
17
|
+
testCaseKey: "SA-T1",
|
|
18
|
+
mode: "APPEND",
|
|
19
|
+
items: [
|
|
20
|
+
{
|
|
21
|
+
inline: {
|
|
22
|
+
description: "Navigate to the login page",
|
|
23
|
+
expectedResult: "Login page is displayed"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
inline: {
|
|
28
|
+
description: "Enter valid credentials and click Submit",
|
|
29
|
+
expectedResult: "User is redirected to the dashboard"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
expectedOutput: "The ID of the Test Steps resource and the API self URL to fetch it"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
description: "To the Test Case MM2-T15, replace all existing steps with new ones that test the settings page for an Admin user.",
|
|
38
|
+
parameters: {
|
|
39
|
+
testCaseKey: "MM2-T15",
|
|
40
|
+
mode: "OVERWRITE",
|
|
41
|
+
items: [
|
|
42
|
+
{
|
|
43
|
+
inline: {
|
|
44
|
+
description: "Open the settings page",
|
|
45
|
+
testData: "User role: Admin",
|
|
46
|
+
expectedResult: "Settings page is accessible"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
inline: {
|
|
51
|
+
description: "Change the notification preference",
|
|
52
|
+
testData: "Preference: Email only",
|
|
53
|
+
expectedResult: "Notification preference is updated successfully"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
expectedOutput: "The ID of the Test Steps resource and the API self URL to fetch it"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
description: "To the Test Case SA-T1, add a step that reuses the steps from the Test Case PRJ-T42",
|
|
62
|
+
parameters: {
|
|
63
|
+
testCaseKey: "SA-T1",
|
|
64
|
+
mode: "APPEND",
|
|
65
|
+
items: [
|
|
66
|
+
{
|
|
67
|
+
testCase: {
|
|
68
|
+
testCaseKey: "PRJ-T42"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
expectedOutput: "The ID of the Test Steps resource and the API self URL to fetch it"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
};
|
|
77
|
+
handle = async (args) => {
|
|
78
|
+
const { testCaseKey } = CreateTestCaseTestStepsParams.parse(args);
|
|
79
|
+
const body = CreateTestCaseTestStepsBody.parse(args);
|
|
80
|
+
const response = await this.client.getApiClient().post(`/testcases/${testCaseKey}/teststeps`, body);
|
|
81
|
+
return {
|
|
82
|
+
structuredContent: response,
|
|
83
|
+
content: []
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
CreateTestSteps
|
|
89
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { CreateTestCaseWebLink201Response, CreateTestCaseWebLinkBody, CreateTestCaseWebLinkParams } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class CreateTestCaseWebLink extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Create Test Case Web Link",
|
|
6
6
|
summary: "Create a new Web Link for a Test Case in Zephyr",
|
|
7
7
|
readOnly: false,
|
|
8
8
|
idempotent: false,
|
|
9
|
-
inputSchema:
|
|
10
|
-
testCaseKey:
|
|
9
|
+
inputSchema: CreateTestCaseWebLinkBody.extend({
|
|
10
|
+
testCaseKey: CreateTestCaseWebLinkParams.shape.testCaseKey
|
|
11
11
|
}),
|
|
12
|
-
outputSchema:
|
|
12
|
+
outputSchema: CreateTestCaseWebLink201Response,
|
|
13
13
|
examples: [
|
|
14
14
|
{
|
|
15
15
|
description: "Create a web link for test case SA-T1 pointing to Atlassian's homepage",
|
|
@@ -32,8 +32,8 @@ class CreateTestCaseWebLink extends Tool {
|
|
|
32
32
|
]
|
|
33
33
|
};
|
|
34
34
|
handle = async (args) => {
|
|
35
|
-
const { testCaseKey } =
|
|
36
|
-
const body =
|
|
35
|
+
const { testCaseKey } = CreateTestCaseWebLinkParams.parse(args);
|
|
36
|
+
const body = CreateTestCaseWebLinkBody.parse(args);
|
|
37
37
|
const response = await this.client.getApiClient().post(`/testcases/${testCaseKey}/links/weblinks`, body);
|
|
38
38
|
return {
|
|
39
39
|
structuredContent: response,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { GetTestCaseLinks200Response, GetTestCaseLinksParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetTestCaseLinks extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get Test Case Links",
|
|
6
|
+
summary: "Get all links (issue links and web links) associated with a test case in Zephyr",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: GetTestCaseLinksParams,
|
|
10
|
+
outputSchema: GetTestCaseLinks200Response,
|
|
11
|
+
examples: [
|
|
12
|
+
{
|
|
13
|
+
description: "Get all links associated with the test case with key 'SA-T10'",
|
|
14
|
+
parameters: {
|
|
15
|
+
testCaseKey: "SA-T10"
|
|
16
|
+
},
|
|
17
|
+
expectedOutput: "The links (issue links and web links) associated with the test case"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
};
|
|
21
|
+
handle = async (args) => {
|
|
22
|
+
const { testCaseKey } = GetTestCaseLinksParams.parse(args);
|
|
23
|
+
const response = await this.client.getApiClient().get(`/testcases/${testCaseKey}/links`);
|
|
24
|
+
return {
|
|
25
|
+
structuredContent: response,
|
|
26
|
+
content: []
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
GetTestCaseLinks
|
|
32
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { GetTestCase200Response, GetTestCaseParams } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class GetTestCase extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Get Test Case",
|
|
6
6
|
summary: "Get details of test case specified by key in Zephyr",
|
|
7
7
|
readOnly: true,
|
|
8
8
|
idempotent: true,
|
|
9
|
-
inputSchema:
|
|
10
|
-
outputSchema:
|
|
9
|
+
inputSchema: GetTestCaseParams,
|
|
10
|
+
outputSchema: GetTestCase200Response,
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Get the test case with key 'SA-T10'",
|
|
@@ -26,7 +26,7 @@ class GetTestCase extends Tool {
|
|
|
26
26
|
]
|
|
27
27
|
};
|
|
28
28
|
handle = async (args) => {
|
|
29
|
-
const { testCaseKey } =
|
|
29
|
+
const { testCaseKey } = GetTestCaseParams.parse(args);
|
|
30
30
|
const response = await this.client.getApiClient().get(`/testcases/${testCaseKey}`);
|
|
31
31
|
return {
|
|
32
32
|
structuredContent: response,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Tool } from "../../../common/tools.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ListTestCasesCursorPaginated200Response, ListTestCasesCursorPaginatedQueryParams } from "../../common/rest-api-schemas.js";
|
|
3
3
|
class GetTestCases extends Tool {
|
|
4
4
|
specification = {
|
|
5
5
|
title: "Get Test Cases",
|
|
6
6
|
summary: "Get details of test cases in Zephyr",
|
|
7
7
|
readOnly: true,
|
|
8
8
|
idempotent: true,
|
|
9
|
-
inputSchema:
|
|
10
|
-
outputSchema:
|
|
9
|
+
inputSchema: ListTestCasesCursorPaginatedQueryParams,
|
|
10
|
+
outputSchema: ListTestCasesCursorPaginated200Response,
|
|
11
11
|
examples: [
|
|
12
12
|
{
|
|
13
13
|
description: "Get the first 10 Test Cases",
|
|
@@ -51,7 +51,7 @@ class GetTestCases extends Tool {
|
|
|
51
51
|
]
|
|
52
52
|
};
|
|
53
53
|
handle = async (args) => {
|
|
54
|
-
const parsedArgs =
|
|
54
|
+
const parsedArgs = ListTestCasesCursorPaginatedQueryParams.parse(args);
|
|
55
55
|
const response = await this.client.getApiClient().get("/testcases/nextgen", parsedArgs);
|
|
56
56
|
return {
|
|
57
57
|
structuredContent: response,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Tool } from "../../../common/tools.js";
|
|
2
|
+
import { GetTestCaseTestScript200Response, GetTestCaseTestScriptParams } from "../../common/rest-api-schemas.js";
|
|
3
|
+
class GetTestScript extends Tool {
|
|
4
|
+
specification = {
|
|
5
|
+
title: "Get Test Script",
|
|
6
|
+
summary: "Get the Test Script (Plain Text or BDD) for a given Test Case in Zephyr",
|
|
7
|
+
readOnly: true,
|
|
8
|
+
idempotent: true,
|
|
9
|
+
inputSchema: GetTestCaseTestScriptParams,
|
|
10
|
+
outputSchema: GetTestCaseTestScript200Response,
|
|
11
|
+
examples: [
|
|
12
|
+
{
|
|
13
|
+
description: "Get the test script for test case with key 'SA-T1'",
|
|
14
|
+
parameters: {
|
|
15
|
+
testCaseKey: "SA-T1"
|
|
16
|
+
},
|
|
17
|
+
expectedOutput: "The test script with its type (plain or bdd), text content, and id"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
description: "Retrieve the BDD test script content for test case with key 'MM2-T15'",
|
|
21
|
+
parameters: {
|
|
22
|
+
testCaseKey: "MM2-T15"
|
|
23
|
+
},
|
|
24
|
+
expectedOutput: "The test script with its type (plain or bdd), text content, and id"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
description: "Get the test script for test case with key 'QA-T100' to review the test instructions",
|
|
28
|
+
parameters: {
|
|
29
|
+
testCaseKey: "QA-T100"
|
|
30
|
+
},
|
|
31
|
+
expectedOutput: "The test script with its type (plain or bdd), text content, and id"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
};
|
|
35
|
+
handle = async (args) => {
|
|
36
|
+
const { testCaseKey } = GetTestCaseTestScriptParams.parse(args);
|
|
37
|
+
const response = await this.client.getApiClient().get(`/testcases/${testCaseKey}/testscript`);
|
|
38
|
+
return {
|
|
39
|
+
structuredContent: response,
|
|
40
|
+
content: []
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
GetTestScript
|
|
46
|
+
};
|