Skip to main content

AutoTesting API

Auto Testing API

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

Quick Reference

MethodDescription
addCaseToSuiteAdds a test case to a test suite.
createCaseCreates a new test case.
createRunCreates a new test run.
createSuiteCreates a new test suite.
deleteCaseDeletes a test case.
deleteSuiteDeletes a test suite.
getCaseRetrieves a specific test case by ID.
getRunRetrieves a specific test run by ID.
getSuiteRetrieves a specific test suite by ID.
listCasesRetrieves all test cases.
listRunsRetrieves all test runs.
listSuitesRetrieves all test suites.
patchRunCasePatches a specific test case result within a test run.
patchRunCaseStepPatches a specific step result within a test case of a test run.
removeCaseFromSuiteRemoves a test case from a test suite.
updateCaseUpdates a test case.
updateRunUpdates a test run.
updateSuiteUpdates a test suite.

Methods


addCaseToSuite

client.autoTesting.addCaseToSuite(suiteId: string, data: AddTestCaseToSuiteRequest): Promise<unknown>

Adds a test case to a test suite.

Associates an existing test case with the specified suite, making it part of the suite's execution set.

ParameterTypeRequiredDescription
suiteIdstringYesThe unique identifier of the test suite
dataAddTestCaseToSuiteRequestYesThe test case association payload

Returns: Promise<unknown> — A promise that resolves when the case has been added to the suite

Full reference →


createCase

client.autoTesting.createCase(data: CreateTestCaseRequest): Promise<TestCase>

Creates a new test case.

Defines an individual test scenario with steps, expected outcomes, and validation criteria.

ParameterTypeRequiredDescription
dataCreateTestCaseRequestYesThe test case creation payload

Returns: Promise<TestCase> — A promise that resolves to the newly created TestCase

Full reference →


createRun

client.autoTesting.createRun(data: CreateTestRunRequest): Promise<TestRun>

Creates a new test run.

Initiates an execution of one or more test suites or cases, tracking the results as they complete.

ParameterTypeRequiredDescription
dataCreateTestRunRequestYesThe test run creation payload

Returns: Promise<TestRun> — A promise that resolves to the newly created TestRun

Full reference →


createSuite

client.autoTesting.createSuite(data: CreateTestSuiteRequest): Promise<TestSuite>

Creates a new test suite.

Defines a new collection of test cases that can be executed together.

ParameterTypeRequiredDescription
dataCreateTestSuiteRequestYesThe test suite creation payload

Returns: Promise<TestSuite> — A promise that resolves to the newly created TestSuite

Full reference →


deleteCase

client.autoTesting.deleteCase(id: string): Promise<unknown>

Deletes a test case.

Permanently removes the specified test case from the system.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the test case to delete

Returns: Promise<unknown> — A promise that resolves when the test case has been deleted

Full reference →


deleteSuite

client.autoTesting.deleteSuite(id: string): Promise<unknown>

Deletes a test suite.

Permanently removes the specified test suite. This does not delete the test cases themselves, only their association with the suite.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the test suite to delete

Returns: Promise<unknown> — A promise that resolves when the suite has been deleted

Full reference →


getCase

client.autoTesting.getCase(id: string): Promise<TestCase>

Retrieves a specific test case by ID.

Returns the full test case definition including its steps, expected results, and metadata.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the test case

Returns: Promise<TestCase> — A promise that resolves to the TestCase object

Full reference →


getRun

client.autoTesting.getRun(id: string): Promise<TestRun>

Retrieves a specific test run by ID.

Returns the full test run record including per-case results, timing, and overall status.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the test run

Returns: Promise<TestRun> — A promise that resolves to the TestRun object

Full reference →


getSuite

client.autoTesting.getSuite(id: string): Promise<TestSuite>

Retrieves a specific test suite by ID.

Returns the full suite definition including its metadata and associated test case references.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the test suite

Returns: Promise<TestSuite> — A promise that resolves to the TestSuite object

Full reference →


listCases

client.autoTesting.listCases(params?: Record<string, unknown>): Promise<TestCase[]>

Retrieves all test cases.

Returns every test case in the system, regardless of suite membership.

ParameterTypeRequiredDescription
paramsRecord<string, unknown>NoOptional query parameters for filtering or pagination

Returns: Promise<TestCase[]> — A promise that resolves to an array of TestCase objects

Full reference →


listRuns

client.autoTesting.listRuns(params?: Record<string, unknown>): Promise<TestRun[]>

Retrieves all test runs.

Returns the history of test run executions, including their status, results, and timing information.

ParameterTypeRequiredDescription
paramsRecord<string, unknown>NoOptional query parameters for filtering or pagination

Returns: Promise<TestRun[]> — A promise that resolves to an array of TestRun objects

Full reference →


listSuites

client.autoTesting.listSuites(params?: Record<string, unknown>): Promise<TestSuite[]>

Retrieves all test suites.

Returns the complete list of test suites, which are collections of related test cases grouped for organized execution.

ParameterTypeRequiredDescription
paramsRecord<string, unknown>NoOptional query parameters for filtering or pagination

Returns: Promise<TestSuite[]> — A promise that resolves to an array of TestSuite objects

Full reference →


patchRunCase

client.autoTesting.patchRunCase(runId: string, caseId: string, data: PatchTestRunCaseRequest): Promise<unknown>

Patches a specific test case result within a test run.

Updates the status or outcome of an individual test case within an active test run, allowing incremental result reporting.

ParameterTypeRequiredDescription
runIdstringYesThe unique identifier of the test run
caseIdstringYesThe unique identifier of the test case within the run
dataPatchTestRunCaseRequestYesThe patch data to apply to the case result

Returns: Promise<unknown> — A promise that resolves when the patch has been applied

Full reference →


patchRunCaseStep

client.autoTesting.patchRunCaseStep(runId: string, caseId: string, stepId: string, data: PatchTestRunCaseStepRequest): Promise<unknown>

Patches a specific step result within a test case of a test run.

Updates the status or outcome of an individual step within a test case, providing granular progress tracking.

ParameterTypeRequiredDescription
runIdstringYesThe unique identifier of the test run
caseIdstringYesThe unique identifier of the test case
stepIdstringYesThe unique identifier of the step within the case
dataPatchTestRunCaseStepRequestYesThe patch data to apply to the step result

Returns: Promise<unknown> — A promise that resolves when the patch has been applied

Full reference →


removeCaseFromSuite

client.autoTesting.removeCaseFromSuite(suiteId: string, caseId: string): Promise<unknown>

Removes a test case from a test suite.

Disassociates a test case from the specified suite without deleting the test case itself.

ParameterTypeRequiredDescription
suiteIdstringYesThe unique identifier of the test suite
caseIdstringYesThe unique identifier of the test case to remove

Returns: Promise<unknown> — A promise that resolves when the case has been removed from the suite

Full reference →


updateCase

client.autoTesting.updateCase(id: string, data: UpdateTestCaseRequest): Promise<TestCase>

Updates a test case.

Modifies the steps, name, or other properties of an existing test case.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the test case to update
dataUpdateTestCaseRequestYesThe fields to update on the test case

Returns: Promise<TestCase> — A promise that resolves to the updated TestCase

Full reference →


updateRun

client.autoTesting.updateRun(id: string, data: UpdateTestRunRequest): Promise<TestRun>

Updates a test run.

Modifies the status or metadata of an in-progress or completed test run.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the test run to update
dataUpdateTestRunRequestYesThe fields to update on the test run

Returns: Promise<TestRun> — A promise that resolves to the updated TestRun

Full reference →


updateSuite

client.autoTesting.updateSuite(id: string, data: UpdateTestSuiteRequest): Promise<TestSuite>

Updates a test suite.

Modifies the name, description, or other properties of an existing test suite.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the test suite to update
dataUpdateTestSuiteRequestYesThe fields to update on the suite

Returns: Promise<TestSuite> — A promise that resolves to the updated TestSuite

Full reference →