Recording Tests in Test Studio

The Compact Recording Toolbar in Test Studio is the key element in recording tests. Once attached to an application it detects how you act upon the app and represent your actions as automated steps in the test. It also gives access to a variety of useful features enabling you for an entirely codeless testing experience.

Telerik TestStudio Ninja image
New to Telerik Test Studio?

Test Studio is a test automation platform for web, WPF, and responsive web applications, supporting UI, functional, load, and RESTful API testing. Sign up for a free 30-day trial!

This article guides you trough the recoding workflow for web and WPF tests and how you can get the most out of it.

  1. How to Start a Recording Session
  2. Example of a Web Test Recording
  3. Example of a WPF Test Recording
  4. How to Add Steps in the Test
  5. Stop the Recording Session
  6. Attach the Recorder to a Running Application
  7. What is the Compact Recorder

Start a Recording Session

Create a web or WPF test in the Test Studio project and open it. This changes the tools ribbon to Tests and lets you start a recording session. You can use the Record button from the ribbon, or the camera icon in the opened test pane.

Test Studio

Tip

You can use the keyboard shortcut Ctrl+R or the Project Explorer test context menu option Record to start the recording session.

Web Test Recording

To start a recording session in the context of a web test you need to enter the URL of the page to automate and choose a browser to load the application in. You can define these in the Recording dialog, which appears after clicking the Record button.

Enter URL, Choose browser

Tip

If you plan to use a specific browser for the automation project, you can select that browser and enable the checkbox 'Save my choice for the future' - this will set the browser as a preferred one for this project and you will no longer be prompted to select a browser for recording and execution.

Hit the Record button in the Recoding dialog to start the recording - a new instance of the browser starts and loads the selected page. Once the page is completely loaded the Compact Recording Toolbar appears on top of the browser.

Attached recorder

The Test Studio UI remains in the background of the browser and logs the actions as steps in the test - you can switch back to the project to check a Navigate step is recorded with the same URL as defined when starting the recording session.

Recorded navigate step

Note

While recording a web test, do not start another instance of the same browser until the current recording session is finished!

WPF Test Recording

To start a a recording session in the context of a WPF test you need to define the WPF application to automate. The first time you click the Record button in the WPF test, it triggers the Configure WPF Application Path dialog where you can browse to the executable file of the WPF app to test.

Configure WPF Test button

Tip

You can configure the application to test in a WPF test before you start recording. That way the recording session starts right after clicking the Record button.

Hit the OK button in the Configure WPF Application Path dialog to start the recording session - a new instance of the application starts and loads as it is expected to. Once the application is completely loaded the Compact Recording Toolbar appears on top of the app.

Record WPF Test

The Test Studio UI remains in the background of the application and logs the actions as steps in the test.

Recorded steps in WPF Test

How to Add Steps in the Test

Tip

Check out this video tutorial about wait and verification steps in Test Studio.

Stop the Recording Session

To stop the current recording session close the automated browser or WPF application - this is how all processes and communication channels between the app and Test Studio gets dismissed.

Attach the Recorder to a Running Application (Applicable for IE and WPF Only)

The specifics of the recording process allow to attach a recorder and trigger a recording session to an already running IE browser or WPF application. To start such recording session you need to use the dropdown under the Record button - in the list you can see all compatible processes, to which Test Studio recorder can be attached. Select one and wait for the Compact Recorder to attach to the application.

Attach to running browser

Web Test - Internet Explorer only
Attach to running WPF instance

WPF Test - connect to running WPF application instance

Note

Attaching a recording session to an existing process is only applicable for Internet Explorer or WPF application. If you need to cover similar recording scenario for the other browsers (Chrome, Edge Chromium, Firefox), you can use the options for partial test execution.

What is the Compact Recorder

The Compact Recording Toolbar gets attached to the automated application for every recording session and it can be considered as the connection between the application under test and Test Studio.

To ease you in recording the test scenarios, the toolbar's size is minimal on top of the application window and you can change its position at any time. Through the Recording Toolbar you have access to helpful resources for the recording process - highlight and add elements to test project, explore the application under test's structure and its elements, add actions, verifications and common steps for your test scenario.

Compact recording toolbar

Below you can find a short description of each button in the toolbar (in the order these are listed) and reference for further details:

  • Enable/Disable hover over highlighting - used to highlight the elements that you hover over in order to access the Elements Menu pop-up with multiple options for the specific element.
  • Pause/Resume recording button - allows you to pause or resume the recording. When it is paused, your actions against the application under test will not be added to the test.
  • Show/Hide the Advanced Recording Tools in the Advanced Tools you have access to the application's DOM tree and various types of steps for the selected element.
  • Switch the orientation of the Compact Recording Toolbar between vertical and horizontal - this is additional feature to increase your productivity and allow you place the toolbar anywhere outside of the working area.

See also

In this article