xray-mcp 1.2.3 → 1.2.5
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 +4 -5
- package/dist/index.js +4 -4
- package/dist/xray-client.d.ts +1 -1
- package/dist/xray-client.js +7 -11
- package/package.json +1 -1
- package/workingsrcforreplacement/index.ts +936 -0
- package/workingsrcforreplacement/xray-client.ts +955 -0
package/README.md
CHANGED
|
@@ -134,22 +134,21 @@ 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": "
|
|
137
|
+
"testType": "Manual",
|
|
138
138
|
"labels": ["login", "authentication"],
|
|
139
139
|
"priority": "High"
|
|
140
140
|
}
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
**Test Types:**
|
|
144
|
-
- `Manual` -
|
|
145
|
-
- `Unstructured` - Free-form text steps (use with `add_manual_test_steps` tool)
|
|
144
|
+
- `Manual` - Manual tests (default, use with `add_manual_test_steps` for unstructured steps)
|
|
146
145
|
- `Cucumber` - Gherkin/BDD scenarios
|
|
147
146
|
- `Generic` - Other test types
|
|
148
147
|
- `Generic` - Generic automated tests
|
|
149
148
|
|
|
150
149
|
#### Add Manual Test Steps
|
|
151
150
|
|
|
152
|
-
**Important:** Test cases
|
|
151
|
+
**Important:** Test cases can use this tool regardless of test type.
|
|
153
152
|
|
|
154
153
|
```json
|
|
155
154
|
{
|
|
@@ -169,7 +168,7 @@ npm run dev
|
|
|
169
168
|
```
|
|
170
169
|
|
|
171
170
|
**Migration from Azure DevOps:** This tool is perfect for migrating test cases from ADO:
|
|
172
|
-
1. Create test case with `testType: "
|
|
171
|
+
1. Create test case with `testType: "Manual"` (default)
|
|
173
172
|
2. Use the returned `issueId` with `add_manual_test_steps`
|
|
174
173
|
3. Steps are formatted as pipe-delimited text: "1. Action|Data|Result"
|
|
175
174
|
|
package/dist/index.js
CHANGED
|
@@ -37,9 +37,9 @@ const tools = [
|
|
|
37
37
|
},
|
|
38
38
|
testType: {
|
|
39
39
|
type: 'string',
|
|
40
|
-
enum: ['
|
|
41
|
-
description: 'The type of test case
|
|
42
|
-
default: '
|
|
40
|
+
enum: ['Manual', 'Cucumber', 'Generic'],
|
|
41
|
+
description: 'The type of test case',
|
|
42
|
+
default: 'Manual',
|
|
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 || '
|
|
557
|
+
testType: args.testType || 'Manual',
|
|
558
558
|
labels: args.labels,
|
|
559
559
|
priority: args.priority,
|
|
560
560
|
};
|
package/dist/xray-client.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface TestCase {
|
|
|
12
12
|
key?: string;
|
|
13
13
|
summary: string;
|
|
14
14
|
description?: string;
|
|
15
|
-
testType?: '
|
|
15
|
+
testType?: 'Manual' | 'Cucumber' | 'Generic';
|
|
16
16
|
projectKey: string;
|
|
17
17
|
labels?: string[];
|
|
18
18
|
components?: string[];
|
package/dist/xray-client.js
CHANGED
|
@@ -112,8 +112,8 @@ export class XrayClient {
|
|
|
112
112
|
*/
|
|
113
113
|
async createTestCase(testCase) {
|
|
114
114
|
const mutation = `
|
|
115
|
-
mutation CreateTest($jira: JSON!, $testType: String) {
|
|
116
|
-
createTest(jira: $jira, testType: $testType) {
|
|
115
|
+
mutation CreateTest($jira: JSON!, $testType: UpdateTestTypeInput, $unstructured: String) {
|
|
116
|
+
createTest(jira: $jira, testType: $testType, unstructured: $unstructured) {
|
|
117
117
|
test {
|
|
118
118
|
issueId
|
|
119
119
|
jira(fields: ["key"])
|
|
@@ -143,17 +143,13 @@ export class XrayClient {
|
|
|
143
143
|
jiraFields.fields.priority = { name: testCase.priority };
|
|
144
144
|
}
|
|
145
145
|
const variables = {
|
|
146
|
-
jira: jiraFields
|
|
146
|
+
jira: jiraFields,
|
|
147
|
+
unstructured: testCase.description || ''
|
|
147
148
|
};
|
|
148
149
|
if (testCase.testType) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
if (testCase.testType === 'Manual') {
|
|
153
|
-
xrayTestType = 'Unstructured';
|
|
154
|
-
}
|
|
155
|
-
// Pass as plain string, not object
|
|
156
|
-
variables.testType = xrayTestType;
|
|
150
|
+
variables.testType = {
|
|
151
|
+
name: testCase.testType
|
|
152
|
+
};
|
|
157
153
|
}
|
|
158
154
|
const result = await this.graphqlRequest(mutation, variables);
|
|
159
155
|
return {
|