---
title: Cloud Runner Test Runner REST API
description: Manages tests to be executed in a cloud runner for Automated Test Framework \(ATF\).Provides the status of each test ran for a provided Browser Orchestration Queue \(BOQ\) record.Sets the test runner job to complete status and cancels the root trackers of any generated tests that are running.Inserts a test runner job into the BOQ \[sn\_atf\_tg\_sn\_boq\] table for given test or test suite, which is then run on the cloud runner.
locale: en-US
canonical_url: https://www.servicenow.com/docs/r/api-reference/rest-apis/cloudrunner-testrunner-api.html
release: brazil
product: REST APIs
classification: rest-apis
topic_type: concept
last_updated: "2026-09-10"
reading_time_minutes: 8
breadcrumb: [REST API reference, API reference, API implementation and reference]
---
# Cloud Runner Test Runner REST API
Manages tests to be executed in a cloud runner for Automated Test Framework \(ATF\).
The Cloud Runner Test Runner API requires the [ATF Test Generator and Cloud Runner](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/servicenow-platform/atf-tg-cr-intro.md) \(sn\_atf\_tg\) plugin. The methods available with this API run in the **now** namespace and can be called using API Name, **One-click regression testing for ATF**, in the REST API Explorer. The admin role is required to access this API.
You can use this API for the following tasks:
- Start an ATF test or test suite in the Cloud Runner browser.
- Check the progress of the test job.
- Cancel the test job.
The Cloud Runner Test Runner API may be used in tandem with the [Cloud Runner Test Generation REST API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-apis/cloudrunner-testgeneration-api.md) and [Cloud Runner Test User REST API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-apis/cloudrunner-testuser-api.md). For instance, you can generate a test \(Cloud Runner Test Generation API\) and then get the progress of the test in the browser orchestration queue \(Cloud Runner TEST Generation API\) and check the number of tests that passed or failed.
To view the Server API reference documentation of this API, see [Cloud Runner TestRunnerApi – Scoped, Global](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/server-api-reference/cloudrnr-TestRunnerAPI-scoped.md).
**Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-apis/api-rest.md)
## Cloud Runner Test Runner - GET /now/sn\_atf\_tg/test\_runner\_progress
Provides the status of each test ran for a provided Browser Orchestration Queue \(BOQ\) record.
### URL format
Default URL: GET `/api/now/sn_atf_tg/test_runner_progress`
### Supported request parameters
|Name|Description|
|----|-----------|
|None| |
|
Name
|
Description
|
|---|
|
snboqId
|
Required. The BOQ record sys\_id of the test runner job to get the progress of.Data type: String
Table: BOQ \[sn\_atf\_tg\_sn\_boq\]
|
|Name|Description|
|----|-----------|
|None| |
### Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|Header|Description|
|------|-----------|
|None| |
### Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|
Status code
|
Description
|
|---|
|
200
|
Successfully retrieved the progress of the BOQ job.
|
|
400
|
Error getting BOQ record status. Returns one of the following messages:- No BOQ ID passed in – No BOQ ID was provided. Add the BOQ ID to the request body.
- Unable to find BOQ record – Invalid Sys ID. Verify that the sys\_id of the BOQ record is valid and the record exists.
|
|
403
|
Error granting user access to the endpoint. Ensure that the user has the admin role.
|
### Response body parameters \(JSON or XML\)
|
Name
|
Description
|
|---|
|
result
|
Object containing the progress results of the test runner job or a message explaining why the request failed.Data type: Object
```
"result": {
"progress": 100,
"state": "completed"
}
```
Or:
```
{
"result": {
"message": "String"
}
}
```
|
|
result.message
|
Error message detailing why the test runner progress cannot be retrieved. The message parameter is not returned in a successful response.Data type: String
|
|
result.progress
|
Percentage that indicates how close to completion a test is while in a running state.Data type: Number
|
|
result.state
|
Current status of the BOQ record. Possible values:
- Browsers requested: A request has been sent to the cloud infrastructure to start browsers for test generation or test running.
- Completed: The test task is complete.
- Failed state: The test task failed.
- Pending: The requested test activity has been created and waiting to be executed.
- Processing: The instance is scanning for records to ensure that the execution trackers are marked for cloud runner before the request is sent to the cloud infrastructure.
- Running: The cloud infrastructure browsers find and execute pending tests.
Data type: String
|
### cURL request
The following request retrieves the test runner job progress of the BOQ record.
```
curl "http://instance.service-now.com/api/now/sn_atf_tg/test_runner_progress?snboqId=" \
--request GET \
--header "Accept:application/json" \
--user "username:password"
```
The response indicates that the test is 100% complete.
```
{
"result": {
"progress": 100,
"state": "completed"
}
}
```
The following example returns a 400 error message when no BOQ ID is passed.
```
curl "http://instance.service-now.com/api/now/sn_atf_tg/test_runner_progress" \
--request GET \
--header "Accept:application/json" \
--user "username:password"
```
Response:
```
{
"result": {
"message": "No SNBOQ ID passed in, add snboqId to request body"
}
}
```
The following example returns a 400 error message when an invalid BOQ ID is passed.
```
curl "http://instance.service-now.com/api/now/sn_atf_tg/test_runner_progress?snboqId=invalid_sys_id" \
--request GET \
--header "Accept:application/json" \
--user "username:password"
```
Response:
```
{
"result": {
"message": "Invalid SNBOQ sys_id passed in"
}
}
```
## Cloud Runner Test Runner - POST /now/sn\_atf\_tg/cancel\_test\_runner
Sets the test runner job to complete status and cancels the root trackers of any generated tests that are running.
### URL format
Default URL: GET `/now/sn_atf_tg/cancel_test_runner`
### Supported request parameters
|Name|Description|
|----|-----------|
|None| |
|Name|Description|
|----|-----------|
|None| |
|
Name
|
Description
|
|---|
|
snboqId
|
Sys\_id of the Browser Orchestration Queue \(BOQ\) record \(sn\_atf\_tg\_sn\_boq\) associated with the test runner job to cancel.Data type: String
Table: BOQ \[sn\_atf\_tg\_sn\_boq\]
|
### Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|Header|Description|
|------|-----------|
|None| |
### Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|
Status code
|
Description
|
|---|
|
200
|
Successful. The request was successfully processed.
|
|
400
|
Error canceling job. Returns one of the following messages:- No BOQ ID passed in – No BOQ ID was provided. Add the BOQ ID to the request body.
- Unable to find BOQ record – Invalid Sys ID. Verify that the sys\_id of the BOQ record is valid and the record exists.
|
|
403
|
Error granting user access to the endpoint. Ensure that the user has the admin role.
|
### Response body parameters \(JSON or XML\)
|
Name
|
Description
|
|---|
|
result
|
Object containing the results of the request.```
"result": {
"message": String
}
```
Data type: Object
|
|
result.message
|
Message detailing whether the test cancellation was successful.Data type: String
|
### cURL request
The following example shows how to form a cancel test runner request according to the sys\_id of the BOQ record.
```
curl "https://instance.service-now.com/api/now/sn_atf_tg/cancel_test_runner" \
--request POST \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{\"snboqId\":\"\"}" \
--user "username:password"
```
The response message indicating that the test runner is successfully canceled.
```
{
"result": {
"message": "success"
}
}
```
## Cloud Runner Test Runner - POST /now/sn\_atf\_tg/test\_runner
Inserts a test runner job into the BOQ \[sn\_atf\_tg\_sn\_boq\] table for given test or test suite, which is then run on the cloud runner.
### URL format
Default URL: POST `api/now/sn_atf_tg/test_runner`
### Supported request parameters
|Name|Description|
|----|-----------|
|None| |
|Name|Description|
|----|-----------|
|None| |
|Name|Description|
|----|-----------|
|testId|Sys\_id of the test \[sys\_atf\_test\] or test suite \[sys\_atf\_test\_suite\] to run on the cloud runner.|
### Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|Header|Description|
|------|-----------|
|None| |
### Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/rest-api-explorer/c_RESTAPI.md).
|
Status code
|
Description
|
|---|
|
200
|
Successfully inserted a test runner BOQ job.
|
|
400
|
Error starting the test runner job. Returns one of the following messages:- Unable to find test or test suite with Sys ID <testId> – Invalid test ID. Ensure that the sys\_id of the test \(sys\_atf\_test\) or test suite \(sys\_atf\_test\_suite\) record is valid and the record exists.
- No Test ID passed in – No test ID was passed. Add the test ID to the request body.
|
|
403
|
Error granting user access to the endpoint. Ensure that the user has the admin role.
|
### Response body parameters \(JSON or XML\)
|
Name
|
Description
|
|---|
|
result
|
Object containing the results of the request.Data type: Object
```
{
"result": {
"snboqId": "String"
}
}
```
Or:
```
"result": {
"message": "String"
}
```
|
|
result.snboqId
|
Sys\_id of the BOQ record that is inserted when test runner starts.Data type: String
Table: BOQ \[sn\_atf\_tg\_sn\_boq\]
|
|
result.message
|
Error message detailing why the test runner cannot be started.Data type: String
|
### cURL request
The following request inserts a test runner job into the BOQ \[sn\_atf\_tg\_sn\_boq\] table.
```
curl "https://instance.service-now.com/api/now/sn_atf_tg/test_runner" \
--request POST \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{\"testId\":\"\"}" \
--user "username:password"
```
The response body returns the sys\_id of the test runner job that was successfully inserted.
```
{
"result": {
"snboqId": ""
}
}
```