If you use the “Data Pattern” feature, it will allow you to iteratively run a single test script with different input data patterns. In other words, you can perform “Data-driven testing.”
Table of contents
Set up data pattern
Choose “Set up data pattern” from the Edit test menu on the Edit test case screen (Figure 1)
Figure 1 Data pattern setup
And define the variable names and data patterns in the displayed dialog. For example, in Figure 2, two data patterns are defined for the variables UNAME and GENDER. After defining the pattern, click the “OK” button and save the edited content.
Figure 2 Data pattern definition
Next, create an execution script. Within the script, you can reference the data pattern variables using the format ${UNAME} or ${GENDER}. (Figure 3)
Figure 3 Script to reference data pattern variables
Run a test and check the result
If you run the created test, you can see that the test is iteratively run for each data pattern. On the test result list screen, as shown in Figure 4, you can see a breakdown of the number of successes and failures for all data patterns, whereas on the test results details screen, as shown in Figure 5, you can see the test results for each data pattern.
Figure 4 Test Results List Screen
Figure 5 Test Results Details Screen
Use CSV format
If you have many data patterns, CSV files are easier to set up.
Click on the "︙" button in the upper right corner, then click on "Upload CSV" to set up the file.
In this case, the CSV file looks like the following, with "," separating each piece of data.
References