Skip to main content
Glama

get_test_execution

Retrieve detailed information about a specific test execution using its unique key, including all associated test runs for comprehensive test management and result tracking.

Instructions

Get details of a specific test execution by key, including all test runs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testExecutionKeyYesThe test execution key (e.g., "PROJ-456")

Implementation Reference

  • MCP server tool handler for 'get_test_execution': extracts testExecutionKey from args, calls xrayClient.getTestExecution, and returns JSON stringified result as text content.
    case 'get_test_execution': { const result = await xrayClient.getTestExecution(args.testExecutionKey as string); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • src/index.ts:196-209 (registration)
    Tool registration in the tools array: defines name 'get_test_execution', description, and inputSchema requiring testExecutionKey.
    { name: 'get_test_execution', description: 'Get details of a specific test execution by key, including all test runs', inputSchema: { type: 'object', properties: { testExecutionKey: { type: 'string', description: 'The test execution key (e.g., "PROJ-456")', }, }, required: ['testExecutionKey'], }, },
  • XrayClient.getTestExecution method: executes GraphQL query to fetch test execution by key using JQL, includes test runs details, handles not found error.
    async getTestExecution(testExecutionKey: string): Promise<any> { const query = ` query GetTestExecution($jql: String!, $limit: Int!) { getTestExecutions(jql: $jql, limit: $limit) { total results { issueId projectId jira(fields: ["key", "summary", "description", "status"]) testRuns(limit: 100) { results { id status { name description } test { issueId jira(fields: ["key", "summary"]) } startedOn finishedOn executedBy } } } } } `; const variables = { jql: `key = '${testExecutionKey}'`, limit: 1 }; const result = await this.graphqlRequest<{ getTestExecutions: any }>(query, variables); if (result.getTestExecutions.total === 0) { throw new Error(`Test execution ${testExecutionKey} not found`); } return result.getTestExecutions.results[0]; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/c4m3lblue-star/xray-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server