Skip to main content
Glama

submit-test-results

Submit manual test execution results to track test run outcomes in QA Studio. Use this tool to record test case statuses including passed, failed, skipped, or blocked.

Instructions

Submit test results for a test run (useful for manual test execution tracking)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesThe project ID
testRunIdYesThe test run ID
resultsYesArray of test results

Implementation Reference

  • The handler function for the 'submit-test-results' tool. It destructures input arguments, sends a POST request to the `/results` API with mapped test results data (projectId to projectName), and returns formatted success or error response.
    async (args) => { try { const { projectId, testRunId, results } = args; const data = await apiRequest(`/results`, { method: 'POST', body: JSON.stringify({ testRunId, results: results.map((r) => ({ ...r, projectName: projectId // Map to expected field })) }) }); return { content: [ { type: 'text' as const, text: `✅ Submitted ${results.length} test results!\n\nProcessed: ${data.processedCount}\nDuplicates: ${data.duplicatesSkipped}\nErrors: ${data.errors.length}` } ] }; } catch (error) { return { content: [ { type: 'text' as const, text: `Error: ${error instanceof Error ? error.message : String(error)}` } ], isError: true }; } }
  • Zod input schema for the tool, validating projectId, testRunId, and an array of test results each with title, status (passed/failed/skipped/blocked), optional duration and error object.
    inputSchema: { projectId: z.string().describe('The project ID'), testRunId: z.string().describe('The test run ID'), results: z .array( z.object({ title: z.string().describe('Test case title'), status: z .enum(['passed', 'failed', 'skipped', 'blocked']) .describe('Test result status'), duration: z.number().optional().describe('Duration in milliseconds'), error: z .object({ message: z.string(), stack: z.string().optional() }) .optional() }) ) .describe('Array of test results') }
  • src/index.ts:333-395 (registration)
    Full registration of the 'submit-test-results' tool on the MCP server, specifying name, description, input schema, and inline handler function.
    // Register tool: submit-test-results server.registerTool( 'submit-test-results', { description: 'Submit test results for a test run (useful for manual test execution tracking)', inputSchema: { projectId: z.string().describe('The project ID'), testRunId: z.string().describe('The test run ID'), results: z .array( z.object({ title: z.string().describe('Test case title'), status: z .enum(['passed', 'failed', 'skipped', 'blocked']) .describe('Test result status'), duration: z.number().optional().describe('Duration in milliseconds'), error: z .object({ message: z.string(), stack: z.string().optional() }) .optional() }) ) .describe('Array of test results') } }, async (args) => { try { const { projectId, testRunId, results } = args; const data = await apiRequest(`/results`, { method: 'POST', body: JSON.stringify({ testRunId, results: results.map((r) => ({ ...r, projectName: projectId // Map to expected field })) }) }); return { content: [ { type: 'text' as const, text: `✅ Submitted ${results.length} test results!\n\nProcessed: ${data.processedCount}\nDuplicates: ${data.duplicatesSkipped}\nErrors: ${data.errors.length}` } ] }; } 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