Recording tests in Playground
Creating a test in Playground starts with going to the relevant webpage or application and recording the user journey that you would like to base your test on. As you record the series of actions, Testim generates Playwright code for the test, which can be copied to your preferred IDE. In addition, a visual representation of the test as a sequential flow of test steps is shown in the Testim Codeless tab.
Tests can't be saved in Playground. Whenever you close or refresh your browser, the current test is deleted. Make sure to copy the Playwright code to your IDE before closing or refreshing the page. To access the full functionality of the Testim Editor including the ability to save tests, sign up for a free-trial here.
To record a test in Playground:
- Open Playground in your Chrome browser https://www.testim.io/playground/.
The Record test window is displayed in the center of the Playground window.
The first time that you use Playground you will be redirected to the Chrome Web Store to install the Testim extension.
- In the URL field, enter the URL of the webpage/application that you would like to test.
After your first time use, the URL field is populated by default with the URL that was used for your previous session.
- Click Start Recording.
When you begin recording a test, a new browser opens to the URL that you entered. This is the Aplication Under Test (AUT) window, actions that you take in this window are recorded by Testim and coded as a Playwright test. - In the AUT window, execute the user journey that you would like to use as the basis for your test.
Each action taken (e.g. click, double click, right-click, enter text, etc.) is coded as a test step. - The recorded test is shown in the Playground window.
The Playwright code is updated as you record each action. Therefore, there is no need to stop the recording in order to copy the Playwright code to your IDE. Whenever you have finished recording, simply copy the code and start working in your IDE.
Watch Demo
Pausing/restarting a recording
You can pause and restart the recording. Only actions taken in the AUT while you are in recording mode are included in the test. Actions taken while recording is paused are not included. This enables you to set up the scenario in which you want to record the test.
To pause/restart recording:
- In the Playground window, while you are recording a test, the Pause recording button is shown in the header bar. Pause the recording by clicking the Pause recording button.
- While recording is paused, the Record button is shown in the header bar. Click on the Record button to resume recording.
- Once recording is resumed, go back to the AUT window and continue the user journey.
Using the above method continues recording the steps sequentially from where you left off. You can also insert additional recorded steps 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.
Updated 3 months ago