Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Checks can contain a Selenium browser automation scenario. Using scenarios in your Web check allows you to verify that the site behaves as expected. You can test your scenario directly from the ASM platform via the Edit Check page.

You can add a scenario to your browser check from the check configuration view.

It is possible to mask sensitive information when creating the ASM scenario so that passwords and other sensitive information is not exposed unnecessarily. The sensitive information will be hidden from both the Check Results page and the Edit/Debug scenario page. See How to Mask Sensitive Information Within an ASM Scenario for more details.

For example, you can see the text [ENCRYPTED BY APICA] in the above screenshot. Here, a value was hidden so that it cannot be seen by users who have Scenario Admin permissions.

Upload a Scenario to the ASM Platform

  1. Click “Add Scenario”:

  2. Enter a name for the scenario

  3. Click “Choose File”

  4. Browse to the directory where you have the scenario file stored

  5. Select the appropriate file

  6. Click “Open”

  7. Click “Save” to add the scenario to the check:

Debugging a Scenario From Within ASM

The Debug Scenario view allows you to replace, edit or test the scenario.

Click “Debug Scenario” (the bug-like icon). The Debug Scenario view is shown:

Replacing or Renaming an Existing Scenario File

You can replace an existing scenario file with a different scenario or a newer version of the same scenario by uploading a locally stored file:

  1. Click “Upload New File”

  2. Browse to the directory where you have the scenario file stored

  3. Select the appropriate file

  4. Click “Open”

If scenario upload is successful, you will see the following confirmation message:

To rename an existing scenario file, click the “pad and paper” icon to the right of the scenario file name:

If the scenario file name was updated there in the Debug Scenarios page, the updated file name will show in the Edit Check page. This is useful functionality if you make a change to the script and would like to save a new version number without exiting the Debug Scenarios page.

To rename the title of the ASM scenario itself, click the “pad and paper” icon to the right of the scenario name:

This will not change the scenario file name and will only change the title of the scenario itself. It is generally recommended to rename both the scenario file name and the scenario name at the same time in order to maintain consistency.

Testing Your ASM Scenario

You can test your scenario by clicking the “Test Scenario” button from within the Edit Scenario page:

Item

Description

URL

URL to run the scenario towards

Browser

Browser type and version to use for the test

Location

Location to run the test from

Custom Headers

Additional HTTP Header to send together with each request

Test Scenario

Run the test

While the test is running, progress is displayed next to the run button.

You can cancel the test at any time by clicking Cancel.

Result Summary

Success

A successful test run is indicated in the Result Summary:

Failure

If the scenario fails, the step on which the scenario failed is indicated in the Result Summary:

Screenshots

If the scenario is configured to use screenshots, they are displayed as part of the result summary:

Using Scenario Commands

Commands can be added to a new or existing scenario file with the “Add Step” button:

  1. Click “Add Step”

  2. Select a command from the dropdown list

  3. Double-click the blank rows in the Target and Value columns and add the desired values:

  4. Click “Save Scenario”

Existing commands in the list can be edited by clicking on the dropdown or double-clicking the rows in the Target and Value fields. Commands in the list can be deleted by clicking on the “trash can” icon. Commands in the list can be reordered by clicking the command row and dragging the command to a new position. Commands in the list can be downloaded by clicking the “Download Scenario” icon. This is useful for when you wish to back up your existing scenario before making significant changes to a scenario.

Execution Log

After a test run has ben executed for a scenario, a test execution log becomes available. The execution log is collapsed by default:

To show the full execution log, click the button to the right of the “Execution Log” text:

Column

Description

#

Order of execution

Name

The name of the command

Target

The target for the command

Value

The Command value, if any

Severity

If the scenario passes, every severity row will have the value “info”. If the scenario fails, the severity row of the failed command will have the value “error”

Offset

Start time.

Duration

Execution time.

In the event of a failed execution, failed commands are also highlighted in the “Commands” section:

  • No labels