--- title: Cloud Runner Test Generation REST API description: Manages test job generation to be executed in a cloud runner for Automated Test Framework \(ATF\).Provides the status of each generated test for a provided Browser Orchestration Queue \(BOQ\) record.Sets the test generation job and its associated update set record to complete status. If any test jobs are in progress on cancellation, this method sets any of the in-progress test records generated to skipped.Inserts a record into the Browser Orchestration Queue \(BOQ\) \[sn\_atf\_tg\_sn\_boq\] table to start a test job. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/rest-apis/cloudrunner-testgeneration-api.html release: australia product: REST APIs classification: rest-apis topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 10 breadcrumb: [REST API reference, API reference, API implementation and reference] --- # Cloud Runner Test Generation REST API Manages test job generation to be executed in a cloud runner for Automated Test Framework \(ATF\). The Cloud Runner Test Generation API requires the [ATF Test Generator and Cloud Runner](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/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 the test generation job. - Check the progress of the test generation job. - Cancel the test generation job. The Cloud Runner Test Generation API may be used in tandem with the [Cloud Runner Test Runner REST API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/cloudrunner-testrunner-api.md) and [Cloud Runner Test User REST API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/cloudrunner-testuser-api.md). For instance, you can call the Test Generation API to run a test and then get the progress of the test in the browser orchestration queue \(Cloud Runner TEST Generation API\) and then check the number of tests that passed or failed. To view the Server API reference documentation of this API, see [Cloud Runner TestGenerationApi – Scoped, Global](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/cloudrnr-TestGenerationAPI-scoped.md). **Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/api-rest.md) ## Cloud Runner Test Generation - GET /now/sn\_atf\_tg/test\_generation\_progress Provides the status of each generated test for a provided Browser Orchestration Queue \(BOQ\) record. ### URL format Default URL: GET `/api/now/sn_atf_tg/test_generation_progress` ### Supported request parameters |Name|Description| |----|-----------| |None| |
| Name | Description |
|---|---|
| snboqId | Required. The BOQ record sys\_id of the test generation job to get the progress of.Data type: String Table: BOQ \[sn\_atf\_tg\_sn\_boq\] |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| 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. |
| Name | Description |
|---|---|
| result | Object containing the progress results of the generated test job or a message explaining why the request failed.Data type: Object ``` "result": { "testsSucceeded": Number, "testsFailed": Number, "testsPending": Number, "testsInProgress": Number, "testsSkipped": Number } } ``` Or: ``` { "result": { "message": "String" } } ``` |
| result.message | Error message detailing why the test generation progress cannot be retrieved. The message parameter is not returned in a successful response.Data type: String |
| result.testsSucceeded | Number of generated tests that passed.Data type: Number |
| result.testsFailed | Number of generated tests that failed.Data type: Number |
| result.testsPending | Number of use cases that are waiting for generated tests.Data type: Number |
| result.testsInProgress | Number of use cases that tests are created for.Data type: Number |
| result.testsSkipped | Number of tests skipped due to the job cancellation.Data type: Number |
| Name | Description |
|---|---|
| snboqId | Required. Sys\_id of the Browser Orchestration Queue \(BOQ\) record to cancel.Data type: String Table: BOQ \[sn\_atf\_tg\_sn\_boq\] |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Content-Type | Data format of the request body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Status code | Description |
|---|---|
| 200 | Successfully canceled the BOQ job. |
| 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. |
| Name | Description |
|---|---|
| result | Object containing the results of the cancellation request.Data type: Object ``` "result": { "message": "String" } ``` |
| result.message | Message detailing whether the test cancellation was successful.Data type: String |
| Name | Description |
|---|---|
| catalogEncodedQuery | Encoded query specifying which catalog items to generate tests on. An empty string defaults to all catalog items. For more information about forming encoded queries, see [Encoded query strings](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/c_EncodedQueryStrings.md).Data type: String |
| Email address to alert when test generation is complete.Data type: String | |
| maxTestCount | Number of overall tests to generate.Accepted values: Any number between 1 and 9999. Data type: Number Default: 9999 |
| maxTestCountPerItem | Number of tests to generate per catalog item. Accepted values: Any number between 1 and 10. Data type: Number Default: 10 |
| maxTestCountPerTable | Number of tests to generate per table. Accepted values: Any number between 1 and 10. Data type: Number Default: 10 |
| scopeForGeneratingTests | Required when **separateUpdateSetPerScope** is set to false. Sys\_id of the scope in which to place all generated tests. Data type: String |
| separateUpdateSetPerScope | Flag that indicates whether to separate generated tests into respective suites, update sets, and scopes, or to place tests into one suite, update set, and scope.Valid values: - true: Tests are placed into their respective suite and update set according to the scope of each table or catalog item. - false: All generated tests are placed in the same suite, update set, and scope. If false, **scopeForGeneratingTests** is required in the request. Data type: Boolean Default: true |
| testSuite | Optional. Sets the name of the test suite to create via test generation.Data type: String Default: ATF Generated Suite - <time\_stamp> |
| tableEncodedQuery | Encoded query specifying the tables on which to generate tests. An empty string defaults to all tables. For more information about forming encoded queries, see [Encoded query strings](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/c_EncodedQueryStrings.md).Data type: String |
| userEncodedQuery | Encoded query specifying which users to generate tests on. An empty string input defaults to all tables. For more information about forming encoded queries, see [Encoded query strings](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/c_EncodedQueryStrings.md).Data type: String |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Content-Type | Data format of the request body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Name | Description |
|---|---|
| result | Object containing the results of the request.``` "result": { "snboqId": String } ``` Data type: Object |
| result.snboqId | Sys\_id of the record inserted in the sn\_atf\_tg\_sn\_boq table when the test generation starts.Data type: String |