@bun913/mcp-testrail 0.11.4

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.
Files changed (129) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +101 -0
  3. package/dist/client/api/baseClient.d.ts +39 -0
  4. package/dist/client/api/baseClient.js +103 -0
  5. package/dist/client/api/baseClient.js.map +1 -0
  6. package/dist/client/api/cases.d.ts +102 -0
  7. package/dist/client/api/cases.js +200 -0
  8. package/dist/client/api/cases.js.map +1 -0
  9. package/dist/client/api/index.d.ts +39 -0
  10. package/dist/client/api/index.js +50 -0
  11. package/dist/client/api/index.js.map +1 -0
  12. package/dist/client/api/milestones.d.ts +12 -0
  13. package/dist/client/api/milestones.js +22 -0
  14. package/dist/client/api/milestones.js.map +1 -0
  15. package/dist/client/api/plans.d.ts +12 -0
  16. package/dist/client/api/plans.js +20 -0
  17. package/dist/client/api/plans.js.map +1 -0
  18. package/dist/client/api/projects.d.ts +12 -0
  19. package/dist/client/api/projects.js +31 -0
  20. package/dist/client/api/projects.js.map +1 -0
  21. package/dist/client/api/results.d.ts +56 -0
  22. package/dist/client/api/results.js +125 -0
  23. package/dist/client/api/results.js.map +1 -0
  24. package/dist/client/api/runs.d.ts +40 -0
  25. package/dist/client/api/runs.js +79 -0
  26. package/dist/client/api/runs.js.map +1 -0
  27. package/dist/client/api/sections.d.ts +40 -0
  28. package/dist/client/api/sections.js +89 -0
  29. package/dist/client/api/sections.js.map +1 -0
  30. package/dist/client/api/sharedSteps.d.ts +11 -0
  31. package/dist/client/api/sharedSteps.js +20 -0
  32. package/dist/client/api/sharedSteps.js.map +1 -0
  33. package/dist/client/api/suites.d.ts +36 -0
  34. package/dist/client/api/suites.js +63 -0
  35. package/dist/client/api/suites.js.map +1 -0
  36. package/dist/client/api/tests.d.ts +32 -0
  37. package/dist/client/api/tests.js +47 -0
  38. package/dist/client/api/tests.js.map +1 -0
  39. package/dist/client/api/utils.d.ts +7 -0
  40. package/dist/client/api/utils.js +24 -0
  41. package/dist/client/api/utils.js.map +1 -0
  42. package/dist/index.d.ts +1 -0
  43. package/dist/index.js +5 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/server/api/cases.d.ts +8 -0
  46. package/dist/server/api/cases.js +431 -0
  47. package/dist/server/api/cases.js.map +1 -0
  48. package/dist/server/api/index.d.ts +18 -0
  49. package/dist/server/api/index.js +40 -0
  50. package/dist/server/api/index.js.map +1 -0
  51. package/dist/server/api/milestones.d.ts +8 -0
  52. package/dist/server/api/milestones.js +29 -0
  53. package/dist/server/api/milestones.js.map +1 -0
  54. package/dist/server/api/plans.d.ts +8 -0
  55. package/dist/server/api/plans.js +29 -0
  56. package/dist/server/api/plans.js.map +1 -0
  57. package/dist/server/api/projects.d.ts +8 -0
  58. package/dist/server/api/projects.js +51 -0
  59. package/dist/server/api/projects.js.map +1 -0
  60. package/dist/server/api/results.d.ts +8 -0
  61. package/dist/server/api/results.js +164 -0
  62. package/dist/server/api/results.js.map +1 -0
  63. package/dist/server/api/runs.d.ts +8 -0
  64. package/dist/server/api/runs.js +113 -0
  65. package/dist/server/api/runs.js.map +1 -0
  66. package/dist/server/api/sections.d.ts +8 -0
  67. package/dist/server/api/sections.js +138 -0
  68. package/dist/server/api/sections.js.map +1 -0
  69. package/dist/server/api/sharedSteps.d.ts +8 -0
  70. package/dist/server/api/sharedSteps.js +26 -0
  71. package/dist/server/api/sharedSteps.js.map +1 -0
  72. package/dist/server/api/suites.d.ts +8 -0
  73. package/dist/server/api/suites.js +111 -0
  74. package/dist/server/api/suites.js.map +1 -0
  75. package/dist/server/api/tests.d.ts +8 -0
  76. package/dist/server/api/tests.js +68 -0
  77. package/dist/server/api/tests.js.map +1 -0
  78. package/dist/server/api/utils.d.ts +7 -0
  79. package/dist/server/api/utils.js +25 -0
  80. package/dist/server/api/utils.js.map +1 -0
  81. package/dist/server/server.d.ts +2 -0
  82. package/dist/server/server.js +70 -0
  83. package/dist/server/server.js.map +1 -0
  84. package/dist/server/templates.d.ts +8 -0
  85. package/dist/server/templates.js +43 -0
  86. package/dist/server/templates.js.map +1 -0
  87. package/dist/shared/schemas/cases.d.ts +668 -0
  88. package/dist/shared/schemas/cases.js +178 -0
  89. package/dist/shared/schemas/cases.js.map +1 -0
  90. package/dist/shared/schemas/common.d.ts +117 -0
  91. package/dist/shared/schemas/common.js +50 -0
  92. package/dist/shared/schemas/common.js.map +1 -0
  93. package/dist/shared/schemas/index.d.ts +10 -0
  94. package/dist/shared/schemas/index.js +23 -0
  95. package/dist/shared/schemas/index.js.map +1 -0
  96. package/dist/shared/schemas/milestones.d.ts +59 -0
  97. package/dist/shared/schemas/milestones.js +26 -0
  98. package/dist/shared/schemas/milestones.js.map +1 -0
  99. package/dist/shared/schemas/plans.d.ts +416 -0
  100. package/dist/shared/schemas/plans.js +43 -0
  101. package/dist/shared/schemas/plans.js.map +1 -0
  102. package/dist/shared/schemas/projects.d.ts +135 -0
  103. package/dist/shared/schemas/projects.js +61 -0
  104. package/dist/shared/schemas/projects.js.map +1 -0
  105. package/dist/shared/schemas/results.d.ts +407 -0
  106. package/dist/shared/schemas/results.js +178 -0
  107. package/dist/shared/schemas/results.js.map +1 -0
  108. package/dist/shared/schemas/runs.d.ts +267 -0
  109. package/dist/shared/schemas/runs.js +133 -0
  110. package/dist/shared/schemas/runs.js.map +1 -0
  111. package/dist/shared/schemas/sections.d.ts +136 -0
  112. package/dist/shared/schemas/sections.js +68 -0
  113. package/dist/shared/schemas/sections.js.map +1 -0
  114. package/dist/shared/schemas/sharedSteps.d.ts +135 -0
  115. package/dist/shared/schemas/sharedSteps.js +65 -0
  116. package/dist/shared/schemas/sharedSteps.js.map +1 -0
  117. package/dist/shared/schemas/suites.d.ts +120 -0
  118. package/dist/shared/schemas/suites.js +44 -0
  119. package/dist/shared/schemas/suites.js.map +1 -0
  120. package/dist/shared/schemas/tests.d.ts +87 -0
  121. package/dist/shared/schemas/tests.js +52 -0
  122. package/dist/shared/schemas/tests.js.map +1 -0
  123. package/dist/sse.d.ts +1 -0
  124. package/dist/sse.js +5 -0
  125. package/dist/sse.js.map +1 -0
  126. package/dist/stdio.d.ts +1 -0
  127. package/dist/stdio.js +52 -0
  128. package/dist/stdio.js.map +1 -0
  129. package/package.json +48 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 bun913
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,101 @@
1
+ # TestRail MCP Server
2
+
3
+ This Model Context Protocol (MCP) server provides tools for interacting with TestRail directly from Claude AI and other MCP-supported clients like Cursor. It allows you to manage test cases, projects, suites, runs, and more without leaving your conversation with the AI.
4
+
5
+ ## Available Tools
6
+
7
+ The TestRail MCP server provides the following tools:
8
+
9
+ | Category | Tools |
10
+ |----------|-------|
11
+ | **Projects** | `getProjects`, `getProject`, `addProject`, `updateProject`, `deleteProject` |
12
+ | **Suites** | `getSuites`, `getSuite`, `addSuite`, `updateSuite` |
13
+ | **Cases** | `getCase`, `getCases`, `addCase`, `updateCase`, `deleteCase`, `getCaseTypes`, `getCaseFields`, `copyToSection`, `moveToSection`, `getCaseHistory`, `updateCases` |
14
+ | **Sections** | `getSection`, `getSections`, `addSection`, `moveSection`, `updateSection`, `deleteSection` |
15
+ | **Runs** | `getRuns`, `getRun`, `addRun`, `updateRun` |
16
+ | **Tests** | `getTests`, `getTest` |
17
+ | **Results** | `getResults`, `getResultsForCase`, `getResultsForRun`, `addResultForCase`, `addResultsForCases` |
18
+ | **Plans** | `getPlans` |
19
+ | **Milestones** | `getMilestones` |
20
+ | **Shared Steps** | `getSharedSteps` |
21
+
22
+ ## Usage
23
+
24
+ ### Setting up in Cursor with Claude
25
+
26
+ To use the TestRail MCP server in Cursor with Claude:
27
+
28
+ 1. Start the server locally with `npm run start`
29
+ - Please run `npm install` and `npm run build`, before you execute the command
30
+ - Please set up your .env based on the .env.example file as a reference.
31
+ 2. The server will run on `http://localhost:8080/sse`
32
+ 3. In Cursor, navigate to the MCP Servers section and add the TestRail server
33
+
34
+ ![MCP Server Configuration in Cursor](docs/images/cursor.png)
35
+
36
+ 4. Configure with the following details:
37
+ - **Name**: TestRail
38
+ - **Server Link**: http://localhost:8080/sse
39
+ - **Connection Type**: SSE
40
+
41
+ Once connected, you'll see all the available tools as shown in the image above.
42
+
43
+ Or, you can connect this MCP server by setting like the below.
44
+
45
+ ```json
46
+ // Example for Claude Desktop
47
+ {
48
+ "mcpServers": {
49
+ "TestRail": {
50
+ "type": "command",
51
+ "command": "${YOUR_NODE_PATH}/node",
52
+ "args": ["${YOUR_PROJECT_PATH}/mcp-testrail/dist/stdio.js"],
53
+ "env": {
54
+ "TESTRAIL_URL": "https://example.testrail.io",
55
+ "TESTRAIL_USERNAME": "hoge@gmail.com",
56
+ "TESTRAIL_API_KEY": "YOUR_API_KEY"
57
+ }
58
+ }
59
+ }
60
+ }
61
+ ```
62
+
63
+ ### Calling Tools from MCP Clients
64
+
65
+ When using an MCP-supported client like Claude in Cursor, you can call the TestRail MCP tools directly during your conversation. For each tool, you'll need to provide the appropriate parameters as defined in the TestRail API.
66
+
67
+ From Cursor:
68
+
69
+ ```json
70
+ // You can set ~/.cursor/mcp.json as below
71
+ {
72
+ "mcpServers": {
73
+ "testrail": {
74
+ "type": "sse",
75
+ "url": "http://localhost:8080/sse"
76
+ }
77
+ }
78
+ }
79
+ ```
80
+
81
+ From Claude Desktop:
82
+
83
+ ![From Claude Desktop](docs/images/fromClaude.png)
84
+
85
+ ## Troubleshooting
86
+
87
+ - **`spawn node ENOENT` errors**: Ensure that Node.js is properly installed and in your PATH.
88
+ - **Connection issues**: Verify that the server is running and the URL is correctly configured in your MCP client.
89
+ - **Authentication issues**: Check your TestRail API credentials in the `.env` file.
90
+ - **SSE connection errors**: If you see `SSE error: TypeError: fetch failed: connect ECONNREFUSED`, make sure the server is running on the specified port.
91
+ - **Your conversation is too long**: Pleae use `limit` and `offset` parameter for test cases
92
+
93
+ ## Contributing
94
+
95
+ Contributions are welcome! Please feel free to submit a Pull Request.
96
+
97
+ ## Acknowledgements
98
+
99
+ - [TestRail API](https://docs.testrail.techmatrix.jp/testrail/docs/702/api/)
100
+ - [Model Context Protocol SDK](https://github.com/modelcontextprotocol/typescript-sdk)
101
+
@@ -0,0 +1,39 @@
1
+ import { AxiosInstance } from "axios";
2
+ export declare class TestRailError extends Error {
3
+ constructor(message: string);
4
+ }
5
+ export declare class TestRailAPIError extends TestRailError {
6
+ status: number;
7
+ data?: unknown | undefined;
8
+ constructor(status: number, message: string, data?: unknown | undefined);
9
+ }
10
+ export declare class TestRailTimeoutError extends TestRailError {
11
+ constructor(message?: string);
12
+ }
13
+ export declare class TestRailNetworkError extends TestRailError {
14
+ constructor(message?: string);
15
+ }
16
+ export interface TestRailClientConfig {
17
+ baseURL: string;
18
+ auth: {
19
+ username: string;
20
+ password: string;
21
+ };
22
+ timeout?: number;
23
+ headers?: Record<string, string>;
24
+ }
25
+ /**
26
+ * Base TestRail API client that handles configuration and common functionality
27
+ */
28
+ export declare class BaseTestRailClient {
29
+ protected client: AxiosInstance;
30
+ constructor(config: TestRailClientConfig);
31
+ /**
32
+ * Set a custom header
33
+ */
34
+ setHeader(name: string, value: string): void;
35
+ /**
36
+ * Wrapper for making HTTP requests with error handling
37
+ */
38
+ protected request<T>(method: "get" | "post" | "put" | "delete", url: string, data?: unknown): Promise<T>;
39
+ }
@@ -0,0 +1,103 @@
1
+ import axios, { AxiosError } from "axios";
2
+ // Custom error classes
3
+ export class TestRailError extends Error {
4
+ constructor(message) {
5
+ super(message);
6
+ this.name = "TestRailError";
7
+ }
8
+ }
9
+ export class TestRailAPIError extends TestRailError {
10
+ status;
11
+ data;
12
+ constructor(status, message, data) {
13
+ super(message);
14
+ this.status = status;
15
+ this.data = data;
16
+ this.name = "TestRailAPIError";
17
+ }
18
+ }
19
+ export class TestRailTimeoutError extends TestRailError {
20
+ constructor(message = "Request timed out") {
21
+ super(message);
22
+ this.name = "TestRailTimeoutError";
23
+ }
24
+ }
25
+ export class TestRailNetworkError extends TestRailError {
26
+ constructor(message = "Network error occurred") {
27
+ super(message);
28
+ this.name = "TestRailNetworkError";
29
+ }
30
+ }
31
+ /**
32
+ * Base TestRail API client that handles configuration and common functionality
33
+ */
34
+ export class BaseTestRailClient {
35
+ client;
36
+ constructor(config) {
37
+ const headers = {
38
+ "Content-Type": "application/json",
39
+ ...(config.headers || {}),
40
+ };
41
+ this.client = axios.create({
42
+ baseURL: config.baseURL,
43
+ headers,
44
+ timeout: config.timeout ?? 30000,
45
+ auth: config.auth,
46
+ });
47
+ }
48
+ /**
49
+ * Set a custom header
50
+ */
51
+ setHeader(name, value) {
52
+ this.client.defaults.headers.common[name] = value;
53
+ }
54
+ /**
55
+ * Wrapper for making HTTP requests with error handling
56
+ */
57
+ async request(method, url, data) {
58
+ try {
59
+ const response = await this.client.request({
60
+ method,
61
+ url,
62
+ data,
63
+ });
64
+ return response.data;
65
+ }
66
+ catch (error) {
67
+ if (error instanceof TestRailError) {
68
+ throw error;
69
+ }
70
+ if (error instanceof AxiosError) {
71
+ if (error.code === "ECONNABORTED") {
72
+ throw new TestRailTimeoutError();
73
+ }
74
+ if (!error.response) {
75
+ throw new TestRailNetworkError();
76
+ }
77
+ const status = error.response.status;
78
+ const errorData = error.response.data;
79
+ const message = errorData?.error || error.message;
80
+ const data = error.response.data;
81
+ switch (status) {
82
+ case 400:
83
+ throw new TestRailAPIError(status, `Bad Request: ${message}`, data);
84
+ case 401:
85
+ throw new TestRailAPIError(status, "Authentication failed", data);
86
+ case 403:
87
+ throw new TestRailAPIError(status, "Permission denied", data);
88
+ case 404:
89
+ throw new TestRailAPIError(status, "Resource not found", data);
90
+ case 429:
91
+ throw new TestRailAPIError(status, "Rate limit exceeded", data);
92
+ default:
93
+ if (status >= 500) {
94
+ throw new TestRailAPIError(status, "TestRail server error", data);
95
+ }
96
+ throw new TestRailAPIError(status, `Unknown error: ${message}`, data);
97
+ }
98
+ }
99
+ throw new TestRailError(`Unexpected error: ${error instanceof Error ? error.message : String(error)}`);
100
+ }
101
+ }
102
+ }
103
+ //# sourceMappingURL=baseClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseClient.js","sourceRoot":"","sources":["../../../src/client/api/baseClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,UAAU,EAAiB,MAAM,OAAO,CAAC;AAExE,uBAAuB;AACvB,MAAM,OAAO,aAAc,SAAQ,KAAK;IACvC,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC7B,CAAC;CACD;AAED,MAAM,OAAO,gBAAiB,SAAQ,aAAa;IAE1C;IAEA;IAHR,YACQ,MAAc,EACrB,OAAe,EACR,IAAc;QAErB,KAAK,CAAC,OAAO,CAAC,CAAC;QAJR,WAAM,GAAN,MAAM,CAAQ;QAEd,SAAI,GAAJ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B,CAAC,MAAM,EAAE,uBAAuB,EAAE,IAAI,CAAC,CAAC;wBACnE,CAAC;wBACD,MAAM,IAAI,gBAAgB,CACzB,MAAM,EACN,kBAAkB,OAAO,EAAE,EAC3B,IAAI,CACJ,CAAC;gBACJ,CAAC;YACF,CAAC;YACD,MAAM,IAAI,aAAa,CACtB,qBAAqB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC7E,CAAC;QACH,CAAC;IACF,CAAC;CACD"}
@@ -0,0 +1,102 @@
1
+ import { BaseTestRailClient } from "./baseClient.js";
2
+ import { TestRailCase, TestRailCaseField, TestRailCaseType, TestRailCaseHistory } from "../../shared/schemas/cases.js";
3
+ import { GetTestCaseInput, GetTestCasesInput, AddTestCaseInput, UpdateTestCaseInput, DeleteTestCaseInput, CopyTestCasesToSectionInput, MoveTestCasesToSectionInput, GetTestCaseHistoryInput } from "../../shared/schemas/cases.js";
4
+ interface GetCasesParams {
5
+ limit?: number;
6
+ offset?: number;
7
+ [key: string]: string | number | boolean | null | undefined;
8
+ }
9
+ export declare class CasesClient extends BaseTestRailClient {
10
+ /**
11
+ * Gets a specific test case by ID
12
+ * @param caseId The ID of the test case
13
+ * @returns Promise with test case details
14
+ */
15
+ getCase(caseId: GetTestCaseInput["caseId"]): Promise<TestRailCase>;
16
+ /**
17
+ * Gets test cases for a specific project and suite
18
+ * @param projectId The ID of the project
19
+ * @param suiteId The ID of the test suite
20
+ * @param params Optional parameters including pagination (limit, offset) and other filters
21
+ * @returns Promise with array of test cases
22
+ */
23
+ getCases(projectId: GetTestCasesInput["projectId"], suiteId: number, params?: Partial<GetCasesParams>): Promise<{
24
+ cases: TestRailCase[];
25
+ offset: number;
26
+ limit: number;
27
+ size: number;
28
+ _links: {
29
+ next: string | null;
30
+ prev: string | null;
31
+ };
32
+ }>;
33
+ /**
34
+ * Adds a new test case to a section
35
+ * @param sectionId The ID of the section
36
+ * @param data The test case data
37
+ * @returns Promise with created test case
38
+ */
39
+ addCase(sectionId: AddTestCaseInput["sectionId"], data: Record<string, unknown>): Promise<TestRailCase>;
40
+ /**
41
+ * Updates an existing test case
42
+ * @param caseId The ID of the test case
43
+ * @param data The test case data to update
44
+ * @returns Promise with updated test case
45
+ */
46
+ updateCase(caseId: UpdateTestCaseInput["caseId"], data: Record<string, unknown>): Promise<TestRailCase>;
47
+ /**
48
+ * Deletes an existing test case
49
+ * @param caseId The ID of the test case
50
+ */
51
+ deleteCase(caseId: DeleteTestCaseInput["caseId"]): Promise<void>;
52
+ /**
53
+ * Gets the history of changes for a specific test case
54
+ * @param caseId The ID of the test case
55
+ * @returns Promise with test case history
56
+ */
57
+ getCaseHistory(caseId: GetTestCaseHistoryInput["caseId"]): Promise<TestRailCaseHistory[]>;
58
+ /**
59
+ * Gets all available test case types
60
+ * @returns Promise with array of case types
61
+ */
62
+ getCaseTypes(): Promise<TestRailCaseType[]>;
63
+ /**
64
+ * Gets all available test case fields
65
+ * @returns Promise with array of case fields
66
+ */
67
+ getCaseFields(): Promise<TestRailCaseField[]>;
68
+ /**
69
+ * Copies test cases to a different section
70
+ * @param caseIds Array of test case IDs to copy
71
+ * @param sectionId The ID of the target section
72
+ * @returns Promise with status
73
+ */
74
+ copyToSection(caseIds: CopyTestCasesToSectionInput["caseIds"], sectionId: CopyTestCasesToSectionInput["sectionId"]): Promise<{
75
+ status: boolean;
76
+ }>;
77
+ /**
78
+ * Moves test cases to a different section
79
+ * @param caseIds Array of test case IDs to move
80
+ * @param sectionId The ID of the target section
81
+ * @returns Promise with status
82
+ */
83
+ moveToSection(caseIds: MoveTestCasesToSectionInput["caseIds"], sectionId: MoveTestCasesToSectionInput["sectionId"]): Promise<{
84
+ status: boolean;
85
+ }>;
86
+ /**
87
+ * Updates multiple test cases at once
88
+ * @param projectId The ID of the project
89
+ * @param suiteId Optional ID of the test suite
90
+ * @param data Data to update on the test cases
91
+ * @param caseIds Array of test case IDs to update
92
+ */
93
+ updateCases(projectId: GetTestCasesInput["projectId"], suiteId: number, data: Record<string, unknown>, caseIds: UpdateTestCaseInput["caseId"][]): Promise<void>;
94
+ /**
95
+ * Deletes multiple test cases at once
96
+ * @param projectId The ID of the project
97
+ * @param suiteId Optional ID of the test suite
98
+ * @param caseIds Array of test case IDs to delete
99
+ */
100
+ deleteCases(projectId: GetTestCasesInput["projectId"], suiteId: number, caseIds: DeleteTestCaseInput["caseId"][]): Promise<void>;
101
+ }
102
+ export {};
@@ -0,0 +1,200 @@
1
+ import { BaseTestRailClient } from "./baseClient.js";
2
+ import { handleApiError } from "./utils.js";
3
+ export class CasesClient extends BaseTestRailClient {
4
+ /**
5
+ * Gets a specific test case by ID
6
+ * @param caseId The ID of the test case
7
+ * @returns Promise with test case details
8
+ */
9
+ async getCase(caseId) {
10
+ try {
11
+ const response = await this.client.get(`/api/v2/get_case/${caseId}`);
12
+ return response.data;
13
+ }
14
+ catch (error) {
15
+ throw handleApiError(error, `Failed to get test case ${caseId}`);
16
+ }
17
+ }
18
+ /**
19
+ * Gets test cases for a specific project and suite
20
+ * @param projectId The ID of the project
21
+ * @param suiteId The ID of the test suite
22
+ * @param params Optional parameters including pagination (limit, offset) and other filters
23
+ * @returns Promise with array of test cases
24
+ */
25
+ async getCases(projectId, suiteId, params) {
26
+ try {
27
+ const defaultParams = {
28
+ limit: 50,
29
+ offset: 0,
30
+ ...params,
31
+ };
32
+ const response = await this.client.get(`/api/v2/get_cases/${projectId}`, {
33
+ params: {
34
+ suite_id: suiteId,
35
+ ...defaultParams,
36
+ },
37
+ });
38
+ return {
39
+ cases: response.data.cases,
40
+ offset: response.data.offset,
41
+ limit: response.data.limit,
42
+ size: response.data.size,
43
+ _links: response.data._links,
44
+ };
45
+ }
46
+ catch (error) {
47
+ throw handleApiError(error, `Failed to get test cases for project ${projectId}`);
48
+ }
49
+ }
50
+ /**
51
+ * Adds a new test case to a section
52
+ * @param sectionId The ID of the section
53
+ * @param data The test case data
54
+ * @returns Promise with created test case
55
+ */
56
+ async addCase(sectionId, data) {
57
+ try {
58
+ const response = await this.client.post(`/api/v2/add_case/${sectionId}`, data);
59
+ return response.data;
60
+ }
61
+ catch (error) {
62
+ throw handleApiError(error, `Failed to add test case to section ${sectionId}`);
63
+ }
64
+ }
65
+ /**
66
+ * Updates an existing test case
67
+ * @param caseId The ID of the test case
68
+ * @param data The test case data to update
69
+ * @returns Promise with updated test case
70
+ */
71
+ async updateCase(caseId, data) {
72
+ try {
73
+ const response = await this.client.post(`/api/v2/update_case/${caseId}`, data);
74
+ return response.data;
75
+ }
76
+ catch (error) {
77
+ throw handleApiError(error, `Failed to update test case ${caseId}`);
78
+ }
79
+ }
80
+ /**
81
+ * Deletes an existing test case
82
+ * @param caseId The ID of the test case
83
+ */
84
+ async deleteCase(caseId) {
85
+ try {
86
+ await this.client.post(`/api/v2/delete_case/${caseId}`, {});
87
+ }
88
+ catch (error) {
89
+ throw handleApiError(error, `Failed to delete test case ${caseId}`);
90
+ }
91
+ }
92
+ /**
93
+ * Gets the history of changes for a specific test case
94
+ * @param caseId The ID of the test case
95
+ * @returns Promise with test case history
96
+ */
97
+ async getCaseHistory(caseId) {
98
+ try {
99
+ const response = await this.client.get(`/api/v2/get_history_for_case/${caseId}`);
100
+ return response.data;
101
+ }
102
+ catch (error) {
103
+ throw handleApiError(error, "Failed to get test case history");
104
+ }
105
+ }
106
+ /**
107
+ * Gets all available test case types
108
+ * @returns Promise with array of case types
109
+ */
110
+ async getCaseTypes() {
111
+ try {
112
+ const response = await this.client.get("/api/v2/get_case_types");
113
+ return response.data;
114
+ }
115
+ catch (error) {
116
+ throw handleApiError(error, "Failed to get case types");
117
+ }
118
+ }
119
+ /**
120
+ * Gets all available test case fields
121
+ * @returns Promise with array of case fields
122
+ */
123
+ async getCaseFields() {
124
+ try {
125
+ const response = await this.client.get("/api/v2/get_case_fields");
126
+ return response.data;
127
+ }
128
+ catch (error) {
129
+ throw handleApiError(error, "Failed to get case fields");
130
+ }
131
+ }
132
+ /**
133
+ * Copies test cases to a different section
134
+ * @param caseIds Array of test case IDs to copy
135
+ * @param sectionId The ID of the target section
136
+ * @returns Promise with status
137
+ */
138
+ async copyToSection(caseIds, sectionId) {
139
+ try {
140
+ const data = {
141
+ case_ids: caseIds,
142
+ };
143
+ const response = await this.client.post(`/api/v2/copy_cases_to_section/${sectionId}`, data);
144
+ return response.data;
145
+ }
146
+ catch (error) {
147
+ throw handleApiError(error, `Failed to copy test cases to section ${sectionId}`);
148
+ }
149
+ }
150
+ /**
151
+ * Moves test cases to a different section
152
+ * @param caseIds Array of test case IDs to move
153
+ * @param sectionId The ID of the target section
154
+ * @returns Promise with status
155
+ */
156
+ async moveToSection(caseIds, sectionId) {
157
+ try {
158
+ const data = {
159
+ case_ids: caseIds,
160
+ };
161
+ const response = await this.client.post(`/api/v2/move_cases_to_section/${sectionId}`, data);
162
+ return response.data;
163
+ }
164
+ catch (error) {
165
+ throw handleApiError(error, `Failed to move test cases to section ${sectionId}`);
166
+ }
167
+ }
168
+ /**
169
+ * Updates multiple test cases at once
170
+ * @param projectId The ID of the project
171
+ * @param suiteId Optional ID of the test suite
172
+ * @param data Data to update on the test cases
173
+ * @param caseIds Array of test case IDs to update
174
+ */
175
+ async updateCases(projectId, suiteId, data, caseIds) {
176
+ try {
177
+ const endpoint = `/api/v2/update_cases/${projectId}?suite_id=${suiteId}`;
178
+ await this.client.post(endpoint, { ...data, case_ids: caseIds });
179
+ }
180
+ catch (error) {
181
+ throw handleApiError(error, "Failed to update test cases");
182
+ }
183
+ }
184
+ /**
185
+ * Deletes multiple test cases at once
186
+ * @param projectId The ID of the project
187
+ * @param suiteId Optional ID of the test suite
188
+ * @param caseIds Array of test case IDs to delete
189
+ */
190
+ async deleteCases(projectId, suiteId, caseIds) {
191
+ try {
192
+ const endpoint = `/api/v2/delete_cases/${projectId}?suite_id=${suiteId}`;
193
+ await this.client.post(endpoint, { case_ids: caseIds });
194
+ }
195
+ catch (error) {
196
+ throw handleApiError(error, "Failed to delete test cases");
197
+ }
198
+ }
199
+ }
200
+ //# sourceMappingURL=cases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cases.js","sourceRoot":"","sources":["../../../src/client/api/cases.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAOrD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAkB5C,MAAM,OAAO,WAAY,SAAQ,kBAAkB;IAClD;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,MAAkC;QAC/C,IAAI,CAAC;YACJ,MAAM,QAAQ,GAAgC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAClE,oBAAoB,MAAM,EAAE,CAC5B,CAAC;YACF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACtB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,cAAc,CAAC,KAAK,EAAE,2BAA2B,MAAM,EAAE,CAAC,CAAC;QAClE,CAAC;IACF,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,QAAQ,CACb,SAAyC,EACzC,OAAe,EACf,MAAgC;QAQhC,IAAI,CAAC;YACJ,MAAM,aAAa,GAAG;gBACrB,KAAK,EAAE,EAAE;gBACT,MAAM,EAAE,CAAC;gBACT,GAAG,MAAM;aACT,CAAC;YAEF,MAAM,QAAQ,GAMT,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,qBAAqB,SAAS,EAAE,EAAE;gBAC5D,MAAM,EAAE;oBACP,QAAQ,EAAE,OAAO;oBACjB,GAAG,aAAa;iBAChB;aACD,CAAC,CAAC;YACH,OAAO;gBACN,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK;gBAC1B,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM;gBAC5B,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK;gBAC1B,IAAI,EAAE,QAAQ,CAAC,IAA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;QACzD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,cAAc,CAAC,KAAK,EAAE,6BAA6B,CAAC,CAAC;QAC5D,CAAC;IACF,CAAC;CACD"}
@@ -0,0 +1,39 @@
1
+ import { BaseTestRailClient, TestRailClientConfig } from "./baseClient.js";
2
+ import { ProjectsClient } from "./projects.js";
3
+ import { SectionsClient } from "./sections.js";
4
+ import { SharedStepsClient } from "./sharedSteps.js";
5
+ import { CasesClient } from "./cases.js";
6
+ import { MilestonesClient } from "./milestones.js";
7
+ import { SuitesClient } from "./suites.js";
8
+ import { RunsClient } from "./runs.js";
9
+ import { PlansClient } from "./plans.js";
10
+ import { ResultsClient } from "./results.js";
11
+ import { TestsClient } from "./tests.js";
12
+ /**
13
+ * Main TestRail API client that provides access to all resource-specific clients
14
+ */
15
+ export declare class TestRailClient extends BaseTestRailClient {
16
+ readonly projects: ProjectsClient;
17
+ readonly sections: SectionsClient;
18
+ readonly sharedSteps: SharedStepsClient;
19
+ readonly cases: CasesClient;
20
+ readonly milestones: MilestonesClient;
21
+ readonly suites: SuitesClient;
22
+ readonly runs: RunsClient;
23
+ readonly plans: PlansClient;
24
+ readonly results: ResultsClient;
25
+ readonly tests: TestsClient;
26
+ constructor(config: TestRailClientConfig);
27
+ }
28
+ export { TestRailClientConfig };
29
+ export { ProjectsClient } from "./projects.js";
30
+ export { SectionsClient } from "./sections.js";
31
+ export { SharedStepsClient } from "./sharedSteps.js";
32
+ export { CasesClient } from "./cases.js";
33
+ export { MilestonesClient } from "./milestones.js";
34
+ export { SuitesClient } from "./suites.js";
35
+ export { RunsClient } from "./runs.js";
36
+ export { PlansClient } from "./plans.js";
37
+ export { ResultsClient } from "./results.js";
38
+ export { TestsClient } from "./tests.js";
39
+ export { TestStatus, AddRunPayload, AddResultPayload, PaginatedResponse, } from "../../shared/schemas/common.js";
@@ -0,0 +1,50 @@
1
+ import { BaseTestRailClient } from "./baseClient.js";
2
+ import { ProjectsClient } from "./projects.js";
3
+ import { SectionsClient } from "./sections.js";
4
+ import { SharedStepsClient } from "./sharedSteps.js";
5
+ import { CasesClient } from "./cases.js";
6
+ import { MilestonesClient } from "./milestones.js";
7
+ import { SuitesClient } from "./suites.js";
8
+ import { RunsClient } from "./runs.js";
9
+ import { PlansClient } from "./plans.js";
10
+ import { ResultsClient } from "./results.js";
11
+ import { TestsClient } from "./tests.js";
12
+ /**
13
+ * Main TestRail API client that provides access to all resource-specific clients
14
+ */
15
+ export class TestRailClient extends BaseTestRailClient {
16
+ projects;
17
+ sections;
18
+ sharedSteps;
19
+ cases;
20
+ milestones;
21
+ suites;
22
+ runs;
23
+ plans;
24
+ results;
25
+ tests;
26
+ constructor(config) {
27
+ super(config);
28
+ this.projects = new ProjectsClient(config);
29
+ this.sections = new SectionsClient(config);
30
+ this.sharedSteps = new SharedStepsClient(config);
31
+ this.cases = new CasesClient(config);
32
+ this.milestones = new MilestonesClient(config);
33
+ this.suites = new SuitesClient(config);
34
+ this.runs = new RunsClient(config);
35
+ this.plans = new PlansClient(config);
36
+ this.results = new ResultsClient(config);
37
+ this.tests = new TestsClient(config);
38
+ }
39
+ }
40
+ export { ProjectsClient } from "./projects.js";
41
+ export { SectionsClient } from "./sections.js";
42
+ export { SharedStepsClient } from "./sharedSteps.js";
43
+ export { CasesClient } from "./cases.js";
44
+ export { MilestonesClient } from "./milestones.js";
45
+ export { SuitesClient } from "./suites.js";
46
+ export { RunsClient } from "./runs.js";
47
+ export { PlansClient } from "./plans.js";
48
+ export { ResultsClient } from "./results.js";
49
+ export { TestsClient } from "./tests.js";
50
+ //# sourceMappingURL=index.js.map