Create a data-driven functional test
In this tutorial, you will learn how to data-drive a test using a variety of realistic data to test the application with Rational® Functional Tester data-driver wizard.
Data-driven testing puts a layer of abstraction between the data and the test script, eliminating literal values in the test script. Because data is separated from the test script, you can:
- Modify test data without affecting the test script
- Add new test cases by modifying the data, not the test script
- Share the test data with many test scripts
A dataset is a collection of related data records. A dataset supplies data values to the variables in a test script during test script playback. Data-driven testing uses data from an external file, a dataset, as input to a test.
The diagram on the left shows a test script, which uses data with hard-coded, literal references in the test script. The diagram on the right shows a data-driven test script that uses data from an external file, a dataset.
Hard-coded test script | Data-driven test script |
About the sample application -- Classics CD
You will use the ClassicsCD sample application to create a project and record a test script to verify that the ClassicsCD sample application correctly totals an order placed in the application. You will also create a verification point with a dataset reference to check that the total amount of the order is correct in the Classics CD application.
Learning objectives
This tutorial is divided into several lessons that must be completed in sequence for the tutorial to work properly.
While completing the lessons, you will:
- Create a project and record a test script
- Data-drive a test
- Add descriptive headings to the data
- Create a verification point with a dataset reference
- Add data to the dataset
- Play back the test
Time required
This tutorial should take approximately 30 minutes to finish. If you explore other concepts related to this tutorial, it could take longer to complete.
Advance to Lesson 1: Create a project and record a test script.