get_test_set
Retrieve a specific test set's details and all associated tests by providing its key, enabling test management and analysis in Xray Cloud.
Instructions
Get details of a specific test set by key, including all tests
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| testSetKey | Yes | The test set key (e.g., "PROJ-890") |
Implementation Reference
- src/index.ts:814-824 (handler)MCP server handler for the 'get_test_set' tool. Extracts testSetKey from arguments, calls xrayClient.getTestSet, and returns the JSON stringified result.case 'get_test_set': { const result = await xrayClient.getTestSet(args.testSetKey as string); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:413-426 (schema)Tool definition including name, description, and input schema requiring 'testSetKey'.{ name: 'get_test_set', description: 'Get details of a specific test set by key, including all tests', inputSchema: { type: 'object', properties: { testSetKey: { type: 'string', description: 'The test set key (e.g., "PROJ-890")', }, }, required: ['testSetKey'], }, },
- src/index.ts:519-523 (registration)Registers the list tools handler which returns the tools array containing 'get_test_set'.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; }); // Handle tool execution
- src/xray-client.ts:830-867 (handler)Core implementation of getTestSet: executes GraphQL query to retrieve a specific test set by its key using JQL filter, returns detailed info including tests if found.async getTestSet(testSetKey: string): Promise<any> { const query = ` query GetTestSet($jql: String!, $limit: Int!) { getTestSets(jql: $jql, limit: $limit) { total results { issueId projectId jira(fields: ["key", "summary", "description", "status"]) tests(limit: 100) { total results { issueId jira(fields: ["key", "summary", "status"]) testType { name kind } } } } } } `; const variables = { jql: `key = '${testSetKey}'`, limit: 1 }; const result = await this.graphqlRequest<{ getTestSets: any }>(query, variables); if (result.getTestSets.total === 0) { throw new Error(`Test set ${testSetKey} not found`); } return result.getTestSets.results[0]; }
- src/xray-client.ts:77-82 (helper)Type definition for TestSet used in tool operations.export interface TestSet { summary: string; projectKey: string; testIssueIds?: string[]; description?: string; }