Wednesday, March 30, 2011

Solution: QTP Script execution starts again after completion of all the data in the datatable

For example, if there are 3 rows in a Globalsheet, the script may execute for 3x3 = 9 iterations.

The solution:

This is a simple issue that most of the beginners face. By default QTP has a setting that lets the script to execute for every row on the global data sheet. To overcome the issue, following the below steps:

1) Click on File > Settings
2) Click on run tab
3) Select "Run one iteration only" option under, data table iterations
4) Click on "Apply"
5) Click on "Ok"

QTP Test Settings Run Data table iterations
QTP test settings : Run Tab (click on the image to enlarge)

2 comments:

  1. how do i do that scripting it inside the test in vbscript? is there something like this but running it from qtp?

    ' set run settings for the test
    Set qtTest = qtApp.Test
    qtTest.Settings.Run.IterationMode = "OneIteration" ' Run only 1 iteration
    qtTest.Settings.Run.OnError = "NextStep" ' Instruct QuickTest to perform next step when error occurs

    ReplyDelete
    Replies
    1. All settings within QTP can be controlled through VBScripts.... anything .....

      Delete

Please leave your comment here...