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>;
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states what data is returned (pass/fail history, last passed execution, pass rate). It lacks critical behavioral details: whether this is a read-only operation, authentication requirements, rate limits, pagination behavior, or error conditions. The description is insufficient for a tool with 6 parameters and no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose and key return data. Every element earns its place with no wasted words, though it could benefit from additional behavioral context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 6 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address authentication, error handling, rate limits, or the structure of returned data. While it mentions what data is included, it doesn't provide enough context for reliable agent usage given the complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, providing complete parameter documentation. The description adds no specific parameter semantics beyond implying historical data retrieval across launches. It doesn't explain relationships between parameters (e.g., projectKey vs projectId alternatives) or clarify the 'format' parameter's practical implications.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('execution history for a test across multiple launches'), specifying the scope of data retrieval. It distinguishes from siblings by focusing on historical pass/fail data rather than current status or analysis, though it doesn't explicitly name alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when historical test execution data is needed, but provides no explicit guidance on when to choose this tool over similar siblings like 'get_launch_test_summary' or 'get_test_run_result_statuses'. No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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