get_test_execution_status
Retrieve test execution progress and statistics for a specific test cycle in JIRA Zephyr to monitor testing status and identify completion levels.
Instructions
Get test execution progress and statistics
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cycleId | Yes | Test cycle ID |
Implementation Reference
- src/tools/test-execution.ts:58-92 (handler)The core handler function implementing the get_test_execution_status tool. It validates input, fetches execution summary from Zephyr client, computes progress metrics, and returns structured status data.export const getTestExecutionStatus = async (input: GetTestExecutionStatusInput) => { const validatedInput = getTestExecutionStatusSchema.parse(input); try { const summary = await getZephyrClient().getTestExecutionSummary(validatedInput.cycleId); return { success: true, data: { cycleId: validatedInput.cycleId, summary: { total: summary.total, passed: summary.passed, failed: summary.failed, blocked: summary.blocked, inProgress: summary.inProgress, notExecuted: summary.notExecuted, passRate: Math.round(summary.passRate), }, progress: { completed: summary.passed + summary.failed + summary.blocked, remaining: summary.notExecuted + summary.inProgress, completionPercentage: summary.total > 0 ? Math.round(((summary.passed + summary.failed + summary.blocked) / summary.total) * 100) : 0, }, }, }; } catch (error: any) { return { success: false, error: error.response?.data?.message || error.message, }; } };
- src/utils/validation.ts:45-47 (schema)Zod schema defining the input structure for get_test_execution_status tool, requiring a cycleId.export const getTestExecutionStatusSchema = z.object({ cycleId: z.string().min(1, 'Cycle ID is required'), });
- src/utils/validation.ts:104-104 (schema)TypeScript type inferred from the getTestExecutionStatusSchema for input validation.export type GetTestExecutionStatusInput = z.infer<typeof getTestExecutionStatusSchema>;
- src/index.ts:148-157 (registration)Tool registration in the TOOLS array exported for ListToolsRequest, defining name, description, and input schema.{ name: 'get_test_execution_status', description: 'Get test execution progress and statistics', inputSchema: { type: 'object', properties: { cycleId: { type: 'string', description: 'Test cycle ID' }, }, required: ['cycleId'], },
- src/index.ts:401-410 (registration)Dispatch logic in CallToolRequest handler switch statement: validates arguments using schema and invokes the getTestExecutionStatus handler.case 'get_test_execution_status': { const validatedArgs = validateInput<GetTestExecutionStatusInput>(getTestExecutionStatusSchema, args, 'get_test_execution_status'); return { content: [ { type: 'text', text: JSON.stringify(await getTestExecutionStatus(validatedArgs), null, 2), }, ], };