SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jun 2006
    Posts
    155
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Script Reusability & Parameterise values-each run

    Hi, Did any one has come across to do this scenario:
    1. I have a "Login" Function having userName and Password as two parameters.
    2. My Excel Sheet in the drive has an information on UserName and Password.

    Now, how can i loop the same "Login" script to run using all the userNames and Passwords in One Go.

    Going through the Project Test Items, this allows me to run the same script for n number of times(i.e, Count), but doesn't allow me to pass the different parameter values at the same time.

    I appreciate any suggestions.
    Thanks
    - One thing you can't recycle is wasted time -

  2. #2
    Member
    Join Date
    Oct 2009
    Location
    Dallas, TX, USA
    Posts
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Script Reusability & Parameterise values-each run

    Just read the usernames and passwords from the excel sheet into an array. The script can then cycle through the array for each user/pwd.

    JamesK

  3. #3
    Member
    Join Date
    Jun 2006
    Posts
    155
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Script Reusability & Parameterise values-each run

    Thanks James. But i don't like to use this way. This involves two functions one as to read the data from Excel and store the array values and another to loop and drive the values in to called function.

    Does TC has any option to connect to system files (Excel, txt) and drive me through the specified number of lines?
    Thanks
    - One thing you can't recycle is wasted time -

  4. #4
    Member
    Join Date
    Oct 2009
    Location
    Dallas, TX, USA
    Posts
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Script Reusability & Parameterise values-each run

    To add one more suggestion:

    aqFile can be used to point to a specific file, and then you can read a line at a time while checking for end of file.

    TC Help Index have very good info/exmaple for aqFile and other options that you can do/perform with a txt file.

    JamesK

  5. #5
    Member
    Join Date
    Jan 2005
    Location
    Beijing, China
    Posts
    58
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Script Reusability & Parameterise values-each run

    Why you don't use normal DDT in TC? Use Data-Driven you can easily to control hundreds of thousands parameters just use the same script.
    <font color="red">How to Test,it's a question</font>

  6. #6
    Member
    Join Date
    Jun 2006
    Posts
    155
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Script Reusability & Parameterise values-each run

    Thanks for your support. Using DDT and conditional loop has solved this.
    Thanks
    - One thing you can't recycle is wasted time -

 

 

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.71%
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 11:14 AM.

Copyright BetaSoft Inc.