How to Customize Report of Ranorex Tool?

Ranorex is a tool to perform automated testing of mobile, web, and desktop based applications. It uses its own format to generate a default report. However, it provides very little information. For example, information related to server, browser, Java version, etc. doesn’t show up.

In order to overcome this situation, the report can be customized to show the required information. The report can be generated in a tabular form with information related to server, build number, browser, Java version, number of Passed/Failed/Skipped test cases, and more.

Customizing Report

Before customizing the report, you need to first create a project on Ranorex tool and add some recording module into it.  Once you have created the project and recorded the module, you need to follow the steps mentioned below.

  1. Open the suite (.rxtst) file and drag the entire recorded module into it.

Open the suite (.rxtst) file and drag the entire recorded module into it.

2. Configure the default reporting system in Ranorex: Right-click the ‘RanorexDemo-Test Suite > Global Parameters..’ and click the ‘Report’ tab.

Right-click the ‘RanorexDemo-Test Suite Global Parameters..’ and click the ‘Report’ tab.

3. Click the ‘Create Custom Template’ button. You can see that ‘.\NewCustomTemplate1\’ is displayed in the ‘Report Template Folder’ field.

‘Create Custom Template’ button. You can see that ‘.\NewCustomTemplate1\’ is displayed in the ‘Report Template Folder’ field.

4. You can find the ‘NewCustomTemplate1’ directory in your project folder. If you open the ‘NewCustomTemplate1’ directory, you can see a few important files which will be used during customization.

RanorexReport1.css

RanorexReport.png

RanorexReport.xsl

View.rxlog

View.rxlog.data

5. Run the suite file and see the default generated report.

Run the suite file and see the default generated report.

The above generated report doesn’t show the information related to browser, server, Java version, number of Passed/Failed/Skipped test cases in a tabular format.

So, in order to customize the Ranorex report, two files are very important: RanorexReport.xsl and View.rxlog.data. With the help of these two files, you will be able to customize the report. In the RanorexReport.xsl file, codes are written in the XSLT language. It fetches the data from the data file and displays in a visual format. In the View.rxlog.data, all the data related to execution are stored.

However, before you start customization, you should have adequate knowledge of the HTML and XSLT language.

Once you customize the report, you can see the changes you have made in the existing report. Some of the changes that can be done include the following.

Passed/Failed/Skipped test cases in detail with reason in a tabular format

You can customize the report as per your requirement. Some of them are discussed below.

  1. Show Pass/Fail/Skipped test cases into table format

If you want to show all the Passed/Failed/Skipped test cases in a tabular format, open the RanorexReport.xsl file and add a few lines of code in HTML format.

pen the RanorexReport.xsl file and add a few lines of code in HTML formatpen the RanorexReport.xsl file and add a few lines of code in HTML format

To show all failed scripts, you need to add the code mentioned below in the XSLT language in the same file.

To show all failed scripts, you need to add the code mentioned below in the XSLT language in the same file.

To show all skipped test cases, you need to add the code mentioned below in ‘.xsl’ file.

To show all skipped test cases, you need to add the code mentioned below in ‘.xsl’ file.

To show all passed test cases, you need to add the code mentioned below in ‘.xsl’ file.

To show all passed test cases, you need to add the code mentioned below in ‘.xsl’ file.

The above code will fetch the data from the ‘View.rxlog.data’ file and will show on the report.

The above code will fetch the data from the ‘View.rxlog.data’ file and will show on the report.2. Show Browser/Java/Build Version in the report

If you want to show Browser/Java or Build Version in your report, you need to add the below XSLT language code in ‘.xsl’ file.

add the below XSLT language code in ‘.xsl’ file.

The above code will fetch the data from the ‘.data’ file.

image0123. Create ‘Test Run Summary’ table and show total number of Passed/Failed/Skipped test cases in the report

If you want to show total number of Passed/Failed/Skipped test cases, you need to add the below XSLT language code in ‘.xsl’ file. It will fetch the number of counts from the ‘.data’ file and will show in the report.

image013

Below is the ‘.data’ file.

image014

SHARE THIS

Get A Free Quote

One thought on “How to Customize Report of Ranorex Tool?

  1. Hello,

    can you send me please the line 13 in the seconde pic ?

    when you wrote
    td width=”30%”><xsl:value-of select=" … ?
    I need this part please.
    paul
    paul

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.