Now that your data-driven test is set up, you can run it like any other test. During execution, the test case runs once per data row, and the report shows each iteration with the variable values used.
This is the completed sample solution with all the instructions of the previous chapters carried out and ready to run.
Theme: Run a data-driven test
Time: 5 minutes
Install the sample solution
- Unzip to any folder on your computer
-
Start Ranorex Studio and open the solution file
RxDatabase.rxsln
Run the test
- Confirm a data source is assigned to the test case (you should see it next to the container in the test suite view).
- Select the test case and click RUN.
Result
After the run finishes, the report opens. The rows of the data-driven test case appear in the results.
Result details for a data-driven test
When you expand the test case, you can see it was iterated once per data row. In this sample, the test case runs 8 times, and each iteration shows the variable values used for that specific row.
How to read it: Expand the test case in the report to review each iteration and confirm the expected variable values were applied.
Microsoft Excel-free test execution on runtime machines
If your data-driven test uses Excel connectors and you want to run it in a Runtime or Remote Environment or with the Test Suite Runner, the target machine does not need Microsoft Excel installed.
Prerequisites
Simply install the Microsoft Access Database Engine >= 2013 on the target machine and you can run the test.
Excel connector
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.
Configure Excel-free loading behavior
You can configure the behavior of the Excel-free execution implementation in the solution settings file.
- In the Projects view, open the solution settings file.
- Locate the setting <Testing.Data.ExcelDataLoadingPreference>
- 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.