Welcome to the Ranorex Support Portal

Run a data-driven test

Now that we’ve finished our data-driven test, we can run it. This works the same as for other tests.

Note Icon

Screencast

The screencast “running a data-driven test” walks you through the information found in this chapter:

Watch the screencast now

Download the sample solution


This is the completed sample solution with all the instructions of the previous chapters carried out and ready to run.

Download

Sample Solution


Theme: Run a data-driven test
Time: 5 minutes

Download sample file

Install the sample solution:

  1. Unzip to any folder on your computer

  2. Start Ranorex Studio and open the solution file RxDatabase.rxsln

Note Icon

Hint

The sample solution is available for Ranorex versions 8.0 or higher. You must agree to the automatic solution upgrade for versions 8.2 and higher.

Run the test


  1. Check if all variables are bound correctly.

  2. Click RUN

Result

Once the test has finished, the report appears. The rows of the data-driven test case are shown in the results.

Result details for a data-driven test

When we take a more detailed look at the test case, we see that it was iterated once for each data row. So, in total, the test case was run 8 times.
The details for each iteration also show the current variable values for this iteration.

Download

Further Reading


Reporting is explained in detail in Ranorex Studio fundamentals ⇢ Reporting

Microsoft Excel-free test execution on runtime machines


If you want to execute a data-driven test that uses Excel connectors in a ⇢ Runtime or Remote Environment or in the Test Suite Runner, the target machine does not need to have an Excel license installed.

Simply install the Microsoft Access Database Engine >= 2013 on the target machine and you can run the test.

You can also view Excel data sources, but you have to select Auto-range or specify a range manually when creating the respective Excel data connector. Editing Excel data sources still requires MS Excel.

You can configure the behavior of the Excel-free execution implementation in the solution settings file.

  1. In the projects view, open the solution settings file.

  1. Locate the setting <Testing.Data.ExcelDataLoadingPreference>

3

Enter one of four options (all are entered in the image for illustration purposes):

a

PreferExcel: Default. Uses Excel if available, else uses AceOleDb (the free database engine). Test fails if neither is available.

b

PreferAceOleDb:Uses AceOleDb if available, else uses Excel. Test fails if neither is available.

c

RequireExcel: Uses Excel only. Test fails if it isn’t available.

d

RequireAceOleDb: Uses AceOleDb only. Test fails if it isn’t available.

USERS LOVE US

SUBSCRIBE TO OUR NEWSLETTER

Get the latest test automation information right in your mailbox.

FOLLOW US

© 2024 Ranorex GmbH. All Rights Reserved