Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.

Automated Service Catalog tests steps

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

Automated Service Catalog tests steps

If you have the catalog_administrator role, validate single catalog item transactions, as well as requester and fulfiller flows in Service Catalog.

ATF for Service Catalog 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

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

Open a Catalog Item

Opens a catalog item.

Table 1. 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. This 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 If this step is active, true. Otherwise, false.
Application (Read only) The application scope in which the system will run this step.
Test (Read only) The test to which this step belongs.
Step config (Read only) The current test step.
Description (Read only) The system automatically populates this field from the field values you provide.
Catalog item Select the catalog item that you want to open.

Open a Record Producer

Opens a record producer.

Table 2. 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. This 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 If this step is active, true. Otherwise, false.
Application (Read only) The application scope in which the system will run this step.
Test (Read only) The test to which this step belongs.
Step config (Read only) The current test step.
Description (Read only) The system automatically populates this field from the field values you provide.
Record Producer Select the record producer that you want to open.

Set Variable Values

Sets variable values for the current catalog item or the record producer. For a catalog item, use this step after opening a catalog item page using the Open a Catalog Item step, and before using the Order Catalog Item step. For a record producer, use this step after opening a record producer page using the Open a Record Producer step, and before using the Submit Record Producer step.

Table 3. 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 If this step is active, true. Otherwise, false.
Application (Read only) The application scope in which the system will run this step.
Test (Read only) The test to which this step belongs.
Step config (Read only) The current test step.
Description (Read only) The system automatically populates this field from the field values you provide.
Item The current catalog item or record producer.
Variable values Select the required variable to set its value.

Set Catalog Item Quantity

Sets the quantity for the current catalog item.

Table 4. 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 If this step is active, true. Otherwise, false.
Application (Read only) The application scope in which the system will run this step.
Test (Read only) The test to which this step belongs.
Step config (Read only) The current test step.
Description (Read only) The system automatically populates this field from the field values you provide.
Item The current catalog item.
Quantity Quantity of the catalog item.

Validate Variable Values

Validates variable values on the current catalog item or record producer. For a catalog item, use this step after opening a catalog item page using the Open a Catalog Item step, and before using the Order Catalog Item step. For a record producer, use this step after opening a record producer page using the Open a Record Producer step, and before using the Submit Record Producer 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. This 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 If this step is active, true. Otherwise, false.
Timeout When specified, the Client Test Runner checks the validation conditions every second until the timeout value reaches or the conditions are met. If the timeout value is exceeded or one of the validations is not correct, the step fails.
Application (Read only) The application scope in which the system will run this step.
Test (Read only) The test to which this step belongs.
Step config (Read only) The current test step.
Item The current catalog item or record producer.
Description (Read only) The system automatically populates this field from the field values you provide.
Catalog conditions Create conditions for variables. The test passes if the conditions evaluate to true.
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

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

Table 6. 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. This 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 If this step is active, true. Otherwise, false.
Timeout When specified, the Client Test Runner checks the validation conditions every second until the timeout value reaches or the conditions are met. If the timeout value is exceeded or one of the validations is not correct, the step fails.
Application (Read only) The application scope in which the system will run this step.
Test (Read only) The test to which this step belongs.
Step config (Read only) The current test step.
Description (Read only) The system automatically populates this field from the field values you provide.
Catalog item The current catalog item.
Visible To validate if a variable is visible, move it from the Available column to the Selected column.
Not visible To validate if a variable is not visible, move it from the Available column to the Selected column.
Read only To validate if a variable is read only, move it from the Available column to the Selected column.
Not read only To validate if a variable is not read only, move it from the Available column to the Selected column.
Mandatory To validate if a variable is mandatory, move it from the Available column to the Selected column.
Not mandatory To validate if a variable is not mandatory, move it from the Available column to the Selected column.

Validate Price and Recurring Price

Validates price and recurring price of a catalog item. Use this step after opening a catalog item page using the Open a Catalog Item step, and before using the Order Catalog Item step.

Table 7. 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. This 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 If this step is active, true. Otherwise, false.
Application (Read only) The application scope in which the system will run this step.
Test (Read only) The test to which this step belongs.
Step config (Read only) The current test step.
Description (Read only) The system automatically populates this field from the field values you provide.
Catalog item The current catalog item.
Price Enter the price of the catalog item that should be validated.
Recurring price Enter the recurring price of the catalog item that should be validated.
Recurring price frequency Select the recurring price frequency of the catalog item that should be validated.

Add Item to Shopping Cart

Adds a catalog item to the shopping cart. Use this step after opening a catalog item page using the Open a Catalog Item step. After this step, you cannot use any other steps on the catalog item.

Table 8. 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. This 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 If this step is active, true. Otherwise, false.
Application (Read only) The application scope in which the system will run this step.
Test (Read only) The test to which this step belongs.
Step config (Read only) The current test step.
Description (Read only) The system automatically populates this field from the field values you provide.
Assert type Select how adding the catalog item to the shopping cart affects the test.
  • Test passes only if the catalog item is successfully added to the shopping cart.
  • Test passes only if the catalog item cannot be added to the shopping cart.

Order Catalog Item

Clicks Order Now for a catalog item. Use this step after opening a catalog item page using the Open a Catalog Item 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 An integer specifying the order in which this step executes.

As you create steps, the system automatically assigns each step an incremental value. This 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 If this step is active, true. Otherwise, false.
Application (Read only) The application scope in which the system will run this step.
Test (Read only) The test to which this step belongs.
Step config (Read only) The current test step.
Description (Read only) The system automatically populates this field from the field values you provide.
Assert type Select how ordering a catalog item affects the test.
  • Test passes only if a catalog item is successfully ordered.
  • Test passes only if a catalog item cannot be ordered.

Submit Record Producer

Submits the current record producer. Use this step after opening the record producer page using the Open a Record producer step. After this step, you cannot use any other steps on the catalog item.

Table 10. 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. This 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 If this step is active, true. Otherwise, false.
Application (Read only) The application scope in which the system will run this step.
Test (Read only) The test to which this step belongs.
Step config (Read only) The current test step.
Description (Read only) The system automatically populates this field from the field values you provide.
Assert type Select how submitting a record producer affects the test.
  • Test passes only if record producer is successfully submitted.
  • Test passes only if record producer cannot be submitted.
Feedback