SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Oct 2008
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    RFT-Datapool Iteration

    Hi,

    I am new to this forums, can anyone help me with this please

    I am using Rational Functional Tester v7. I have problem with using the data in the Datapool.I have different scenarios to run one after the other and I have to use a common script, the script has the datapool init and what i am trying to do is, for each scenario the data should pickup a new row from the datapool.

    Example:
    Scenario 1 - Creating a Cash Account for a customer
    callScript("Login");
    callScript("CreateCustomer");
    callScript("Create_Cash_Account");
    Scenario 2 - Creating a Credit Account for a customer
    callScript("Login");
    callScript("CreateCustomer");
    callScript("Create_Credit_Account");
    Scenario 3 - Creating a Finance Account for a customer
    callScript("Login");
    callScript("CreateCustomer");
    callScript("Create_Finance_Account");

    I have to run the above 3 scenarios at a time so that it creates 3 accounts one after the other in single run
    All the above scenarios have one script in common - "CreateCustomer" which has a datapool which holds the customer information.
    Every time i run the script after finishing the scenario 1, for the second scenario it starts picking the 1 row of the datapool again.
    Can anyone please let me know how to resolve this, how can i increment the row every time it runs. Is there any code to insert in the script?

    Thanks in advance
    Santosh.

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    Bloomington, IL
    Posts
    300
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: RFT-Datapool Iteration

    Hi,I also struck up here. Can anyone please hlep us?

    I am trying to parameterize the const with variable, and want to pass the value from data pool. But i dont know how to initialize variable to data pool value? how to iterate from one record to next?

    Thanks,
    Ashok

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

    Re: RFT-Datapool Iteration

    U can use dpString("Variable") method to get the value from the Datapool.

    here Variable refers to the Column name in the datapool.

    To iterate multiple times U can write script as below example:

    while(!dpDone())
    {
    String a = dpString("variable");

    dpNext();

    }

    Do the modification to the above Loop as per ur requirement.

    Hope it solve ur problem
    Santhosh R

  4. #4
    Junior Member
    Join Date
    Jul 2011
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: RFT-Datapool Iteration

    I have a similar problem. I have one shell script that calls a bunch of scripts that verify account data. Example:

    callScript("Login");
    callScript("accountxxxxx"); (I want this to correspond to row 1 in the datapool)
    callScript("accountxxxxy"); (I want this to correspond to row 2 in the datapool).
    .
    .
    . etc

    How do I make it so I have one datapool that has the list of all accounts and when I run the shell script, it will go through each row in the datapool (basically each row in the datapool corresponds to one script "accountxxxxx" for example). Currently I have the account number hard coded into the actual script being called. I want to remove that.

  5. #5
    Member
    Join Date
    Jul 2009
    Location
    Hyderabad,INDIA
    Posts
    382
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: RFT-Datapool Iteration

    Hi,

    Implement the logic like this.

    1) Get the datapool of the CreateCustomer script.
    2) Store this datapool to a global datapool variable, you have to create one.
    3) write the piece of code to read the data of datapool using datapool iterator, store this datapool iterator as a global variable.
    4) In the reading code of the datapool make sure that you have moved to the next record by using dpNext() command on the iterator.
    5)When you move on to the next scenario , check the Global Datapool variable whether it is already loaded or not, as you have already loaded the datapool and initialized the iterator on that datapool again no need of getting the datapool and creating the iterator on the same.
    6) As you have used dpNext() in read code you will get the next record values when you move on to the next scenario.

    Hope this helps you!!
    Thanks and Regards,
    Sathish

  6. #6
    Junior Member
    Join Date
    Nov 2011
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: RFT-Datapool Iteration

    Hi..
    I have a similar scenario, it is like this...
    The app i am testing and the datapool structure assosciated with my script same .

    it is a table structure with 10 rows n 7 columns.

    so, i read the 1st column values row-wise in my app and check whether that value is present in my datapool.if yes, the i have to c if the other column values of that row in my app are same as that of my data pool..

    how do i do this?
    plz help...

 

 

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 8.82%
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 01:54 AM.

Copyright BetaSoft Inc.