Skip to main content
Glama

update_test_run_status

Update the status of a specific test run to reflect current execution results, such as marking tests as PASS or FAIL to maintain accurate test tracking.

Instructions

Update the status of a specific test run (e.g., mark as PASS or FAIL)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYesThe new status for the test run
testRunIdYesThe test run ID (obtained from test execution details)

Implementation Reference

  • Core handler function that executes the GraphQL mutation to update the test run status in Xray Cloud.
    async updateTestRunStatus(testRunId: string, status: TestRunStatus): Promise<string> { const mutation = ` mutation UpdateTestRunStatus($id: String!, $status: String!) { updateTestRunStatus(id: $id, status: $status) } `; const variables = { id: testRunId, status }; const result = await this.graphqlRequest<{ updateTestRunStatus: string }>(mutation, variables); return result.updateTestRunStatus; }
  • MCP server request handler (switch case) that invokes the Xray client method for the tool.
    case 'update_test_run_status': { const result = await xrayClient.updateTestRunStatus( args.testRunId as string, args.status as TestRunStatus ); return { content: [ { type: 'text', text: `Test run ${args.testRunId} status updated to ${args.status}: ${result}`, }, ], }; }
  • src/index.ts:248-266 (registration)
    Registration of the MCP tool including name, description, and input schema definition.
    { name: 'update_test_run_status', description: 'Update the status of a specific test run (e.g., mark as PASS or FAIL)', inputSchema: { type: 'object', properties: { testRunId: { type: 'string', description: 'The test run ID (obtained from test execution details)', }, status: { type: 'string', enum: ['TODO', 'EXECUTING', 'PASS', 'FAIL', 'ABORTED', 'PASSED', 'FAILED'], description: 'The new status for the test run', }, }, required: ['testRunId', 'status'], }, },
  • Type definition for valid TestRunStatus values, matching the tool's input schema enum.
    export type TestRunStatus = 'TODO' | 'EXECUTING' | 'PASS' | 'FAIL' | 'ABORTED' | 'PASSED' | 'FAILED';

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/c4m3lblue-star/xray-mcp'

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