Micro Focus QTP (UFT) Forums
Test settings RUN options - 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: Test settings RUN options (/Thread-Test-settings-RUN-options)



Test settings RUN options - vasu_tj3 - 02-06-2008

Hi All,

Code:
Dim name(2)
For i =0 to UBound(name)
    name(i)=  DataTable("val", dtGlobalSheet)
    msgbox(name(i))
    datatable.SetNextRow
Next
I have entered 3 values in global sheet.

If i set Run on all Rows option O/P is
1st iteration 2nd Iteration 3rd Iteration
abc def ghi
def ghi abc
ghi abc def

If i set Run one iteration only O/P is
abc
def
ghi

I am not able to understand this O/P.I am using globalsheet data.Then why this test is running 3 times for run on all rows.

And if i remove datatable.setnextrow and run one iteration only o/p is
abc
abc
abc

for run on all rows o/p is
1st iteration 2nd iteration 3rd iteration
abc def ghi
abc def ghi
abc def ghi

As i know datatable.setnextrow is used only for localsheet data.

Can anyone please explain me
1)the difference between Run on all rows and Run one iteration only when using data in global sheet and action local sheet.
2)significance of datatable.setnextrow with globalsheet and actionsheet

Thank you.