search_test_executions
Search for test executions in Xray using JQL queries to filter results by project, date, or other criteria. Retrieve specific test execution data for analysis 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:659-672 (handler)MCP server tool handler for 'search_test_executions'. Extracts arguments, calls xrayClient.searchTestExecutions, and formats result as MCP content response.case '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/index.ts:211-228 (registration)Tool registration object defining the 'search_test_executions' tool, including name, description, and input schema. Used by the MCP server for tool listing.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/xray-client.ts:522-559 (helper)Core implementation of test execution search via GraphQL query in XrayClient class. Executes 'getTestExecutions' query with JQL and limit, returning detailed results including test runs.async 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; }