The recording means to record the actions a user performs on the application. While using the recording feature Telerik Test Studio automatically generates scripts that can be executed again for repeating the actions performed by the user.
Importance of Record and Playback
Record and Playback can be used to test the basic functionality of any application or module that doesn’t require significant maintenance. Record and Play Back can record mouse movement or even keyboard keystrokes.
Record and Playback available with Telerik Test Studio
Recording can be either done by using the Recording button present in the Telerik Test Studio home.
Or by adding a new test case to the Project and selecting “Record option from the Right click menu.
Before starting with the Test Studio automation script, the first step is to identify the test steps that tester is going to automate.
There can be numerous possible test cases to start with but let’s begin with a simple Test Scenario. “Validate that user is able to fill all details in the contact form and send the details”.
Let’s list down the steps for the test scenario:
- Open Browser
- Open http://demoqa.com/
- Click on Contact Tab
- Enter your Name
- Enter Your Email
- Enter Subject
- Enter Your message
- Click on Send
- Verify that the message was sent
Steps to Record and Play Back in Telerik Test Studio
1) Open Telerik Test Studio and click the Record button in the home screen. The “Create New Test” Dialog Box will open. This box will appear automatically every time you start recording a new test.
2) From the Create New Test Dialog box, we will select “Web” as our test type. Provide a Name for the test, by default, it will be set as “WebTest”. Change it as per your choice and click on create button.
3) A Recording dialog box will open asking you to “Enter URL and Select Recording Browser”. Provide the URL ad Select the browser on which you want to record your test. Once you have provided the details click “Record” button to start recording. Telerik will launch Recorder and the browser you have selected will open.
4) The area encircled in the line is the Telerik bar, which is superimposed on the browser by default. It provides you extra options and helps in recognizing DOM structure of a web page.
5) The next step in our test case was to navigate to Contact Page. So, let’s click on contacts tab. Once you perform any operation while Recording is turned on, Telerik will record it.
6) Now let’s perform steps from four to seven. Enter your name, your email, Subject and Your Message.
Now, Click on Send button to send your message. Now, once the message has been sent we will need to verify the sent message.
So, to verify the message received (in the Red Box).
7) Click and enable the “Highlight Element” button as shown in the box
Once the highlight element is active just hover it over the element and it will offer you will several options.
8) Once you hover it over the element a menu will open, go to Quick Steps and then select “Verify Text contains Your message was sent successfully. Thanks.” Option.
9) To stop recording, just close the browser. Now, go to Telerik Test Studio the view the recorded steps.
Executing your Recorded steps
These are the test steps that have been recorded by Telerik Test Studio, under test name “WebTest”.
1) To Run or play the test just click on the “Execute” button beside record. It will execute the test case.
2) So, once you click on execute, Telerik will ask you about the browser on which you want to execute the test case. Select a proper browser and click Run button.
3) Once, you click on Run, Telerik will connect to the selcted browser and will start execution. The floating bar at the right botton side of the screen shows the step currently being executed and the overall status.