Exforsys
+ Reply to Thread
Results 1 to 3 of 3

QTP- import Sheet - Data table

This is a discussion on QTP- import Sheet - Data table within the Software Testing forums, part of the Testing category; Hi all I have recorded few application actions and i parametrised that action by using ddt functionality in QTP,data table ...

  1. #1
    lalithambigi is offline Junior Member Array
    Join Date
    Mar 2009
    Answers
    6

    QTP- import Sheet - Data table

    Hi all

    I have recorded few application actions and i parametrised that action by using ddt functionality in QTP,data table is .xls which i will import from my local machine while executing script.

    while executing that scripts, always script is taking first row details only, but no.of itration are same as no.of rows which i have mentioned in data table.

    for example:
    I have mentioned data in three rows
    i.e one row will cover one scenario,second row will cover second scenario and third row for third scenario

    but my script is executing three times with first row data only, it is not taking second and third row data.

    pls advice whate could be the reason.


  2. #2
    ramana028 is offline Junior Member Array
    Join Date
    Mar 2009
    Answers
    2
    Quote Originally Posted by lalithambigi View Post
    Hi all

    I have recorded few application actions and i parametrised that action by using ddt functionality in QTP,data table is .xls which i will import from my local machine while executing script.

    while executing that scripts, always script is taking first row details only, but no.of itration are same as no.of rows which i have mentioned in data table.

    for example:
    I have mentioned data in three rows
    i.e one row will cover one scenario,second row will cover second scenario and third row for third scenario

    but my script is executing three times with first row data only, it is not taking second and third row data.

    pls advice whate could be the reason.

    Hear 1st check run time settings
    then check Data table column name


  3. #3
    basanth27 is offline Junior Member Array
    Join Date
    Jul 2009
    Answers
    12
    Quote Originally Posted by lalithambigi View Post
    Hi all

    I have recorded few application actions and i parametrised that action by using ddt functionality in QTP,data table is .xls which i will import from my local machine while executing script.

    while executing that scripts, always script is taking first row details only, but no.of itration are same as no.of rows which i have mentioned in data table.

    for example:
    I have mentioned data in three rows
    i.e one row will cover one scenario,second row will cover second scenario and third row for third scenario

    but my script is executing three times with first row data only, it is not taking second and third row data.

    pls advice whate could be the reason.
    Go to Test Settings -> Run- > check if the Datatable run iterations are set to run on one row only.

    How are you programming it ?? You may need to follow something like this,

    rowcount = Datatable.Getrowcount

    For i = 1 to rowcount
    Datatable.SetCurrentrow(i)
    write your code..
    Next

    If you dont use Setcurrentrow and you have data in the subsequent rows then it will not execute according to your requriemnt.


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...