RFT Data Driven Test
Data Driven Test
Data-driven testing is useful when tests:
a. Can separate test steps from input data
b. Must be repeated many times using different data each time
For example, create a data-driven test to:
Test the boundaries of a quantity field in an online retail application
Test variable length data in a text input field
Test the order total functionality of a retail cash register
Datapools
A Datapool:
1. Is a collection of related data records
2. Supplies data values to the variables in a test script during script playback
3. Automatically provides a different set of test data each time you play back a test
In Functional tester:
1. Datapools can be created while recording a script
Import existing datapools
2. Edit the created datapools within Functional Tester
3. Export and edit datapools
4. Share a datapool with multiple test scripts
Creating a Data-Driven Test
Changing a Verification Point Reference to a Datapool
When recording a verification point, Functional tester captures object information and literal values from the AUT and stores it as a baseline for comparison during playback. However, a verification point baseline can be changed from a literal value to a datapool reference. Then, when the script plays back, the verification point references the datapool and uses the variable data as the base line for comparison.
Importing Datapools
Functional Tester allows importing an external datapool and use it to drive a test script. The data can be imported from:
1. An external spreadsheet (.csv file)
2. Another Functional Test datapool
3. An existing IBM Rational Test Manager datapool
4. To import data from a Test Manager datapool, the Functional Tester project must be associated with the Rational project that contains the datastore
Exporting a Datapool
A Datapool from a Functional Tester project can be Exported to a .csv file
Exporting a datapool allows to:
1. Add data to the datapool using an external application
2. Use the datapool in a different Functional Tester project
Running a Data-Driven Test
When playing back the script, set the datapool iteration count. Each time the script runs, it pulls a different record from the datapool. When a particular count or select Iterate Until Done is specified, it means that the script will run once for each record in the datapool.
Data-Driven Testing Scenarios
Scenario 1
Create a datapool when recording a data-driven script within Functional Tester and then modify the datapool within Functional Tester.
Scenario 2
Import an externally created datapool into Functional Tester and then associate it with a a data-driven test script.
Scenario 3
Create a datapool when recording a data-driven script within Functional Tester. Export the datapool and edit it externally. Import the edited datapool to drive a test script.
Creating a Data-Driven Test Script and Datapool
To record a data-driven script and create a datapool:
1. Begin recording a script
2. Insert data-driven commands into the script
3. Edit data-driven commands
4. Insert verification points and have them reference of the Datapool
5. When recording is finished, edit the datapool
Importing and Exporting Datapool
To import an external datapool and associate it with
a test script:
1. Import the external datapool into Functional Tester
2. Check that the datapool imported correctly
3. Edit the datapool variable row to have meaningful variable names
4. Associate the datapool with an existing script or record a script and associate the datapool with it
5. Edit verification points to reference variable data in the
Datapool
6. Find and replace literal values in the script with variables
7. Play back the script to test the datapool
8. During play back of the test script, set the number of
iterations
Exporting, Editing, and Importing a Datapool
1. In this round-trip scenario:
2. Record a data-driven test script with a datapool
3. Export the datapool (.csv file)
4. Edit the datapool in an external application
5. Import the edited datapool into the project
6. Associate the datapool with a new test script
7. Add data-driven commands to the new test script
8. Play back the script to test the datapool
You Should Also Check Out This Post:
- Specific Field Tests
- Screen Validation Checklist-Navigation and Data Integrity Conditions
- Screen Validation Checklist-General Conditions
- Screen Validation Checklist - Validation and Navigation Conditions
- Screen Validation Checklist - Aesthetic conditions








This is quite precise article