Skip to main content

getRun

codebolt.autoTesting.getRun(params: IGetRunParams): Promise<IGetRunResponse>

Retrieves details of a specific test run including case results and step statuses.

Parameters

Returns

  • Promise<[IGetRunResponse](/docs/reference/type-reference/codeboltjs/interfaces/IGetRunResponse)>: A promise that resolves to the test run with detailed results.

Examples

const run = await codebolt.autoTesting.getRun({ id: 'run-123' });
console.log('Run status:', run.payload.run.status);
console.log('Test cases:', run.payload.run.testCases);

// Check pass/fail counts
const cases = run.payload.run.testCases;
const passed = cases.filter(c => c.status === 'passed').length;
const failed = cases.filter(c => c.status === 'failed').length;
console.log(`Passed: ${passed}, Failed: ${failed}`);

Notes

  • Returns complete run details
  • Includes status for all cases and steps
  • Useful for generating reports