Tricentis Test Automation for ServiceNow Recorder User Guide

The Tricentis Test Automation for Service Now Recorder allows tests to be developed quickly by recording a series user or interactions with the ServiceNow application (for example, the steps required to create an incident). The steps are recorded as a script, which may be updated with validation actions, and then saved as a Test Case.

The following shows the Recorder in the process of recording a script to create a new incident.

The Recorder allows scripts to be viewed in two ways:

  • Instruction view - Displays the case as a series of natural language instructions.

  • Code view - Displays the case as a series of script commands that may be edited directly.

Installation

Tricentis Test Automation for ServiceNow Recorder is available as a Chrome Extension. The recorded scripts will also work on other browsers. To install Tricentis Test Automation for ServiceNow Recorder, see the Recorder Installation Guide.

Starting Recorder

Once installed, the Tricentis Test Automation for ServiceNow Recorder will be added to the Chrome toolbar. To start Recorder, carry out the following steps:

  1. Navigate to a ServiceNow instance.

By default, Tricentis Test Automation for ServiceNow Recorder only has permissions to run on service-now.com domains. If other domains are required, please contact Technical Support.
  1. Click the TTA Recorder button in the Chrome header . A minimized version of the Recorder is displayed.

  1. Click on the right-hand side of the Recorder to expand the display.

Interface Components

The Recorder user interface has the following components.

Recorder Header

The Recorder Header is displayed at the top of the Recorder.

  • Case Name - The name of the current case. Modify this field if required to change the name of the currently selected case.

  • Suggested Actions - A suggested list of actions that may be applied to the current step in the recording.

  • Last Command - The last command that was added to the recording

  • Search - Use this field to search for steps in the recording.

Recorder Header Actions

The following actions are available in the Recorder Header:

  • Add a new Case.

  • Begin recording the current Case. Available in Instruction view only.

  • End recording the current Case. Available in Instruction view only.

  • Suggested Actions - Click a Suggested Action to add it below the selected step in the current Case. These are enabled in Instruction view in for fields that have suggested actions.

Case Header

The Case Header is displayed directly below the Recorder Header.

Case Header Actions

The following actions are available in the Case Header:

  • Run Script - Instructs the Agent to run the Case, after displaying the Settings dialog to request your login credentials.

  • Copy Script - Copies the Case’s code to the Clipboard

  • Copy With Steps - Copies the Case’s code to the Clipboard, including commented descriptions for each of the steps.

  • Remove All Steps - Removes all the steps from the case. A confirmation dialog is displayed.

  • Variables - Displays the variables that are available to the script (to the right of the Variables label). To add a variable for a field with a green background, select it in the ServiceNow screen and click the Save Display Value selected action.

Sidebar

The sidebar is shown on the left-hand side of the Recorder, directly below the Tricentis logo.

Sidebar Actions

The following actions are available.

  • Displays the case as a series of natural language instructions.

  • Displays the case as a series of script commands that may be edited directly.

  • Displays or hides the Results panel. The Results panel is available when Instruction view is selected.

  • Displays the Settings dialog.

The Settings dialog has the following components.

  • Testing Credentials - Enter the username and password of the account used to run the Case.

  • Custom Elements - Toggle this button to specify whether custom elements are to be ignored or captured.

  • Agent Session - Click Reset to reset the Agent session.

  • Help - Displays the Recorder User Guide on the Tricentis Support Hub.

  • Options - Displays the Options screen for the TTA Recorder Chrome extension (not currently implemented).

Click Save to close the dialog and save any changes.

Cases Panel

The Cases panel is displayed to the right of the Sidebar. It lists the Cases that are available in the Recorder. Each ServiceNow user maintains their own set of Cases.

Cases Panel Actions

The following actions are available from the Cases panel.

  • Select a Case from the list to display it in the Recorder.

  • Click a Case’s check box to select it, or click Select all to select all the Cases.

  • Click to a delete the selected Cases.

Steps Panel

The Steps Panel displays the steps that have been recorded for a Case.

Steps Panel Actions

The following actions are available from the Steps panel.

  • In Instruction view :

    • Select to the left of a step to drag and drop it to a new position in the list.

    • Click to the right if a step to insert a Pause statement after the step. The default is to pause for 1 second, but you may adjust the number of seconds as required.

    • Click to the right of a step to delete the step.

  • In Code view , you may edit the script code directly.

Recording a Case

When recording is enabled, mouse and keyboard events will be captured for all recording enabled elements on the page. In the ServiceNow screen being recorded:

  • Fields shaded in green are recognized by the Recorder, and may be used with one or more Suggested Actions.

  • A field shaded in blue indicates that it was the last field to be selected.

To record a new case, carry out the following steps.

  1. Start the Recorder and click to expand the display.

  2. Click to create a new case, and enter a name for the Case in the Case Name field. Alternatively select an existing case that you wish to modify,

  3. Click in the Recorder header to start recording.

  4. Perform one or more steps, as you would normally in ServiceNow.

  5. Click the Recorder header to stop recording.

  6. In Instruction view , add any actions required to verify the results. These may be added from the Suggested Actions list.

  7. Verify that the steps were captured correctly. Remove or reorder any incorrect steps.

Adding Actions to a Case

To add actions to a case, carry out the following steps:

Method 1 - Adding a Suggested Action

  1. Select a valid element in ServiceNow by clicking or hovering over the element. To select an element without clicking it, move the mouse cursor over the element while holding down the Alt key.

  2. In the Recorder, select an action from the Suggested Actions list.

  3. The action will be added to the current case, below the currently selected step.

Method 2 - Searching for an Action

  1. Select a valid element in ServiceNow by clicking or hovering over the element. To select an element without clicking it, move the mouse cursor over the element while holding down the Alt key.

  2. In the Recorder, search for an action in the Search field.

  3. Select the action from the dropdown list.

  4. The action will be added to the current case, below the currently selected step.

Modifying Steps

Some recorded steps and actions have configurable parameters that may be changed. In Instruction view, these parameters have dashed blue border.

To change a parameter, carry out the following steps:

  1. In Instruction view, select a step in the current Case by clicking anywhere in step’s text,

  2. Select the parameter you wish to change. The Recorder has four types of parameter:

  • Locked - These parameters cannot be modified after they have been added.

  • Auto-Compete - Search for a valid option for these parameters by typing in the field.

  • Select - Select a valid option for these parameters from a short list of options.

  • Text -These parameters can be set to any text value.

  1. The parameter will be updated with the new value.

Reordering Steps

To reorder the steps in a Case, carry out the following steps:

  1. Hover over the step to move.

  2. Select the drag and drop handle to the left of the step number.

  3. Drag and drop the step to its new position in the Case.

Deleting Cases

To delete one or more Cases, carry out the following steps.

  1. Select the check boxes next to the Cases to delete. Alternatively. select Select All to select all the Cases.

  2. Click at the top of the Cases panel.

Keyboard Shortcuts

The following keyboard shortcuts are available (while focused on the ServiceNow interface):

  • Ctrl+Enter - Starts or stops recording.

  • Ctrl+Backspace - Removes the last step from the Case.

  • Ctrl+Shift+Backspace - Removes all steps from the Case. A confirmation dialog is displayed.

  • Ctrl+Down Arrow - Expands or collapses the detailed view.

Recorder Options

The TTA for ServiceNow Recorder screen may be used to adjust the settings for Recorder, for example if it is unable to be started in a particular environment. To access the option for Recorder, select the icon in the Chrome toolbar, and choose Options from the context menu. The TTA for Service Now Recorder options dialog is displayed.

  • Fallback Version - Specify the version of ServiceNow to record.

  • Use Relative Position - Select this check box to have the Recorder locate ServiceNow fields by their relative positions. For use with ServiceNow screens with customized layouts.

  • View License Agreement - Click this link to display the Tricentis Customer Clickwrap License.

Click Save to save any changes, and then to close the dialog. The TTA for ServiceNow Recorder screen is displayed. This screen displays the options for the TTA for ServiceNow Recorder Chrome Extension.

The screen has the following fields.

  • On/Off - Toggle this switch to turn the Recorder on or off.

  • Description - The description for the TTA for Service Now Recorder Chrome extension.

  • Version - The version of the TTA for Service Now Recorder.

  • Size - The size of the TTA for Service Now Recorder.

  • Permissions - The operations for which the TTA for Service Now Recorder has permissions.

  • Site Access - The web sites to which TTA for Service Now Recorder has access.

  • Allow in Incognito - Allows the TTA for Service Now Recorder to run in Incognito mode,

  • Extension options - Click to display the TTA for Service Now Recorder options dialog.

  • View in Chrome Web Store - Click to display the TTA for Service Now Recorder in the Chrome Web Store.

  • Source - The source location of the TTA for Service Now Recorder.

  • Remove Extension - Click here to remove the TTA for Service Now Recorder Chrome extension. A confirmation dialog is displayed.

User Guides