Skip to main content
Glama

get-test-results

Retrieve test results for a specific test run in QA Studio, with optional filtering by status to analyze performance.

Instructions

Get test results for a specific test run

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesThe project ID
testRunIdYesThe test run ID
statusNoOptional filter by status

Implementation Reference

  • Handler function that makes an API request to retrieve test results for a specific test run, optionally filtered by status, and returns the JSON data or an error message.
      async (args) => {
        try {
          const { projectId, testRunId, status } = args;
    
          const query = status ? `?status=${status}` : '';
          const data = await apiRequest(`/projects/${projectId}/runs/${testRunId}/results${query}`);
    
          return {
            content: [
              {
                type: 'text' as const,
                text: JSON.stringify(data, null, 2)
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: 'text' as const,
                text: `Error: ${error instanceof Error ? error.message : String(error)}`
              }
            ],
            isError: true
          };
        }
      }
    );
  • Tool schema defining the input parameters: projectId, testRunId, and optional status filter using Zod validation.
    {
      description: 'Get test results for a specific test run',
      inputSchema: {
        projectId: z.string().describe('The project ID'),
        testRunId: z.string().describe('The test run ID'),
        status: z
          .enum(['passed', 'failed', 'skipped', 'blocked', 'retest', 'untested'])
          .optional()
          .describe('Optional filter by status')
      }
    },
  • src/index.ts:218-259 (registration)
    Registration of the 'get-test-results' tool using server.registerTool, including schema and inline handler function.
    // Register tool: get-test-results
    server.registerTool(
      'get-test-results',
      {
        description: 'Get test results for a specific test run',
        inputSchema: {
          projectId: z.string().describe('The project ID'),
          testRunId: z.string().describe('The test run ID'),
          status: z
            .enum(['passed', 'failed', 'skipped', 'blocked', 'retest', 'untested'])
            .optional()
            .describe('Optional filter by status')
        }
      },
      async (args) => {
        try {
          const { projectId, testRunId, status } = args;
    
          const query = status ? `?status=${status}` : '';
          const data = await apiRequest(`/projects/${projectId}/runs/${testRunId}/results${query}`);
    
          return {
            content: [
              {
                type: 'text' as const,
                text: JSON.stringify(data, null, 2)
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: 'text' as const,
                text: `Error: ${error instanceof Error ? error.message : String(error)}`
              }
            ],
            isError: true
          };
        }
      }
    );

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/QAStudio-Dev/mcp-server'

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