search_test_executions
Find test executions using JQL queries to filter results by project, date, status, or other criteria for test management and reporting.
Instructions
Search for test executions using JQL (Jira Query Language)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jql | Yes | JQL query to search test executions (e.g., "project = PROJ AND created >= -7d") | |
| maxResults | No | Maximum number of results to return |
Implementation Reference
- src/index.ts:210-227 (registration)Registration of the 'search_test_executions' tool in the MCP tools list, including name, description, and input schema definition{ name: 'search_test_executions', description: 'Search for test executions using JQL (Jira Query Language)', inputSchema: { type: 'object', properties: { jql: { type: 'string', description: 'JQL query to search test executions (e.g., "project = PROJ AND created >= -7d")', }, maxResults: { type: 'number', description: 'Maximum number of results to return', default: 50, }, }, required: ['jql'], },
- src/index.ts:210-227 (schema)Input schema for validating tool arguments (jql required, maxResults optional){ name: 'search_test_executions', description: 'Search for test executions using JQL (Jira Query Language)', inputSchema: { type: 'object', properties: { jql: { type: 'string', description: 'JQL query to search test executions (e.g., "project = PROJ AND created >= -7d")', }, maxResults: { type: 'number', description: 'Maximum number of results to return', default: 50, }, }, required: ['jql'], },
- src/index.ts:659-672 (handler)MCP server request handler for 'search_test_executions' tool that extracts arguments and delegates to XrayClient.searchTestExecutions, returning JSON resultscase 'search_test_executions': { const result = await xrayClient.searchTestExecutions( args.jql as string, args.maxResults as number | undefined ); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/xray-client.ts:522-559 (helper)Core helper method in XrayClient class that executes GraphQL query to search test executions by JQL and returns resultsasync searchTestExecutions(jql: string, maxResults: number = 50): Promise<any> { const query = ` query SearchTestExecutions($jql: String!, $limit: Int!) { getTestExecutions(jql: $jql, limit: $limit) { total start limit results { issueId projectId jira(fields: ["key", "summary", "description", "status", "created", "updated"]) testRuns(limit: 100) { total results { id status { name description } test { issueId jira(fields: ["key", "summary"]) } } } } } } `; const variables = { jql, limit: maxResults }; const result = await this.graphqlRequest<{ getTestExecutions: any }>(query, variables); return result.getTestExecutions; }