xray-mcp 1.1.1 → 1.1.3

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 CHANGED
@@ -9,6 +9,7 @@ This MCP server exposes tools to manage test cases and test executions in Xray C
9
9
  ### Test Cases (Test Management)
10
10
  - **create_test_case**: Create a new test case (uses GraphQL mutation `createTest`)
11
11
  - **get_test_case**: Retrieve details of a specific test case (uses GraphQL query `getTests`)
12
+ - **add_manual_test_steps**: Add or update manual test steps for a test case (uses GraphQL mutation `updateUnstructuredTestDefinition`)
12
13
  - **delete_test_case**: Delete a test case (uses GraphQL mutation `deleteTest`)
13
14
  - **search_test_cases**: Search test cases using JQL (Jira Query Language)
14
15
  - **get_project_test_cases**: Retrieve all test cases for a project
@@ -214,25 +214,30 @@ export class XrayClient {
214
214
  * @param steps - Array of test steps with action, data, and result
215
215
  */
216
216
  async addManualTestSteps(issueId, steps) {
217
- // Format steps for Xray GraphQL API (unstructured test definition)
218
- const formattedSteps = steps.map((step, index) => ({
219
- index: index,
220
- fields: {
221
- Action: step.action,
222
- Data: step.data || '',
223
- 'Expected Result': step.result
217
+ // Format steps as a string for Xray's unstructured test definition
218
+ // Format: "1. Action|Data|Result\n2. Action|Data|Result"
219
+ const unstructuredSteps = steps
220
+ .map((step, index) => {
221
+ const stepNumber = index + 1;
222
+ const parts = [step.action];
223
+ if (step.data) {
224
+ parts.push(step.data);
224
225
  }
225
- }));
226
+ parts.push(step.result);
227
+ return `${stepNumber}. ${parts.join('|')}`;
228
+ })
229
+ .join('\n');
226
230
  const mutation = `
227
- mutation UpdateTestSteps($issueId: String!, $steps: [UnstructuredStepInput!]!) {
228
- updateUnstructuredTestDefinition(issueId: $issueId, steps: $steps) {
231
+ mutation UpdateUnstructuredTest($issueId: String!, $unstructured: String!) {
232
+ updateUnstructuredTestDefinition(issueId: $issueId, unstructured: $unstructured) {
229
233
  issueId
234
+ jira(fields: ["key"])
230
235
  }
231
236
  }
232
237
  `;
233
238
  const variables = {
234
239
  issueId: issueId,
235
- steps: formattedSteps
240
+ unstructured: unstructuredSteps
236
241
  };
237
242
  await this.graphqlRequest(mutation, variables);
238
243
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xray-mcp",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {