SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    Nov 2004
    Posts
    116
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    how to parameterize:data driven testing

    hi all,
    i am really struck at a point...i just wanted to know how do we parameterize a test...
    i have an .xsl file which has several columns of data and also thousands of rows for those data...it acts as a data for my application...out of those columns i need to retrive only a single column values (say telephone numbers) and it needs to b used in my test script....
    how do i parameterize it....i am making use of
    tools->data driver and the wizard asks me wether i need to add value /parameterize....i do parameterize....and the next steps r really confusing for me.....please can any one tell me the exact process and how do i fill up the data driver wizard....
    i am confused a bit...i really need to know it
    thanks

  2. #2
    Senior Member
    Join Date
    Nov 2004
    Posts
    116
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to parameterize:data driven testing

    hi ,
    and also please let me know how to remove a data table from the script if i dont need it for the time being...so that whenever i feel comfortable with the script i feel like adding it up again...
    thanks,

  3. #3
    Member
    Join Date
    Jul 2004
    Location
    Germany
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to parameterize:data driven testing

    Hi,

    I hope that I understand you in the right way. You just want to parmaterize the testskript with the entries of one column.
    You have to import the .xls file to the QTP data table. Then go to test step where you want the data inserted. Click in the value cell the parameterization icon <#> and a dialog box opens. There you define that QTP should pick the value of a parameter from the global sheet. Be sure that he references the right column. Then click OK and your test should be parameterized.

    Also take a look a the QTP Tutorial - Parameterizing Tests

  4. #4
    Senior Member
    Join Date
    Jun 2003
    Location
    Tampa, FL
    Posts
    372
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to parameterize:data driven testing

    Sivadeep -- First, I am making an educated guess that you have not had the training based on your question. If that is true, you really need to get it. To be this frustrated over one of the most basic operations of the tool is just an indicator of how your future will go. As a consultant, I see this all the time...and poor decisions made now from a lack of proper understanding will have far reaching long term implications.

    I would not recommend the Data Driving Wizard to anyone; I have always found it to be confusing and non-intuitive, and I have been using this tool for years.

    StudentFH's suggestion is much better; however, it assumes QTP 8.0. If you have 6.5, you will want to Right click on the tree step representing the data entry, and from the pop up menu, select Method Arguments; then, click the Paramter radio button, and set the column name for your data table.

    Good Luck,
    David

  5. #5
    Super Member
    Join Date
    Oct 2004
    Posts
    1,222
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to parameterize:data driven testing

    Sivadeep,

    Dude you need to read the help manuals. It's all so clearly given. Don't even bother with the Data Driving Wizard. Also, I'd recommend getting into the actual script (advanced view of QTP) rather than the Tree or Keyword view if you really want to be able to manipulate execution steps.

    You may be interested in looking up the following in the QTP help:
    ImportSheet, GetParameter, GetCurrentRow, SetNextRow, SET

    If you still don't get it let me know and I will send you a sample code block.
    (I'm hiring Software Development Engineers in Test in Seattle, WA)

  6. #6
    Senior Member
    Join Date
    Nov 2004
    Posts
    116
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to parameterize:data driven testing

    Hey Mark,
    what is happening is i am making use of the column values at 3-4 points in my script....hence its not able to substitute the values in every occurance..i tried everything...but not able to run the whole script even for a single iteration because of not substituting at several occurances.....please give me some hint and explanation with the help of some example...
    thanks

  7. #7
    Super Member
    Join Date
    Oct 2004
    Posts
    1,222
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to parameterize:data driven testing

    Siva,

    I am not very clear about your exact need. But here goes, if you have the same cell contents to be used at 3-4 different places in ur test then just make sure ur action is set to run for all rows (iterations). For each iteration, each reference to ur datatable column will point at just one row. You should not use SetCurrentRow in this case.

    If for each iteration you need to insert different cell contents in 3-4 places, you will need to know the exact location of the required cell and then keep referencing it programmatically. You will use SetCurrentRow for this.

    Lets say I have a column 'Description' in my DataTable with 3 rows having contents:

    Spoonfeeding Made
    Rudolph
    A red-nosed reindeer

    You have 3 webedit boxes where you want to insert the same content for each iteration. Set ur action to run for all iterations and simply use these kind of statements in ur code where appropriate:

    Browser("Xmas").Page("Xmas").WebEdit("action").Set DataTable("Description",dtLocalSheet) '... global if u are using global sheet
    Browser("Xmas").Page("Xmas").WebEdit("name").Set DataTable("Description",dtLocalSheet)
    Browser("Xmas").Page("Xmas").WebEdit("quality").Se t DataTable("Description",dtLocalSheet)

    --------------------
    This will insert "Spoonfeeding Made" in all the webedit boxes for ur 1st run.... "Rudolph" in all webedit boxes in the 2nd run...and so on....
    --------------------

    If u want "Spoonfeeding Made" in one webedit box, "Rudolph" in another and so on in the same action run....use
    --------------------
    DataTable.LocalSheet.SetCurrentRow (1)
    Browser("Xmas").Page("Xmas").WebEdit("action").Set DataTable("Description",dtLocalSheet)
    DataTable.LocalSheet.SetNextRow
    Browser("Xmas").Page("Xmas").WebEdit("name").Set DataTable("Description",dtLocalSheet)
    DataTable.LocalSheet.SetNextRow
    Browser("Xmas").Page("Xmas").WebEdit("quality").Se t DataTable("Description",dtLocalSheet)

    ----------------------
    You should prolly set the action to run for one iteration for the 2nd option depending on what exactly u wanna do.

    Hope that helps mate. Good Luck!
    (I'm hiring Software Development Engineers in Test in Seattle, WA)

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:32 AM.

Copyright BetaSoft Inc.