Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • Madrid
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Automated Service Catalog in Service Portal test steps

Log in to subscribe to topics and get notified when content changes.

Automated Service Catalog in Service Portal test steps

If you have the catalog_administrator role, you can validate single catalog item transactions and requester flows from Service Portal.

ATF for Service Catalog in Service Portal is not supported for order guides and multiple items in the cart. For more information about ATF, see Automated Test Framework.

Activation of the Automated Test Framework for Service Catalog in Service Portal

The Automated Test Framework Service Catalog Service Portal (com.glide.automated_testing_impl.service_catalog_portal) plugin, which is active by default, is required to support ATF for Service Catalog in Service Portal.

Open a Catalog Item (SP) test step

Opens a catalog item in Service Portal.

Table 1. Inputs
Field Description
Execution order Integer specifying the order in which this step executes within the series of steps.

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.
Portal Portal for which you want to test this step.
Page Service Catalog page associated with the test step.
Catalog item Catalog item that you want to open.
Note: You should have access to this catalog item.
Query parameters URL query parameters for the page, such as sys_id.

Open a Record Producer (SP) test step

Opens a record producer in Service Portal.

Table 2. Inputs
Field Description
Execution Order Integer specifying the order in which this step executes within the series of steps.

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.
Portal Portal for which you want to test this step.
Page Service Catalog page associated with the test step.
Record Producer Record producer that you want to open.
Note: You should have access to the record producer.
Query parameters URL query parameters for the page, such as sys_id.

Set Variable Values (SP) test step

Sets variable values for a catalog item or record producer in Service Portal. For a catalog item, use this step after using the Open a Catalog Item (SP) step, and before using the Order Catalog Item (SP) step. For a record producer, use this step after using the Open a Record Producer (SP) step, and before using the Submit Record Producer (SP) step.

Table 3. Inputs
Field Description
Execution Order Integer specifying the order in which this step executes within the series of steps.

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.
Item The current catalog item or record producer that you want to set variable values for.
Variable Values List of variables and the values that you want to set for them.
Note: You can set the value for multiple variables.

Set Catalog Item Quantity (SP) test step

Sets the quantity for a catalog item in Service Portal. This step is not applicable for a record producer. Use this step after using the Open a Catalog Item (SP) step, and before using the Order Catalog Item (SP) step.

Table 4. Inputs
Field Description
Execution Order Integer specifying the order in which this step executes within the series of steps.

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.
Quantity Quantity of the catalog item that you want to order.

Validate Variable Values (SP) test step

Validates variable values of a catalog item or record producer in Service Portal. For a catalog item, use this step after using the Open a Catalog Item (SP) step, and before using the Order Catalog Item (SP) step. For a record producer, use this step after using the Open a Record Producer (SP) step, and before using the Submit Record Producer (SP) step.

Table 5. Inputs
Field Description
Execution Order An integer specifying the order in which this step executes.

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 When a timeout is specified, the Client Test Runner checks the validation conditions every second until the timeout has been reached or the conditions are met. The step fails when the test runner reaches the timeout, or a validation is incorrect.
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.
Item Current catalog item or record producer.
Catalog Conditions Conditions for variable validation. If the conditions are met, the test passes.
Note: The label of a variable associated with a variable set reflects the variable set name. The format is variable_set_name » variable_name.

Variable State Validation (SP) test step

Validates the state of variables in Service Portal. Possible variable states are mandatory, not mandatory, read only, not read only, visible, and not visible.

Table 6. Inputs
Field Description
Execution Order Integer specifying the order in which this step executes within the series of steps.

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 When a timeout is specified, the Client Test Runner checks the validation conditions every second until the timeout has been reached or the conditions are met. The step fails when the test runner reaches the timeout, or a validation is incorrect.
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.
Catalog item Catalog item for which you want to validate variable states.
Visible List of the catalog item variables that must be visible for the step to pass.
Not visible List of the catalog item variables that must be hidden for the step to pass.
Read only List of the catalog item variables that must be read-only for the step to pass.
Not read only List of the catalog item variables that must not be read-only for the step to pass.
Mandatory List of the catalog item variables that must be mandatory for the step to pass.
Not mandatory List of the catalog item variables that must not be mandatory for the step to pass.

Validate Price and Recurring Price (SP) test step

Validates the price and recurring price of a catalog item in Service Portal. Use this step after using the Open a Catalog Item (SP) step, and before using the Order Catalog Item (SP) step. This step is not applicable for a record producer.

Table 7. Inputs
Field Description
Execution Order Integer specifying the order in which this step executes within the series of steps.

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.
Price Price of the catalog item for the step to pass.
Recurring price Recurring price of the catalog item for the test to pass.
Recurring price frequency Recurring price frequency of the catalog item for the test to pass.

Add Item to Shopping Cart (SP) test step

Adds the current catalog item to the shopping cart in Service Portal. Use this step after using the Open a Catalog Item (SP) step.

Table 8. Inputs
Field Description
Execution Order Integer specifying the order in which this step executes within the series of steps.

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.
Assert Type Criteria for the test to pass.
Cannot add item to the shopping cart
Test passes only if the catalog item cannot be added to the shopping cart.
Successfully added item to the shopping cart
Test passes only if the catalog item is successfully added to the shopping cart.

Order Catalog Item (SP) test step

Clicks Order Now for the current catalog item in Service Portal. Use this step after using the Open a Catalog Item (SP) step. After this step, you cannot use any other steps on the catalog item. If the two-step checkout is false, a request is generated for the catalog item. If the two-step checkout is true, you are redirected to the cart preview page.

Table 9. Inputs
Field Description
Execution Order Integer specifying the order in which this step executes within the series of steps.

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.
Assert type Criteria for the test to pass.
Successfully ordered catalog item
Test passes only if the catalog item is successfully ordered.
Cannot order catalog item
Test passes only if the catalog item cannot be ordered.

Submit Record Producer (SP) test step

Submits the current record producer in Service Portal. Use this step after using the Open a Record producer (SP) step. After this step, you cannot use any other steps on the record producer.

Table 10. Inputs
Field Description
Execution Order Integer specifying the order in which this step executes within the series of steps.

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.
Assert type Criteria for the test to pass.
Successfully ordered record producer
Test passes only if record producer is successfully submitted.
Cannot order record producer
Test passes only if record producer cannot be submitted.
Feedback