Usage of Data pool in IBM Rational Quality Manager offers certain specific features for test data, which in turn helps to manage data in a much more effective way.
In my previous IBM Rational Quality Manager tutorial, we came to know how the tool can be used for day to day test management activities including manual testing.
In this tutorial, we will learn how manual testing feature can be extended to use Test Data feature using data pools. Test data is all about using multiple values which will act as input to the test script during its execution.
What You Will Learn:
- Test Data Management Using Data Pool feature
- Creating Test Data in IBM Rational Quality Manager
- Import Test Data into IBM Rational Quality Manager
- Associate the Test Data with IBM Rational Quality Manager Test Script
- Execute the IBM Rational Quality Manager Test Script with Test Data
- Viewing Execution Results in IBM Rational Quality Manager
- Recommended Reading
Test Data Management Using Data Pool feature
For this tutorial, I have used IBM Rational Quality Manager version 6.0.2 which is a part of IBM Rational CLM (Collaborative Life Cycle Management).
For example, let us consider the test case which was created already Test Case for Purchase of Music CD Online.
(Note: Click on any image for an enlarged view)
Let us take a look at the test script created for the above test case. Click the Test Scripts section on the left side to view the test scripts. And click on it to open the same.
Consider the manual test script as shown here.
Take a look at step 4 and 5. The Name and Credit card number is hardcoded. If we need to run the above script for multiple customer names and credit card numbers then we need to use test data management using data pools which is clearly described in this tutorial.
Creating Test Data in IBM Rational Quality Manager
In order to create Test Data, we need to create a CSV file containing multiple Customer names and Credit card numbers as shown below. The CSV file contains 2 columns.
So in the CSV file, we have to create 2 fields to hold the Customer Name and Credit Card Number as String and Number type.
Now, we need to import the Test Data created above into IBM Rational Quality Manager and link it to the manual script which is shown above. Since there are 2 entries in the CSV file for test data, it will run as 2 iterations when the manual test script runs.
Import Test Data into IBM Rational Quality Manager
To import the above test data in RQM go to Construction => Create => Test Data
Enter a name, browse under the Data File section and select the CSV file created. Save the changes accordingly.
The Data Records section shows the content of the CSV file after it is imported. As per the CSV file, it clearly shows the value of 2 records.
Associate the Test Data with IBM Rational Quality Manager Test Script
In order to associate the test data with IBM Rational Quality Manager test script, open the manual test script and click on the Edit button for Test Data as shown below.
The Test Data imported is shown. Select the same, click OK and then Save the changes.
As in step 4, we have the Customer Name hardcoded, hence we will replace it with the Customer Name column from the CSV file. In step 5 we had the Credit Card number hardcoded, hence we will replace it with the Credit Card number from the CSV file.
In step4 highlight the Name (Niranjan V) and select the option ‘Insert Test Data Column’.
In the resulting screen select the column Customer Name and click on Insert Test Data Column.
The Name (Niranjan V) is now replaced with the column name from test data which is the Customer’s Name
Similarly, highlight the Credit Card number and Insert Test Data Column for the value highlighted.
In the resulting screen select the column ‘Credit Card Number’ and click on Insert Test Data Column.
The credit card value is now replaced with the column name from test data which is the Credit Card Number.
Remember to Save the changes accordingly. The final screen now looks as shown below.
Execute the IBM Rational Quality Manager Test Script with Test Data
#1) To execute the Manual script with test data go to Construction => Browse => Test Cases
#2) Go to the Test Scripts section
#3) Select the Test Script and click on Run as shown below
#4) In the Run Test Case screen which comes up, ensure that the Test Script selected has the test data associated with it and then click on Finish to begin the execution.
#5) The execution screen now shows the first data for Customer Name and Credit Card number. The screen also shows it is executing for Iteration 1.
#6) Click on the Start link to begin the execution
#7) Click on Pass for every step. Meanwhile, you can record the Actual Results out of the execution. Remember you can also associate the steps to an existing defect or create a new defect.
#8) Once all the steps have finished its execution, you can see that the screen now moves to Iteration 2 and has loaded the second data.
#9) Complete the execution. Click on Pass for every step and select Show Result.
#10) The Summary report will show you the results separately for Iteration 1 and 2.
Viewing Execution Results in IBM Rational Quality Manager
To view the execution results at a later time go to Execution => Test Case Results
Click on the first result which is the latest and you can see the execution results of the Test Script.
The above screen shows execution results for both the iterations.
Now through this tutorial, you must have known the use of data pools from the point of view of using multiple values as input to one single script.
To summarize we have seen the following:
- How test script can actually be reused to test data containing multiple values. You need not create multiple test scripts for every value.
- To create test data using CSV files and import test data into RQM
- Associate test data values within the test script
- Execute test scripts containing the test data
- Viewing execution results for all the values in the test data
Let us know your thoughts/suggestions in the comments section below.