---
sourceDocument: Australia Build or modify applications
sourceDocumentLink: https://www.servicenow.com/docs/r/application-development

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Server category

# Server category {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 19 minutes to read

Perform server-side operations. For example, query and update a record, impersonate a user, or run a server-side script.

## Create a User {#ariaid-title2}

Create a user with specified roles and groups for the test. The user record gets rolled
back after the test completes.
{#atf-create-user__table_upr_ww4_nhb__entry__2}

| Field | Description |
|-|-|
| Execution order | Integer specifying the order in which the test executes this step. As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them. You can change this default order by editing the Execution order values. |
| Application | Application scope in which the system runs this step. |
| Active | Option to activate this test step for use. |
| Test | Name of the test that you're adding the step to. |
| Step config | Name of the step. |
| Notes | Notes about the test step. |
| First name | First name of the user. |
| Last name | Last name of the user. |
| Roles | Assigned roles of the user. |
| Groups | Assigned groups of the user. |
| Impersonate this user | Option to impersonate the new user. |
[Table 1. Inputs]

{#atf-create-user__table_upr_ww4_nhb} {#atf-create-user__d5b_d2p_tw__entry__2}

| Field | Description |
|-|-|
| user | The user ID of the user impersonated. |
[Table 2. Outputs]

{#atf-create-user__d5b_d2p_tw}

## Impersonate {#ariaid-title3}

Impersonate the specified user for the test.{#atf-impersonate__fn4_pvy_rw}
Impersonate specifies a user for executing subsequent steps in this test. It works for both server-side and browser-side steps and stays in effect until changed with another Impersonate step or until the test ends. The impersonation automatically ends when the test is over.  
Note:  
* Do not impersonate a user with the test author role. Doing so can lead to conflicts that interfere with executing the test.{#atf-impersonate__kn4_pvy_rw}
* Tests which involve impersonated users which no longer exist fail.  
  Tip:  
  It is recommended to create a new user to avoid data dependencies. See [Create a User](https://www.servicenow.com/docs/d0ow308fMuNX2IilOI_W~A#atf-create-user "Create a user with specified roles and groups for the test. The user record gets rolled back after the test completes."), for more information.
* Do not rely on user IDs being consistent across different instances. The system dynamically assigns users IDs, so the ID for a particular user often differs from one instance to the next.{#atf-impersonate__ln4_pvy_rw}
* When exporting and importing automated tests, keep in mind that update sets do not update the user field.{#atf-impersonate__mn4_pvy_rw}
* Tests can impersonate users with the snc_external role, which allows testing users who do not have login access. See [Explicit Roles](https://www.servicenow.com/docs/access?context=explicit-roles&version=australia&pubname=australia-platform-security&ft:locale=en-US) for requirements of the snc_external role.
{#atf-impersonate__jn4_pvy_rw}
{#atf-impersonate__nn4_pvy_rw__entry__2}{#atf-impersonate__atf-exec-order}{#atf-impersonate__atf-active}{#atf-impersonate__atf-application-scope}{#atf-impersonate__atf-test}{#atf-impersonate__atf-user}

| Field | Description |
|-|-|
| Execution order | Integer specifying the order in which the test executes this step. As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the Execution order values. |
| Active | Option to activate this test step for use. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| User | The user ID for the test to impersonate. |
[Table 3. Inputs]

{#atf-impersonate__nn4_pvy_rw} {#atf-impersonate__d5b_d2p_tw__entry__2}

| Field | Description |
|-|-|
| user | The user ID of the user impersonated. |
[Table 4. Outputs]

{#atf-impersonate__d5b_d2p_tw}

## Search for a Catalog Item {#ariaid-title4}

Searches for a catalog item or record producer in the specified catalog and category.
You can perform this step both in Platform and Service Portal.
{#atf-servc-cat-search-cat-item-rec-prd__table_amy_rx2_xz__entry__2}{#atf-servc-cat-search-cat-item-rec-prd__atf-exec-order}{#atf-servc-cat-search-cat-item-rec-prd__atf-active}{#atf-servc-cat-search-cat-item-rec-prd__atf-application-scope}{#atf-servc-cat-search-cat-item-rec-prd__atf-test}{#atf-servc-cat-search-cat-item-rec-prd__atf-step-config}{#atf-servc-cat-search-cat-item-rec-prd__atf-description}{#atf-servc-cat-search-cat-item-rec-prd__atf-notes}{#atf-servc-cat-search-cat-item-rec-prd__atf-search-portal-only}{#atf-servc-cat-search-cat-item-rec-prd__atf-search-term}{#atf-servc-cat-search-cat-item-rec-prd__atf-catalog}{#atf-servc-cat-search-cat-item-rec-prd__atf-category}{#atf-servc-cat-search-cat-item-rec-prd__atf-server-assert-item}{#atf-servc-cat-search-cat-item-rec-prd__atf-server-assert-type}

| Field | Description |
|-|-|
| Execution order | Integer specifying the order in which the test executes this step. As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the Execution order values. |
| Active | Option to activate this test step for use. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. |
| Search in Portal only | Selected if the search is restricted to the Service Portal only. Otherwise, not selected. |
| Search term | Term used to search for a catalog item. |
| Catalog | Catalog in which to search for the catalog item. |
| Category | Category in which to search for the catalog item. |
| Assert item | Catalog items that should be available in the search results. |
| Assert Type | Specifies how searching the catalog item affects the test: * Assert Item present in search result: Test passes only if the assert item is present in the search result. * Assert Item not present in search result: Test passes only if the assert item is not present in the search result. |
[Table 5. Inputs]

{#atf-servc-cat-search-cat-item-rec-prd__table_amy_rx2_xz} {#atf-servc-cat-search-cat-item-rec-prd__d5b_d2p_tw__entry__2}

| Field | Description |
|-|-|
| catalog_item_id | The sys_id of the first catalog item found that the user can view. |
[Table 6. Outputs]

{#atf-servc-cat-search-cat-item-rec-prd__d5b_d2p_tw}

## Record Query {#ariaid-title5}

Query the database to verify that a record exists matching the conditions set in this step.{#atf-record-query__vfr_xw1_sw}
{#atf-record-query__entry__2}{#atf-record-query__atf-exec-order}{#atf-record-query__atf-active}{#atf-record-query__atf-timeout}{#atf-record-query__atf-application-scope}{#atf-record-query__atf-test}{#atf-record-query__atf-step-config}{#atf-record-query__atf-description}{#atf-record-query__atf-record-query-enforce-security}{#atf-record-query__atf-notes-condition-builder}{#atf-record-query__atf-record-query-assert-type}{#atf-record-query__atf-server-table}{#atf-record-query__atf-server-conditions}

| Field | Description |
|-|-|
| Execution order | Integer specifying the order in which the test executes this step. As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the Execution order values. |
| Active | Option to activate this test step for use. |
| Timeout | Number of seconds allowed before the step fails. If the validation fails, the system repeats the step until it reaches the duration of the timeout. If the validation fails after the timeout duration has passed, the step fails. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Enforce security | Selected to enforce ACLs. Otherwise, not selected. |
| Notes | Notes about the test step. Note: Use the condition builder to set the field value. The condition builder displays an appropriate control for the field data type. For example, a reference field displays a Lookup record control. |
| Assert type | Specifies how querying the record affects the test: * There is at least one record matching the query: The test fails if there are no records matching the query. * No records match the query: The test fails if any records match the query. |
| Table | The table to be queried. |
| Conditions | Conditions used to run the query. |
[Table 7. Inputs]

{#atf-record-query__entry__28}

| Field | Description |
|-|-|
| table | The table queried. |
| first_record | The first record resulting from the query. |
[Table 8. Outputs]

Note:  
If you don't update your record query test step, the original record query test step still functions the same way as before, irrespective of it being termed as (Deprecated).

## Record Insert {#ariaid-title6}

Inserts a record into a table with the field values you specify.{#atf-insert-record__zxr_r51_sw}
{#atf-insert-record__entry__2}{#atf-insert-record__atf-exec-order}{#atf-insert-record__atf-active}{#atf-insert-record__atf-application-scope}{#atf-insert-record__atf-test}{#atf-insert-record__atf-step-config}{#atf-insert-record__atf-description}{#atf-insert-record__atf-notes-condition-builder}{#atf-insert-record__atf-record-insert-assert-type}{#atf-insert-record__atf-record-insert-enforce-security-q}{#atf-insert-record__atf-record-insert-table}{#atf-insert-record__atf-record-insert-conditions}

| Field | Description |
|-|-|
| Execution order | Integer specifying the order in which the test executes this step. As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the Execution order values. |
| Active | Option to activate this test step for use. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. Note: Use the condition builder to set the field value. The condition builder displays an appropriate control for the field data type. For example, a reference field displays a Lookup record control. |
| Assert type | Specifies how inserting the record affects the test: * Record successfully inserted: Test fails if the record was not successfully inserted. * Record was not inserted: Test fails if the record was successfully inserted. |
| Enforce security | Selected to enforce ACLs and the read-only role. Otherwise, not selected. |
| Table | The table into which the record should be inserted. |
| Conditions | Specific field values to be set when the test runs this step. |
[Table 9. Inputs]

{#atf-insert-record__d5b_d2p_tw__entry__2}

| Field | Description |
|-|-|
| table | The table to which the new record belongs. |
| record_id | The sys_id of the new record. |
[Table 10. Outputs]

{#atf-insert-record__d5b_d2p_tw}

## Record Update {#ariaid-title7}

Changes field values on a record on the server.{#atf-record-update__rzq_fv1_sw}
Note:  
To ensure that the changes were applied, follow this step with a Record Validation step.
{#atf-record-update__entry__2}{#atf-record-update__atf-exec-order}{#atf-record-update__atf-active}{#atf-record-update__atf-application-scope}{#atf-record-update__atf-test}{#atf-record-update__atf-step-config}{#atf-record-update__atf-description}{#atf-record-update__atf-notes-condition-builder}{#atf-record-update__atf-record-update-assert-type}{#atf-record-update__atf-record-insert-enforce-security-q}{#atf-record-update__atf-record-update-table}{#atf-record-update__atf-record-update-record}

| Field | Description |
|-|-|
| Execution order | Integer specifying the order in which the test executes this step. As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the Execution order values. |
| Active | Option to activate this test step for use. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. Note: Use the condition builder to set the field value. The condition builder displays an appropriate control for the field data type. For example, a reference field displays a Lookup record control. |
| Assert type | Specifies how updating the record affects the test: * Record successfully updated: Test fails if the record was not successfully updated. * Record was not updated: Test fails if the record was successfully updated. {#atf-record-update__ul_mtm_jqw_qfb} |
| Enforce security | Selected to enforce ACLs and the read-only role. Otherwise, not selected. |
| Table | The table containing the record to be updated. |
| Record | ID of the record to be updated. |
| Field values | Fields for which you want to set values and the values you want to set for those fields. Note: Use the condition builder to set the field value. The condition builder displays an appropriate control for the field data type. For example, a reference field displays a Lookup record control. |
[Table 11. Inputs]

Note:  
Record Update step succeeds even if a field on the record is blocked by ACL. Use the [Record Validation](https://www.servicenow.com/docs/d0ow308fMuNX2IilOI_W~A#atf-record-valid "Validates that a record meets the specified conditions on the server side.") step after Record Update to check whether a particular field was modified, or use the [Form steps](https://www.servicenow.com/docs/7JHvPFhAaqRFTOqpT_zJbw#test-steps-form-category "Validate the functionality of fields and UI actions on a form.") to evaluate ACL conditions for individual fields on a record.

## Record Delete {#ariaid-title8}

Deletes a specified record in a table.{#atf-record-delete__b5y_vv1_sw}
{#atf-record-delete__entry__2}{#atf-record-delete__atf-exec-order}{#atf-record-delete__atf-active}{#atf-record-delete__atf-application-scope}{#atf-record-delete__atf-test}{#atf-record-delete__atf-step-config}{#atf-record-delete__atf-description}{#atf-record-delete__atf-notes}{#atf-record-delete__atf-record-delete-assert-type}{#atf-record-delete__atf-record-insert-enforce-security-q}{#atf-record-delete__atf-record-delete-table}{#atf-record-delete__atf-record-delete-record}

| Field | Description |
|-|-|
| Execution order | Integer specifying the order in which the test executes this step. As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the Execution order values. |
| Active | Option to activate this test step for use. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. |
| Assert type | Specifies how updating the record affects the test: * Record successfully deleted: Test fails if the record was not successfully deleted. * Record was not deleted: Test fails if the record was successfully deleted. |
| Enforce security | Selected to enforce ACLs and the read-only role. Otherwise, not selected. |
| Table | The table containing the record to be deleted. |
| Record | ID of the record to be deleted. |
[Table 12. Inputs]

## Record Validation {#ariaid-title9}

Validates that a record meets the specified conditions on the server side.{#atf-record-valid__ydb_dy1_sw}
For the Record Validation step, specify the values you want to test using the standard conditions builder. You can apply several conditions to the same field.{#atf-record-valid__atr_cy1_sw}

This step passes if the overall condition is satisfied and fails if it is not. If you need to test the values of individual fields independently of each other, include a separate Record Validation step for each value to be tested.{#atf-record-valid__hjz_gsp_tw}
{#atf-record-valid__dt4_kjz_rw__entry__2}{#atf-record-valid__atf-exec-order}{#atf-record-valid__atf-active}{#atf-record-valid__atf-timeout}{#atf-record-valid__atf-application-scope}{#atf-record-valid__atf-test}{#atf-record-valid__atf-step-config}{#atf-record-valid__atf-description}{#atf-record-valid__atf-notes-condition-builder}{#atf-record-valid__atf-record-valid-assert-type}{#atf-record-valid__atf-record-valid-table}{#atf-record-valid__atf-record-valid-record}{#atf-record-valid__atf-record-valid-field-values}

| Field | Description |
|-|-|
| Execution order | Integer specifying the order in which the test executes this step. As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the Execution order values. |
| Active | Option to activate this test step for use. |
| Timeout | Number of seconds allowed before the step fails. If the validation fails, the system repeats the step until it reaches the duration of the timeout. If the validation fails after the timeout duration has passed, the step fails. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. Note: Use the condition builder to set the field value. The condition builder displays an appropriate control for the field data type. For example, a reference field displays a Lookup record control. |
| Assert type | Specifies how validating the record affects the test: * Record successfully validated: The test fails if the record does not match the conditions. * Record not found: Test fails if the record is found. |
| Table | The table that contains the field to be validated. |
| Record | The record that contains the field to be validated. |
| Field values | Specific fields to be validated when the test runs this step. |
[Table 13. Inputs]

{#atf-record-valid__dt4_kjz_rw}

## Run Server Side Script {#ariaid-title10}

Executes a script on the server.{#atf-script__rs4_rnz_rw}
{#atf-script__entry__2}{#atf-script__atf-exec-order}{#atf-script__atf-active}{#atf-script__atf-application-scope}{#atf-script__atf-test}{#atf-script__atf-step-config}{#atf-script__atf-description}{#atf-script__atf-notes}{#atf-script__atf-jasmine-version}{#atf-script__atf-test-script-new}

| Field | Description |
|-|-|
| Execution order | Integer specifying the order in which the test executes this step. As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the Execution order values. |
| Active | Option to activate this test step for use. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. |
| Jasmine version | The version of the Jasmine testing framework to use for running the server-side script. Any new scripts you create use Jasmine version 3.1. Your existing scripts can continue to use Jasmine version 1.3, or you can upgrade them to Jasmine version 3.1. |
| Test script | The javascript for the server to execute. Supports the Jasmine testing framework. Note: steps(SYS_ID) can be defined as a function to retrieve Output variable data from a step that executed earlier in the test. The Run Server Side Script test step now supports parameters as step inputs. |
[Table 14. Inputs]

{#atf-script__d5b_d2p_tw__entry__2}

| Field | Description |
|-|-|
| record_id | The sys_id output by the server-side script. |
| table | The table output by the server-side script. |
[Table 15. Outputs]

{#atf-script__d5b_d2p_tw}  
Note:  
If the script creates data, the system rolls back that data after all steps in the test finish. The output for the Run Server Side Script test step now indicates the line and the line number for the cause of failure.  
* Test script

      //  Test step 1 - add data
      var now_GR = new GlideRecord('sc_task');
      //  this sample step's Step config has Output variables named table and record_id
      outputs.table = 'sc_task';
      outputs.record_id = gr.insert();
      //  Test step 2 - access added data and validate
      //  check that the record exists (or that business logic changed it)
      var now_GR = new GlideRecord("sc_task");
      gr.get(steps(PREVIOUS_STEP_SYS_ID).record_id);
      assertEqual({name: "task gr exists", shouldbe: true, value: gr.isValidRecord()});
      stepResult.setOutputMessage: Log a message to step results after step executes.
                                   Can only be called once or will overwrite previous message

* Create a suite of test scripts

      var now_GR = new GlideRecord('sc_task');
      gr.setValue('short_description', 'verify task can be inserted');
      var grSysId = gr.insert();
      var justCreatedGR = new GlideRecord('sc_task');
      if (justCreatedGR.get(grSysId)) {
      stepResult.setOutputMessage("Successfully inserted task record");
      return true; // pass the step
      } else { 
      stepResult.setOutputMessage("Failed to insert task record");
      return false; // fail the step
      }

* Jasmine test

      describe('my suite of script tests', function() {
      it('should meet expectations', function() {
      expect(true).not.toBe(false);
      });
      });
      //  make sure to uncomment jasmine.getEnv().execute(); outside the function body
      assertEqual: A function used to compare that assertion.shouldbe == assertion.value;
      in case of failure it throws an Error and logs that the assertion by name has failed

  Note:  
  `describe` is only supported in Global scope. Use `describe` to create a suite of test scripts and `it` to define test expectations.
* Logs message to test step output

      var testAssertion = {
      name: "my test assertion",
      shouldbe: "expected value"
      value: "actual value",
      };
      assertEqual(testAssertion); // throws Error, logs message to test step output

* See [Step Execution Scripts](https://www.servicenow.com/docs/JjpT9w0fOUaw8RKt2decxQ "In a step configuration record, the step execution script field determines what a step with this configuration does when it runs.") for Run Server Side script example.
{#atf-script__ul_wmz_2wv_ylb}

## Replay Request Item {#ariaid-title11}

Get the item and requester from an existing request item, add the item to a new cart for that user, and place an order.{#atf-replay-request__ndf_vy1_sw}
{#atf-replay-request__entry__2}{#atf-replay-request__atf-exec-order}{#atf-replay-request__atf-active}{#atf-replay-request__atf-application-scope}{#atf-replay-request__atf-test}{#atf-replay-request__atf-step-config}{#atf-replay-request__atf-description}{#atf-replay-request__atf-notes}{#atf-replay-request__atf-original-request-item}

| Field | Description |
|-|-|
| Execution order | Integer specifying the order in which the test executes this step. As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the Execution order values. |
| Active | Option to activate this test step for use. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. |
| Original Request Item | The request item to be replayed. |
[Table 16. Inputs]

{#atf-replay-request__d5b_d2p_tw__entry__2}

| Field | Description |
|-|-|
| table | The table to which the replayed request item belongs. |
| request | The replayed request item. |
[Table 17. Outputs]

{#atf-replay-request__d5b_d2p_tw}
**Related tasks**   

* [Automated Test Framework use case: test a Service Catalog request](https://www.servicenow.com/docs/VvWWppak7tHnzAvfs88BzQ "This use case illustrates testing a service catalog request with the Automated Test Framework.")

## Log {#ariaid-title12}

Logs a message and stores it as a step result.{#atf-step-log__zxr_r51_sw}
The log message can contain variables and other information pertaining to the test. The
message is stored as a step result.  
{#atf-step-log__table_ek1_y42_kfb__entry__2}{#atf-step-log__atf-exec-order}{#atf-step-log__atf-active}{#atf-step-log__atf-application-scope}{#atf-step-log__atf-test}{#atf-step-log__atf-step-config}{#atf-step-log__atf-description}{#atf-step-log__atf-notes}{#atf-step-log__ol3_xpg_xw}

| Field | Description |
|-|-|
| Execution order | Integer specifying the order in which the test executes this step. As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the Execution order values. |
| Active | Option to activate this test step for use. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. |
| Log | The message to be logged. To include the value of an output variable from a previous step, click the input value icon (![Input value icon]()) and follow the procedure to [Pass values from one automated test step to another](https://www.servicenow.com/docs/su7DkmaiXfjdGpwC2Wcyeg "Assign a form field the value of an output variable returned from a previous step."). |
[Table 18. Inputs]

{#atf-step-log__table_ek1_y42_kfb}

## Add Attachments to Existing Record {#ariaid-title13}

Add one or more mandatory attachments to the specified record. Use Upload Attachments to select from the attachments the test step adds to the
record.
{#atf-add-attachments-existing-record__table_upr_ww4_nhb__entry__2}

| Field | Description |
|-|-|
| Execution order | Integer specifying the order in which the test executes this step. As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them. You can change this default order by editing the Execution order values. |
| Application | Application scope in which the system runs this step. |
| Active | Option to activate this test step for use. |
| Test | Name of the test that you're adding the step to. |
| Step config | Name of the step. |
| Notes | Notes about the test step. |
| Table | Valid table selection from the list. |
| Record | Pre-existing record either from before the test or inserted as a part of the test. |
| Upload Attachments | Button to add one or more mandatory attachments to the record. |
[Table 19. Inputs]

{#atf-add-attachments-existing-record__table_upr_ww4_nhb}

## Checkout Shopping Cart {#ariaid-title14}

Submits the cart and generates a request. You can perform this step both in the ServiceNow AI Platform and Service Portal.
{#atf-checkout-shopping-cart__table_p3s_mnw_tcb__entry__2}{#atf-checkout-shopping-cart__atf-exec-order}{#atf-checkout-shopping-cart__atf-active}{#atf-checkout-shopping-cart__atf-timeout}{#atf-checkout-shopping-cart__atf-application-scope}{#atf-checkout-shopping-cart__atf-test}{#atf-checkout-shopping-cart__atf-step-config}{#atf-checkout-shopping-cart__atf-description}{#atf-checkout-shopping-cart__atf-notes}{#atf-checkout-shopping-cart__atf-checkout-assert-type}{#atf-checkout-shopping-cart__atf-requested-for}{#atf-checkout-shopping-cart__atf-delivery-address}{#atf-checkout-shopping-cart__atf-special-instructions}

| Field | Description |
|-|-|
| Execution order | Integer specifying the order in which the test executes this step. As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the Execution order values. |
| Active | Option to activate this test step for use. |
| Timeout | Number of seconds allowed before the step fails. If the validation fails, the system repeats the step until it reaches the duration of the timeout. If the validation fails after the timeout duration has passed, the step fails. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. |
| Assert Type | Criteria for the test to pass. Empty cart :   Test fails if the cart is not empty. Successfully Checkout cart :   Test fails if the cart is not successfully checked out. |
| Requested For | User for whom the request is generated. |
| Delivery Address | Delivery address for the request. |
| Special Instructions | Special instructions for the request. |
[Table 20. Inputs]

{#atf-checkout-shopping-cart__table_p3s_mnw_tcb} {#atf-checkout-shopping-cart__d5b_d2p_tw__entry__2}

| Field | Description |
|-|-|
| request_id | The sys_id of the submitted request. |
[Table 21. Outputs]

{#atf-checkout-shopping-cart__d5b_d2p_tw}

## Custom Scripted StepConfig {#ariaid-title15}

Provides an example of scripts for a custom step configuration.{#atf-custom-scripted-xmpl__zxr_r51_sw}
This example checks if the user name provided starts with the letter A. This
step is useful primarily to users with the \[atf_test_admin\] role. Users with the
\[atf_test_admin\] role can view the example scripts by opening the record for this step in
[Step configurations](https://www.servicenow.com/docs/SrZ5QAIv13bIBiFfC3BVBQ "Step configuration records define how each type of step behaves.").  
{#atf-custom-scripted-xmpl__table_dd3_bp2_kfb__entry__2}{#atf-custom-scripted-xmpl__atf-exec-order}{#atf-custom-scripted-xmpl__atf-active}{#atf-custom-scripted-xmpl__atf-application-scope}{#atf-custom-scripted-xmpl__atf-test}{#atf-custom-scripted-xmpl__atf-step-config}{#atf-custom-scripted-xmpl__atf-description}{#atf-custom-scripted-xmpl__atf-notes}{#atf-custom-scripted-xmpl__atf-custom-script-user}

| Field | Description |
|-|-|
| Execution order | Integer specifying the order in which the test executes this step. As you create steps, the system automatically assigns each step an incremental value. This value causes the test to execute steps in the order that you created them in. You can change this default order by editing the Execution order values. |
| Active | Option to activate this test step for use. |
| Application | Application scope in which the system runs this step. |
| Test | Read-only name of the test that you're adding the step to. |
| Step config | Read-only name of the step. |
| Description | Description of the test step. This field value is automatically set based on the field values of the test step. This field appears after the test step is submitted. |
| Notes | Notes about the test step. |
| User | The user whose name the system checks to see if it starts with the letter A. To include the value of an output variable from a previous step, click the input value icon (![Input value icon]()) and follow the procedure to [Pass values from one automated test step to another](https://www.servicenow.com/docs/su7DkmaiXfjdGpwC2Wcyeg "Assign a form field the value of an output variable returned from a previous step."). |
[Table 22. Inputs]

{#atf-custom-scripted-xmpl__table_dd3_bp2_kfb} {#atf-custom-scripted-xmpl__d5b_d2p_tw__entry__2}

| Field | Description |
|-|-|
| value | The name of the user. |
[Table 23. Outputs]

{#atf-custom-scripted-xmpl__d5b_d2p_tw}
**Related concepts**   

* [Step execution scripts](https://www.servicenow.com/docs/JjpT9w0fOUaw8RKt2decxQ "In a step configuration record, the step execution script field determines what a step with this configuration does when it runs.")
* [Step description generation script](https://www.servicenow.com/docs/FyoWryQdQfW5l73uSsEU3w "In a step configuration record, the step description generation script field determines the step description that the system generates when a step of this type is added to a test.")  
**Related tasks**   

* [Create custom step configuration](https://www.servicenow.com/docs/ei3NX59QlbXDJlP5cCO7Ow "Create a custom step configuration that can form the basis of new steps that run on the server.")

