Product documentation Docs
    • English
    • Deutsch
    • 日本語
    • 한국어
    • Français
  • More Sites
    • Now Community
    • Developer Site
    • Knowledge Base
    • Product Information
    • ServiceNow.com
    • Training
    • Customer Success Center
    • ServiceNow Support Videos
  • Log in

Product documentation

  • Home
How search works:
  • Punctuation and capital letters are ignored
  • Special characters like underscores (_) are removed
  • Known synonyms are applied
  • The most relevant topics (based on weighting and matching to search terms) are listed first in search results
Topics are ranked in search results by how closely they match your search terms
  • A match on the entire phrase you typed
  • A match on part of the phrase you typed
  • A match on ALL of the terms in the phrase you typed
  • A match on ANY of the terms in the phrase you typed

Note: Matches in titles are always highly ranked.

  • Release version
    Table of Contents
    • Now Platform App Engine
Table of Contents
Choose your release version
    Home Madrid Now Platform App Engine Now Platform App Engine Application tools Automated Test Framework Test step categories Server category

    Server category

    • Save as PDF Selected topic Topic & subtopics All topics in contents
    • Unsubscribe Log in to subscribe to topics and get notified when content changes.
    • Share this page

    Server category

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

    Impersonate

    Impersonate the specified user for the test.

    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.
    • 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.
    • When exporting and importing automated tests, keep in mind that update sets do not update the user field.
    • Tests can impersonate users with the snc_external role, which allows testing users who do not have login access. See Explicit Roles for requirements of the snc_external role.
    Table 1. Inputs
    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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

    Active Check box 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 are adding the step to.
    User The user ID for the test to impersonate.
    Table 2. Outputs
    Field Description
    user The user ID of the user impersonated.

    Search for a Catalog Item

    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.

    Table 3. Inputs
    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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

    Active Check box 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 are adding the step to.
    Step config Read-only name of the step.
    Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
    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.
    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.

    Record Query

    Query the database to verify that a record exists matching the conditions set in this step.

    Table 4. Inputs
    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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

    Active Check box 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 the duration of the Timeout is reached. 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 are adding the step to.
    Step config Read-only name of the step.
    Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
    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: Test fails if there are no records matching the query.
    • No records match the query: Test fails if any records match the query.
    Table The table to be queried.
    Conditions Conditions used to run the query.
    Table 5. Outputs
    Field Description
    tableThe table queried.
    first_record The first record resulting from the query.

    Record Insert

    Inserts a record into a table with the field values you specify.

    Table 6. Inputs
    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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

    Active Check box 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 are adding the step to.
    Step config Read-only name of the step.
    Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
    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. 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 7. Outputs
    Field Description
    table The table to which the new record belongs.
    record_id The sys_id of the new record.

    Record Update

    Changes field values on a record on the server.

    Note: To ensure that the changes were applied, follow this step with a Record Validation step.
    Table 8. Inputs
    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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

    Active Check box 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 are adding the step to.
    Step config Read-only name of the step.
    Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
    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.
    Enforce security Selected to enforce ACLs. 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.

    Record Delete

    Deletes a specified record in a table.

    Table 9. Inputs
    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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

    Active Check box 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 are adding the step to.
    Step config Read-only name of the step.
    Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
    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 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. Otherwise, not selected.
    Table The table containing the record to be deleted.
    Record ID of the record to be deleted.

    Record Validation

    Validates that a record meets the specified conditions on the server side.

    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.

    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.

    Table 10. Inputs
    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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

    Active Check box 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 the duration of the Timeout is reached. 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 are adding the step to.
    Step config Read-only name of the step.
    Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
    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.

    Run Server Side Script

    Executes a script on the server.

    Table 11. Inputs
    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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

    Active Check box 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 are adding the step to.
    Step config Read-only name of the step.
    Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
    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.
    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: If the script creates data, the system rolls back that data after all steps in the test finish.

    Replay Request Item

    Get the item and requester from an existing request item, add the item to a new cart for that user, and place an order.

    Table 12. Inputs
    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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

    Active Check box 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 are adding the step to.
    Step config Read-only name of the step.
    Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
    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.
    Original Request Item The request item to be replayed.
    Table 13. Outputs
    Field Description
    table The table to which the replayed request item belongs.
    request The replayed request item.
    Related tasks
    • Automated Test Framework use case: test a Service Catalog request

    Log

    Logs a message and stores it as a step result.

    The log message can contain variables and other information pertaining to the test. The message is stored as a step result.

    Table 14. Inputs
    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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

    Active Check box 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 are adding the step to.
    Step config Read-only name of the step.
    Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
    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.
    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.

    Checkout Shopping Cart

    Submits the cart and generates a request. You can perform this step both in the Platform and Service Portal.

    Table 15. Inputs
    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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

    Active Check box 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 the duration of the Timeout is reached. 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 are adding the step to.
    Step config Read-only name of the step.
    Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
    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 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.

    Custom Scripted StepConfig

    Provides an example of scripts for a custom step configuration.

    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.

    Table 16. Inputs
    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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

    Active Check box 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 are adding the step to.
    Step config Read-only name of the step.
    Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
    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.
    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.
    Related tasks
    • Create custom step configuration
    Related concepts
    • Step execution scripts
    • Step description generation script

    Tags:

    Feedback
    On this page

    Previous topic

    Next topic

    • Contact Us
    • Careers
    • Terms of Use
    • Privacy Statement
    • Sitemap
    • © ServiceNow. All rights reserved.

    Release version
    Choose your release version

      Server category

      • Save as PDF Selected topic Topic & subtopics All topics in contents
      • Unsubscribe Log in to subscribe to topics and get notified when content changes.
      • Share this page

      Server category

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

      Impersonate

      Impersonate the specified user for the test.

      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.
      • 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.
      • When exporting and importing automated tests, keep in mind that update sets do not update the user field.
      • Tests can impersonate users with the snc_external role, which allows testing users who do not have login access. See Explicit Roles for requirements of the snc_external role.
      Table 1. Inputs
      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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

      Active Check box 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 are adding the step to.
      User The user ID for the test to impersonate.
      Table 2. Outputs
      Field Description
      user The user ID of the user impersonated.

      Search for a Catalog Item

      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.

      Table 3. Inputs
      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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

      Active Check box 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 are adding the step to.
      Step config Read-only name of the step.
      Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
      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.
      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.

      Record Query

      Query the database to verify that a record exists matching the conditions set in this step.

      Table 4. Inputs
      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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

      Active Check box 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 the duration of the Timeout is reached. 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 are adding the step to.
      Step config Read-only name of the step.
      Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
      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: Test fails if there are no records matching the query.
      • No records match the query: Test fails if any records match the query.
      Table The table to be queried.
      Conditions Conditions used to run the query.
      Table 5. Outputs
      Field Description
      tableThe table queried.
      first_record The first record resulting from the query.

      Record Insert

      Inserts a record into a table with the field values you specify.

      Table 6. Inputs
      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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

      Active Check box 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 are adding the step to.
      Step config Read-only name of the step.
      Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
      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. 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 7. Outputs
      Field Description
      table The table to which the new record belongs.
      record_id The sys_id of the new record.

      Record Update

      Changes field values on a record on the server.

      Note: To ensure that the changes were applied, follow this step with a Record Validation step.
      Table 8. Inputs
      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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

      Active Check box 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 are adding the step to.
      Step config Read-only name of the step.
      Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
      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.
      Enforce security Selected to enforce ACLs. 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.

      Record Delete

      Deletes a specified record in a table.

      Table 9. Inputs
      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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

      Active Check box 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 are adding the step to.
      Step config Read-only name of the step.
      Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
      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 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. Otherwise, not selected.
      Table The table containing the record to be deleted.
      Record ID of the record to be deleted.

      Record Validation

      Validates that a record meets the specified conditions on the server side.

      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.

      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.

      Table 10. Inputs
      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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

      Active Check box 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 the duration of the Timeout is reached. 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 are adding the step to.
      Step config Read-only name of the step.
      Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
      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.

      Run Server Side Script

      Executes a script on the server.

      Table 11. Inputs
      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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

      Active Check box 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 are adding the step to.
      Step config Read-only name of the step.
      Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
      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.
      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: If the script creates data, the system rolls back that data after all steps in the test finish.

      Replay Request Item

      Get the item and requester from an existing request item, add the item to a new cart for that user, and place an order.

      Table 12. Inputs
      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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

      Active Check box 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 are adding the step to.
      Step config Read-only name of the step.
      Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
      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.
      Original Request Item The request item to be replayed.
      Table 13. Outputs
      Field Description
      table The table to which the replayed request item belongs.
      request The replayed request item.
      Related tasks
      • Automated Test Framework use case: test a Service Catalog request

      Log

      Logs a message and stores it as a step result.

      The log message can contain variables and other information pertaining to the test. The message is stored as a step result.

      Table 14. Inputs
      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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

      Active Check box 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 are adding the step to.
      Step config Read-only name of the step.
      Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
      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.
      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.

      Checkout Shopping Cart

      Submits the cart and generates a request. You can perform this step both in the Platform and Service Portal.

      Table 15. Inputs
      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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

      Active Check box 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 the duration of the Timeout is reached. 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 are adding the step to.
      Step config Read-only name of the step.
      Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
      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 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.

      Custom Scripted StepConfig

      Provides an example of scripts for a custom step configuration.

      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.

      Table 16. Inputs
      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. It causes the test to execute steps in the order in which you created them. You can change this default order by editing the Execution Order values.

      Active Check box 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 are adding the step to.
      Step config Read-only name of the step.
      Description (Appears after the test step is submitted) Description of the test step. This field value is automatically set based on the field values of the test step.
      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.
      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.
      Related tasks
      • Create custom step configuration
      Related concepts
      • Step execution scripts
      • Step description generation script

      Tags:

      Feedback

          Share this page

          Got it! Feel free to add a comment
          To share your product suggestions, visit the Idea Portal.
          Please let us know how to improve this content

          Check any that apply

          To share your product suggestions, visit the Idea Portal.
          Confirm

          We were unable to find "Coaching" in Jakarta. Would you like to search instead?

          No Yes
          • Contact Us
          • Careers
          • Terms of Use
          • Privacy Statement
          • Sitemap
          • © ServiceNow. All rights reserved.

          Subscribe Subscribed Unsubscribe Last updated: Tags: January February March April May June July August September October November December No Results Found Versions Search preferences successfully updated My release version successfully updated My release version successfully deleted An error has occurred. Please try again later. You have been unsubscribed from all topics. You are now subscribed to and will receive notifications if any changes are made to this page. You have been unsubscribed from this content Thank you for your feedback. Form temporarily unavailable. Please try again or contact  docfeedback@servicenow.com  to submit your comments. The topic you requested does not exist in the release. You were redirected to a related topic instead. The available release versions for this topic are listed There is no specific version for this documentation. Explore products Click to go to the page. Release notes and upgrades Click to open the dropdown menu. Delete Remove No selected version Reset This field is required You are already subscribed to this topic Attach screenshot The file you uploaded exceeds the allowed file size of 20MB. Please try again with a smaller file. Please complete the reCAPTCHA step to attach a screenshot
          Log in to personalize your search results and subscribe to topics
          No, thanks Login