xray-mcp 1.1.5 → 1.2.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/README.md CHANGED
@@ -134,15 +134,20 @@ npm run dev
134
134
  "projectKey": "ABC",
135
135
  "summary": "Verify login functionality",
136
136
  "description": "Test that users can log in with valid credentials",
137
- "testType": "Manual",
137
+ "testType": "Unstructured",
138
138
  "labels": ["login", "authentication"],
139
139
  "priority": "High"
140
140
  }
141
141
  ```
142
142
 
143
+ **Test Types:**
144
+ - `Unstructured` or `Manual` - Free-form text steps (both map to Xray "Unstructured", use with `add_manual_test_steps`)
145
+ - `Cucumber` - Gherkin/BDD scenarios
146
+ - `Generic` - Generic automated tests
147
+
143
148
  #### Add Manual Test Steps
144
149
 
145
- **Important:** Test cases must be created with `testType: "Manual"` before adding steps.
150
+ **Important:** Test cases must be created with `testType: "Unstructured"` (default) to use this tool.
146
151
 
147
152
  ```json
148
153
  {
@@ -161,7 +166,10 @@ npm run dev
161
166
  }
162
167
  ```
163
168
 
164
- **Migration from Azure DevOps:** This tool is perfect for migrating test cases from ADO. Create the test case first using `create_test_case` with `testType: "Manual"`, then use `add_manual_test_steps` with the returned `issueId`.
169
+ **Migration from Azure DevOps:** This tool is perfect for migrating test cases from ADO:
170
+ 1. Create test case with `testType: "Unstructured"` (default)
171
+ 2. Use the returned `issueId` with `add_manual_test_steps`
172
+ 3. Steps are formatted as pipe-delimited text: "1. Action|Data|Result"
165
173
 
166
174
  #### Search Test Cases
167
175
 
package/dist/index.js CHANGED
@@ -37,9 +37,9 @@ const tools = [
37
37
  },
38
38
  testType: {
39
39
  type: 'string',
40
- enum: ['Manual', 'Cucumber', 'Generic'],
41
- description: 'The type of test case',
42
- default: 'Manual',
40
+ enum: ['Unstructured', 'Manual', 'Cucumber', 'Generic'],
41
+ description: 'The type of test case. Use "Unstructured" for free-form text steps (compatible with add_manual_test_steps)',
42
+ default: 'Unstructured',
43
43
  },
44
44
  labels: {
45
45
  type: 'array',
@@ -554,7 +554,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
554
554
  projectKey: args.projectKey,
555
555
  summary: args.summary,
556
556
  description: args.description,
557
- testType: args.testType || 'Manual',
557
+ testType: args.testType || 'Unstructured',
558
558
  labels: args.labels,
559
559
  priority: args.priority,
560
560
  };
@@ -12,7 +12,7 @@ export interface TestCase {
12
12
  key?: string;
13
13
  summary: string;
14
14
  description?: string;
15
- testType?: 'Manual' | 'Cucumber' | 'Generic';
15
+ testType?: 'Unstructured' | 'Manual' | 'Cucumber' | 'Generic';
16
16
  projectKey: string;
17
17
  labels?: string[];
18
18
  components?: string[];
@@ -146,8 +146,14 @@ export class XrayClient {
146
146
  jira: jiraFields
147
147
  };
148
148
  if (testCase.testType) {
149
+ // Map user-friendly test types to Xray's internal types
150
+ // For free-form text steps (used by add_manual_test_steps), use "Unstructured"
151
+ let xrayTestType = testCase.testType;
152
+ if (testCase.testType === 'Manual' || testCase.testType === 'Unstructured') {
153
+ xrayTestType = 'Unstructured';
154
+ }
149
155
  variables.testType = {
150
- name: testCase.testType
156
+ name: xrayTestType
151
157
  };
152
158
  }
153
159
  const result = await this.graphqlRequest(mutation, variables);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xray-mcp",
3
- "version": "1.1.5",
3
+ "version": "1.2.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {