Skip to main content
Glama

get_test_execution_history

Retrieve execution history for a test across multiple launches, showing pass/fail history, last passed execution, and pass rate to analyze test reliability.

Instructions

📊 Get execution history for a test across multiple launches - shows pass/fail history, last passed execution, and pass rate

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testIdYesTest ID
testRunIdYesTest Run ID / Launch ID containing the test
projectKeyNoProject key (e.g., 'MCP') - alternative to projectId
projectIdNoProject ID - alternative to projectKey
limitNoNumber of history items to return (default: 10, max: 50)
formatNoOutput format: dto (structured), json, or string (markdown table)string

Implementation Reference

  • The core API client method that implements fetching test execution history across launches for a specific test using the Zebrunner Reporting API endpoint.
    async getTestExecutionHistory( launchId: number, testId: number, projectId: number, limit: number = 10 ): Promise<TestExecutionHistoryResponse> { const url = `/api/reporting/v1/launches/${launchId}/tests/${testId}/history?projectId=${projectId}&limit=${limit}`; if (this.config.debug) { console.log(`[ZebrunnerReportingClient] Fetching test execution history for test ${testId} (limit: ${limit})`); } const response = await this.makeAuthenticatedRequest<any>('GET', url); // Handle different response structures const historyData = response.data || response; return TestExecutionHistoryResponseSchema.parse(historyData); }
  • Zod schema defining the response structure for test execution history, including array of history items with status, duration, timestamps, etc.
    export const TestExecutionHistoryResponseSchema = z.object({ items: z.array(TestExecutionHistoryItemSchema) }); export type TestExecutionHistoryResponse = z.infer<typeof TestExecutionHistoryResponseSchema>;
  • Zod schema for individual test execution history item containing status, elapsed time, issue references, timestamps.
    export const TestExecutionHistoryItemSchema = z.object({ testId: z.coerce.number(), status: z.string(), passedManually: z.boolean(), elapsed: z.coerce.number(), // Duration in milliseconds issueReferences: z.array(z.object({ id: z.coerce.number().optional(), type: z.string(), value: z.string() })), testRunId: z.coerce.number(), startTime: z.coerce.number() // timestamp }); export type TestExecutionHistoryItem = z.infer<typeof TestExecutionHistoryItemSchema>;

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/maksimsarychau/mcp-zebrunner'

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