Ranorex Tutorial - For Beginners

 

 

If you want to Enrich your career with an API Testing certified professional, then visit Mindmajix - A Global online training platform: “API testing Training” Course. This course will help you to achieve excellence in this domain.

Overview of Ranorex

Ranorex Studio is a powerful GUI Automation Test tool that is used for testing Desktop, Web and Mobile based applications. It supports the development of automated test modules with the help of standard programming languages such as VB.NET and C#.

It recognizes the GUI elements using the company’s proprietary technology. Object-based record replay can be done by Ranorex recorder which records the user interactions with desktop and mobiles such as mouse movements, touch keys, touch gestures, etc.,

Ranorex supports technologies as per the devices as follows:

  • The desktop supports applications such as WPF, .NET, WIN32, Java, MFC
  • Web applications such as HTML, Javascript framework, Silverlight, Ajax
  • Browser testings for Chrome, Internet Explorer, Microsoft Edge, Firefox
  • Mobile Apps like Native IOS, Native Android apps

It is a simple application that a non-coder can create and execute the results without any difficulties. In this tutorial, we will get familiar with the detailed fundamentals of this application such as settings, license, Ranorex studio, Create a solution, Record a test, Validation, Execution, and also an example project to work on. 

System settings and license

To start working with Ranorex, we need to download and install the tool on our devices. The official trial version of the Ranorex automated testing tool is available on the official web page. 

To download the software, do the following:

Click on the link attached, you get a webpage regarding details to be filled to download the software application.

Click here

You get a form to fill as shown in the figure below.

Fill in the required details. Enable the agreement checkbox to get 30 days free trial.

Click Download now to get a link through your mail which gets access to install the application on your devices.

trail version details

trial version details

This tool supports both 32-bit and 64-bit operating systems. The system settings are very easy to understand and the software itself installs the complete packages to work on. 

To get a license to the application, Ranorex provides the three types of premium license

  1. Node-locked
  2. Floating
  3. Runtime

The node-locked and floating license has the same features but floating allows you to share one or more users. Runtime license allows you to run the tests for one or more machines.

 MindMajix YouTube Channel

Ranorex Studio

After completing the system settings and license, you were ready to open the Ranorex Application on your device as shown in the figure below. To get started, let’s get familiar with the User interface of Ranorex software. 

renorex studio

Ranorex Studio provides three important views.

  • Project view
  • Module view
  • File view

Project View: It allows you to view all the project files. On hierarchy, the Project view contains the Solution KeePass Test suite. It consists of one project, libraries, and files required to execute the project. It also allows you to work on different projects in one solution.

project view

Module view: It allows you to execute one or more test steps. You can combine modules to create automated test series. Module Browser consists of two types.

  • Groups: These are organized groups which are of two types, one is StartAndLogin and other is SaveAndClose groups with their respective recordings as shown in the figure.

start and login save and close

  • Modules: These also consist of two types, one is CodeModule which is created and edited by automated engineers and the other is Recordings which are created by the Ranorex recorder placed in the play station as shown in the figure.

code modulerecordings

File view: When you open a project from the project view or module browser, the associate project files will open in File view. If you want to open the recordings from the module browser, you are able to view the record action on this view.

file view

Create a New Solution

Now let’s create a new project to get Hands-on-experience with the application. Open the Ranorex Studio, you get the Studio Welcome screen as shown in the figure.

rx welcome

On the top left side of the page, you can see the Start box. Click on New test Solution using the wizard. Now you can start creating your test solution followed by the four steps as follows.

Basic Data: Here, Give your Solution test name and Location to save your test. Click on the Additional options dropdown, to check the project defaults with your Solution name. Now, Enable the checkbox to create the Solutions files within the directory structure as shown in the figures.

basic data

Click Continue.

Select Application: You can choose from your Running application or you can browse your applications by navigating through browse as shown in the figures.

select running apps

Click Continue.

Configure Behavior: It allows you to select the recording behaviors which are of three kinds. They are:

  • Focus on a single application: It ignores all the other applications during test recording except the application in which you want to execute tests. This makes your test easier to run.
  • Focus on multiple applications: It allows you to select more applications to whitelist.
  • No focus applied: It allows the recorder to interact with any other running processes.

configure behaviour

Click Continue.

Finish: It was the end of creating your solution test. Click Finish.

The Ranorex Studio appears with the User interface as shown in the figures.

  • Module Browser consists of three modules which are Close the app, Open the app, and a single empty recording. 
  • There is also a single Test case in the Test suite on File view. Open the Test suite, you can see the Setup and Teardown region along with their respective modules for the test.
  • If you run the test, You can see the Ranorex application automatically closes and opens the application under test.

modules

test case suite

run

Record and Validate a test

Open the Recording 1 module which is in the project file that was already created before as shown in the figure.

test suite

Click Record. Ranorex studio minimizes automatically.

record

The recorder starts recording the actions done in the application. Move your Mouse over the interface of your application to view the indication of the red dot which is recording the actions. This means the Ranorex application identifies the UI elements on your test application.

red dot

Enter your name and Submit. You can see the welcome message of your name after validation as shown in the figure.

welcome msg

You can also view the Ranorex recorder below the screen as shown in the figure.

ranorex recorder

The Ranorex recorder records the actions on the screen done with your mouse and keys are listed in the recorder. The user can delete the actions, add the actions manually, or can modify the actions done on the application.

You can also enable the Image-based recordings and hotkeys to maintain shortcuts to edit or delete the actions.

Now Validate your recordings to check your name entered and it shows your name on the welcome message.

Click on any UI, select element window opens which is to verify the UI which you are selected as shown in the figure and click on Next. 

validation elements

Now the Validate settings window opens, Make sure the Exists and Texts attribute checkbox to enable as in the figure.

validation settings

Stop recording. Now the window redirects to the Ranorex application, you can view the actions which are recorded till now on the file view as in the figure.

Actions Recorded

Action and Repository

The files in the project view are organized in the hierarchy. The top one is the Solution of which the project created before. It contains a test series which has the file extension as .rxtst format. The project also contains the repository which the UI elements under the test with an extension as .rxrep format.

Open the recording in the action editor, you will find the repository items which contain the UI elements identified by Ranorex recorder as shown in the figure.

repostiorty elements

You can see the steps of actions done previously on the application.

If you want to add an action, click on Add new action on the top left of the file view to add an action manually. If you want to change your name, Click at your name and change as you wish. You can also change the sequence of your actions or you delete the unnecessary action.

Repository elements are stored within the application while recording. Select any element and it represents the element while showing the screenshot taken by Ranorex recorder. Now click on EDIT IN SPY to check the path of the element.

repository

path of an element

You can edit the repository items in several ways. Can add items manually, rename the item for convenience, can delete a repository item. Make sure the UI element which is going to select is to be highlighted in repository items.

Ranorex Spy

The Ranorex Spy is a tool that helps to recognize the UI elements of the objects under test in the element browser. It gives the hierarchical representation of elements along with the path represents the parameters such as attributes, values, and adapters. The adapter defines the kind of application, Values, and attributes define the type of UI elements as shown in the figure.

spy

<adapter>[@<attribute>=<value>]

/Button[@controlname=’Enter’]

It also has the ability to identify the specific element by changing its path. For example, Enter the below-given path to identify all the elements with text.

/form[@controlName=’FirstForm’]//Button[@text=’Enter’]

This path will highlight the element by entering in the first form.

Execute a test

Modules are created automatically by the Ranorex application. We can use those modules to run the project. Double click on the StartUT module and then click Run. You should notice that the application should open. A report appears in the file view with information about the application that was opened as shown in the figure.

report

In the same way, run all the modules to get the reports. You can also create a test suite in the file view to get executed all the modules at the same time. It contains one Test case with a Setup and Teardown sections with the StartUT and CloseUT modules in it. Now Click Run to run the entire Test suite.

test suite run

You will notice the application runs and the report appears on the file view as shown in the figure.

report1

Click on the Test Case to view the entire report details such as test runs, modules, recordings as shown in the figure.

entire test report

Make sure that the application which is to be tested should not be closed during the time of execution.

Fix a failed test and run

The test can be failed due to the use of internal data tables and external sources such as Excel files, SQL connectors. Just change the Data and execute the file to get the report successfully. 

Job Support Program

Online Work Support for your on-job roles.

jobservice

Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:

  • Pay Per Hour
  • Pay Per Week
  • Monthly
Learn MoreGet Job Support
Course Schedule
NameDates
Ranorex TrainingNov 19 to Dec 04View Details
Ranorex TrainingNov 23 to Dec 08View Details
Ranorex TrainingNov 26 to Dec 11View Details
Ranorex TrainingNov 30 to Dec 15View Details
Last updated: 03 Apr 2023
About Author

Ravindra Savaram is a Technical Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.

read less