Automated testing is about running a defined software test with different user data in many iterations and with varied conditions. To do so it is necessary to combine one defined test case with a set of test-data which create the different test case iterations. The underlying principle is called data-driven testing. In this topic, every necessary information with respect to data-driven testing is introduced and demonstrated by examples.
In this chapter
The concept of data-driven testing is explained with an example solution. This solution can be downloaded here. The solution is prepared to be extended simultaneously to the explanations and instructions of the chapter ‘Data-driven testing’ in this user guide. A complete and finished solution can be downloaded, too. The corresponding link can be found at the end of the last chapter.
Unzip the project directory to any folder on your computer
Start Ranorex Studio and open the solution file
The sample solution is available for Ranorex versions 8.0 or higher. You need to agree to the automatic solution upgrade for versions 8.2 and higher.
Concept of data-driven testing
The below-presented process scheme visualizes the flow of data and the necessary process steps.
Data-driven testing process scheme
The various options for building test cases are introduced and explained in the fundamentals section of this user guide. If you are not familiar with working with Ranorex Studio, recording a test, structuring recording modules, modularizing recordings and building test cases within a Ranorex test suite, we recommend you start reading there.
Creating test data is a central process of data-driven testing. The options of how to build test data are being introduced in a further introduction to this chapter.
Variables & parameter
The concept of variables & parameter link test data to a defined test case of Ranorex Studio and enables data-driven testing. Variables & parameter are a fundamental concept with respect to data-driven testing. This concept needs to be understood along with the method of data-driven testing. If you are not familiar with how to define, use and apply variables in Ranorex Studio, we recommend you refer to the corresponding chapter of the user guide.
Automated test validation
The key principle of data-driven testing is to constantly verify if the expected test results, based upon test data match to the actual test results, being created during the automated test run(s). This important concept is being introduced and explained during the further sections of this chapter.