add_tests_to_test_set
Add test cases to an existing test set in Xray test management to organize and group related tests for execution.
Instructions
Add tests to an existing test set
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| testSetIssueId | Yes | The test set issue ID (not key) | |
| testIssueIds | Yes | Array of test issue IDs to add |
Implementation Reference
- src/xray-client.ts:915-932 (handler)Core handler function that executes the GraphQL mutation to add tests to a test set in Xray.async addTestsToTestSet(testSetIssueId: string, testIssueIds: string[]): Promise<any> { const mutation = ` mutation AddTestsToTestSet($issueId: String!, $testIssueIds: [String]!) { addTestsToTestSet(issueId: $issueId, testIssueIds: $testIssueIds) { addedTests warning } } `; const variables = { issueId: testSetIssueId, testIssueIds }; const result = await this.graphqlRequest<{ addTestsToTestSet: any }>(mutation, variables); return result.addTestsToTestSet; }
- src/index.ts:465-483 (schema)Tool schema definition including input validation for the add_tests_to_test_set tool.{ name: 'add_tests_to_test_set', description: 'Add tests to an existing test set', inputSchema: { type: 'object', properties: { testSetIssueId: { type: 'string', description: 'The test set issue ID (not key)', }, testIssueIds: { type: 'array', items: { type: 'string' }, description: 'Array of test issue IDs to add', }, }, required: ['testSetIssueId', 'testIssueIds'], }, },
- src/index.ts:856-869 (registration)MCP server handler that registers and dispatches the tool call to the xrayClient implementation.case 'add_tests_to_test_set': { const result = await xrayClient.addTestsToTestSet( args.testSetIssueId as string, args.testIssueIds as string[] ); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:856-869 (handler)Top-level MCP tool execution handler that calls the core implementation.case 'add_tests_to_test_set': { const result = await xrayClient.addTestsToTestSet( args.testSetIssueId as string, args.testIssueIds as string[] ); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }