How to Record a Test

Step 1 - Create a New Test

To create a new test:

  1. Navigate to Test List > Tests.
  2. Click the Plus (+) icon and select New Test.
13711371

Alternatively, you can click on the New Test button (which is shown in the header bar on all screens).

19111911

A new test opens in the Visual Editor. This is where you record the test, add validations and edit the test steps.

19201920

Step 2 - Setting the Base URL

The Base URL specifies the initial site that opens when you begin recording the test, see Base URL.

๐Ÿ“˜

You can record tests that include steps that open additional windows and perform actions in those windows, see Recording in multiple windows.

There are two ways to set the Base URL:

  • Setting a default Base URL - You can set a default Base URL for a Project. This URL is automatically applied to all new tests that you create within the Project.
  • Setting the Base URL manually - If no default Base URL has been configured, then you need to manually enter the Base URL for each new test. If a default Base URL has been configured, then the default URL is used unless you manually edit the URL.

Changing the Default URL

When you initially setup your project, you were required to select a Base URL for your testing application. You can change the default URL for your project at any time. All new tests will automatically use the default URL.

To change the default URL for a project:

  1. Navigate to Settings > Project from the main navigation menu.
  2. Click the Edit button next to the Default Base URL field.
937937
  1. Enter the new default URL and click OK.
750750

Testim will save the new default URL and this URL will be used as the Base URL for all new tests.

Setting the Base URL manually

When you first create a test, the Base URL will always be set to the default URL for the project. You can edit the Base URL for a single test manually.

To set the Base URL for a single test manually:

  1. After creating a new test, in the Visual Editor click Step 1 or the Base URL link.
764764

This will display the Test Configuration properties panel.

329329
  1. In the Base URL field, enter the new Base URL for your test.
319319

๐Ÿ“˜

You don't need to save the new Base URL. The Base URL will automatically save as you type.

Step 3 โ€“ Setting the Test Configuration

The Test Configuration determines the system specifications used to run the test. If you intend to run the test locally then the configuration should match your local environment. If you intend to run the test on the Testim Grid, then Testim simulates whichever environment is specified.

๐Ÿ“˜

When the test is run in the CLI, you can override the default configuration by specifying a new Test Configuration in the run command, see Command line interface.

๐Ÿšง

If you run a test locally on a system that doesnโ€™t correspond with the Test Configuration, then the Test will run with the available configuration and a warning message will be shown.

Test Configuration Parameters

The following table describes the Test Configuration parameters.

ParameterDescription
NameThe name of the configuration.
BrowserThe browser on which the test runs. Supported browsers are: Chrome, Firefox, Safari, Edge and Internet Explorer 11.
OSThe OS on which the test runs. Supported OSs are Linux, Windows 10, Windows 8, Windows 8.1, Windows 7, Windows XP, macOS Sierra, macOS High Sierra, macOS Mojave, OS X El Capitan, OS X Yosemite, OS X Mavericks, OS X Mountain Lion, OS X, Snow Leopard.
ResolutionThe screen resolution used for the test.
Advanced
Step Timeout (milliseconds)The time lapse which causes Testim to register a fail for a test step.
Step Delay (milliseconds)The delay between implementing test steps.
Setup step timeout (milliseconds)The delay before implementing the initial (Base URL) step of the test.
Visual ValidationThe Visual Validation parameters (below) are only visible for projects for which integration with Applitools is defined.
Add EnvironmentAdd additional environments (browser, resolution, device emulation, etc.) to run your test under.
Match levelChange the comparison method between your baseline and your elementโ€™s visualization.
Enable RCAEnable root cause analysis insights into the cause of mismatches.
Ignore displacement diffsIgnore visual differences caused by elements that have moved on the page, but havenโ€™t inherently changed.

Adjusting the Test Configuration

When you create a new test, the default Test Configuration is automatically applied.

You can change the Test Configuration using one of the following methods:

  • Edit โ€“ Edit the current Test Configuration. The new configuration applies only to the current test (it does not affect the Configuration profile).
  • Choose Other โ€“ apply a different Test Configuration from the list of available configurations.
  • Custom (create new) โ€“ Create a new custom configuration and apply it to the current test.

Edit the Test Configuration

To edit the Test Configuration for the current test only:

  1. After creating a new test, in the Visual Editor, hover over the Base URL step and click on the button.
387387

The Properties window opens alongside the main window.

๐Ÿ“˜

Alternatively, you can select the step and then click on the button in the header bar.

  1. Scroll down to the Configuration section and click on the Edit button.
335335

The Edit Configuration pane opens.

326326
  1. Edit the configuration parameters as desired.
    The new configuration is applied to the current test.

Choose a different Test Configuration

You can apply a test configuration from a list of preset/shared test configurations.

To apply a different Test Configuration to this test:

  1. After creating a new test, in the Visual Editor, hover over the Base URL step and click on the button.
387387

The Properties window opens alongside the main window.

๐Ÿ“˜

Alternatively, you can select the step and then click on the button in the header bar.

  1. Scroll down to the Configuration section and Click on Choose Other.
320320

The Choose New Configuration pane opens, showing a list of available configurations and highlights the currently applied configuration.

316316
  1. Hover over the desired configuration and select Choose.
316316

The new configuration is applied to the current test.

Create a custom Test Configuration

To create a new custom configuration follow the instructions here

Step 4 - Recording the test

When you begin recording a test, a new browser opens to the Base URL. This is the Application Under Test (AUT) window, actions that you take in this window are recorded by Testim and configured as steps in your test.
The following actions are identified as separate test steps:

  • Click
  • Double click
  • Right click
  • Scroll
  • Set (enter text)
  • Scroll on page
  • Scroll to element
  • Drag
  • Resize window

To record a new test:

  1. After creating a new test, on the Visual Editor screen, click on the red record button in the header bar.
12831283

The AUT browser opens to the Base URL.

  1. In the AUT browser, take the actions that you would like to include in the test.
  2. Click the Stop Test button when finished recording.
800800

The test is recorded. Each action is identified by Testim and shown as a step in the Visual Editor.

14741474

Pausing/Restarting a recording

You can pause and restart the recording. Only actions taken in the AUT browser while you are in recording mode are included in the test. Actions taken while recording is paused are not included.

๐Ÿ‘

While the recording is paused you can set up your test scenario and then resume recording.

To pause/restart recording:

  1. On the Visual Editor screen, while you are recording a test, the pause button is shown in the header bar. Click on the Pause button to pause the recording.
372372
  1. While recording is paused, the red record button is shown in the header bar. Click on the record button to resume recording.
314314
  1. Navigate back to the AUT browser window and resume recording. You can jump to the window by clicking on the Go to app button in the header bar.
314314

๐Ÿ“˜

Using the above method continues recording the steps sequentially from where you left off. You can also insert additional recorded tests in between existing steps. This is done by clicking on the button at the point where you would like to make the insertion and then clicking Record action here from the dropdown list.

Step 5 - Saving a Test

Whenever you create a new test or make changes to an existing test, you need to save the test.

โ—๏ธ

If you close the browser without first saving the test, your work will be lost.

Once you have finished recording your test, you can save it.

To save a new test:

  1. From the Visual Editor screen, click the Save button.
18011801
  1. Provide a Name and Description for your test and click OK.
729729

The test is saved and added to the test library.

825825

Saving an edited test

When you edit an existing test, e.g. record additional steps, adjust properties, add validations etc. you need to save the changes. See Editing Tests for more information.