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
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | The new status for the test run | |
| testRunId | Yes | The test run ID (obtained from test execution details) |
Implementation Reference
- src/xray-client.ts:564-578 (handler)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; }
- src/index.ts:689-702 (handler)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'], }, },
- src/xray-client.ts:62-62 (schema)Type definition for valid TestRunStatus values, matching the tool's input schema enum.export type TestRunStatus = 'TODO' | 'EXECUTING' | 'PASS' | 'FAIL' | 'ABORTED' | 'PASSED' | 'FAILED';