@smartbear/mcp 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json.js +1 -1
- package/dist/zephyr/common/rest-api-schemas.js +1496 -1821
- package/dist/zephyr/tool/environment/get-environments.js +4 -4
- 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-test-case.js +4 -4
- package/dist/zephyr/tool/test-case/create-web-link.js +6 -6
- 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/update-test-case.js +5 -3
- package/dist/zephyr/tool/test-cycle/create-test-cycle.js +4 -4
- 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-test-execution.js +4 -4
- 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/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,
|
|
@@ -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,
|
|
@@ -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,
|
|
@@ -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,
|
|
@@ -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,
|
|
@@ -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);
|
|
@@ -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,
|
|
@@ -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;
|
|
@@ -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,
|
|
@@ -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,
|