This tutorial describes how to record and run scripts. A script is a sequence of user actions on the tested web pages. You can run them later to check if the tested web app works as expected.
1. Start recording
Select Record & Replay > Record a Script on the left.
Enter the URL of the page to be tested.
Select the desired screen resolution.
Click Record Script:
This will launch the recorder.
2. Record user actions
Here is a sample view of the recorder screen:
For more details on the recorder user interface, see Recorder UI Overview.
To record a script, …
… simply work with the page in the internal browser as a normal visitor would do this: click links and buttons, input text, scroll the page contents, and so on. The recorder will register all your actions as events.
A step is a series of events on the same web page. When you navigate to another page on the tested website, the recorder automatically starts a new step. If needed, you can also start a new step manually or group the recorded actions into a new step.
For information on recorded events and their parameters, see Recorded Events.
The maximum recording time is 30 minutes.
Additional operations during recording
- Create a new step manually.
- Add a validation (also called checkpoint or expect).
- Navigate to a new page by typing its URL at the top of the internal browser.
One web test typically corresponds to one user scenario. Once you’ve recorded all events that make up that scenario, you can stop recording:
3. Play back the recorded script & save it
Note: For test automation, it’s very important that the recoded test works correctly. We highly recommend that you play back the recorded events to ensure the test works as expected:
If the test doesn’t work, fix it: check and change event properties, record additional events, delete and re-record certain test parts, or re-record the entire test.
If the test works as expected, you can save it. To do this, click Save Script in the message box that the recorder shows after successful playback, or select File > Save, enter the test name and optional description in the subsequent dialog and click Save:
You can close the test recorder now.
If you exit the recorder without selecting the “Save” command, the recorded events will be lost.
4. Create and configure a suite
To run a test on a regular basis, create a test suite and add the test to it:
Select Record & Replay > Replay a Suite on the left. Click New Suite on the right and specify the suite name and optional description in the subsequent dialog:
In the subsequent dialog, click the scripts to add to the suite and then click Add Scripts:
You can add up to 10 scripts to a suite to test up to 10 different user scenarios during one run.
Scripts in the suite run in parallel. They are not synchronized.
You can add the same script to different suites.
After you’ve added scripts, you need to specify environments (or configurations) for the run. An environment (or configuration) is a combination of the operating system, browser, and screen resolution. Scroll the suite screen down to the Suite Browser List section, select the needed values and click Add Config:
You need to add at least one configuration. Without configurations, the suite will not run.
You can add up to 10 configurations to verify how the tested website works for clients using different systems. Every script in your test suite will run on every configuration you add.
Note: If you select an operating system first, the Browser drop-down list will have only those browsers that can run on the selected OS. To view all the browsers, clear the OS box.
Similarly, if you select a browser first, the Operating Systems list will have only the systems on which the selected browser can run. To view all the available systems, clear the Browser box.
You can scroll the page down and schedule the suite runs, if needed. See Automated Test Scheduling for details:
Scheduling is optional. You can always start a suite manually.
5. Run the test suite
On the Suite Settings screen, scroll the page up to the beginning and click Run Suite:
Another option is to select Record & Replay > Replay a Suite from the menu on the left, and click Run Suite for your suite:
You can also schedule suite runs.
A click on the Run Suite button opens the screen where you can see information on script execution. To monitor how this or that script runs, click Watch Run:
After the run is over, you will see results:
Click View Details to view the results of an individual script.
Click Share to share the results via a public URL, email, Slack, or Jira. See Collaborating Integrations for details.
If needed, you can run a script out of any suite: select Record & Replay > Record a Script from the menu on the left, find your script on the page and click Replay:
Difference between script runs
In the UI, you can play a script from the recorder screen, from the Record & Replay screen, and as part of the suite. You run a script from the recorder screen to verify it works as expected. This option of execution has some differences from the others:
The script engine is slightly different, but produces very similar results.
No ability to choose an operating system or browser.
This playback’s results are not stored.
This tutorial is over. We recommend reading a bit more to learn how to get most out of your recorded tests: