Micro Focus QTP (UFT) Forums
QTP not performing iterations based on local data sheet - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: QTP not performing iterations based on local data sheet (/Thread-QTP-not-performing-iterations-based-on-local-data-sheet)

Pages: 1 2


RE: QTP not performing iterations based on local data sheet - ravi.gajul - 04-09-2013

Go to File->Settings->Run and select "Run on all rows" radio button. This is the default setting though.


RE: QTP not performing iterations based on local data sheet - mridul - 04-09-2013

hi Ravi,
this is just a query related to the global sheet.
I have given three sets of data in the global sheet for which I need the flight application to launch with the credentials and then exit and the same action should repeat for 3 times. But when I run that the script just gets executed once.
If the test runs in accordance to the number of rows in the Global Sheet then why did the test run only for 1 row?


RE: QTP not performing iterations based on local data sheet - ravi.gajul - 04-10-2013

It runs according to the number of active rows because the default setting is "run on all rows".
It will not run for all rows if the default setting is altered though you have other rows active.In your case, it is probably set to "run one iteration only".Please keep me posted if it is not clear yet.


RE: QTP not performing iterations based on local data sheet - mridul - 04-10-2013

hi Ravi,
Thanks for the reply.
I changed the settings and made it to run on all rows. then also it is not getting executed for 3 times.
do I need to change any more settings?

Thanks,
Mridul


RE: QTP not performing iterations based on local data sheet - ravi.gajul - 04-10-2013

Could you please click on view-->Test Flow and let me know how many actions you see there? If there is more than one action, right click on the action where your code is written --->click "Action call properties" and then select "Run on all iterations" radio button.
If this doesn't help,Please attach a screen shot showing the qtp tool with test flow panel and code


RE: QTP not performing iterations based on local data sheet - vinod123 - 11-05-2014

Instead of using the statements from recording and parameterizing them we can use descriptive programming statements
Eg :-
Code:
Browser("micclass:=Browser").Page("micclass:=Page").WebEdit("name:=username").Set DataTable("username", Action1)
Here username between double quotes is column name of the Local data sheet of the datatable


RE: QTP not performing iterations based on local data sheet - vinod123 - 11-09-2015

Code:
DataTable.ImportSheet "C:\book.xls", "Sheet name"



RE: QTP not performing iterations based on local data sheet - arunshuklainbox - 01-25-2016

Hi Mridul,

Select Test Settings->Run->Run on all rows

Thanks,
Arun


RE: QTP not performing iterations based on local data sheet - arunshuklainbox - 01-25-2016

Hi Mridul,

If you have already tried the above suggested "Run on all Rows" option. Please try below code . it should work.
Code:
iCounter=dataTable.getsheet("Action1").getrowcount
for i=1 to iCounter
  DataTable.setcurrentRow(i)
  RunAction "ActionName",oneIteration
next

Thanks,
Arun