Explain the planning and creating datapool with an example?

Answer Posted / biju

A datapool is a test dataset that supplies data variables
in a test script during playback. Using datapools allows
you to run multiple iterations of a script using different
data each time.

Sub Main
Dim Result As Integer -> Header file

'Initially Recorded: 9/22/01 12:45:07 PM
'Script Name: Classics Place an Order Datapool


Dim x As Integer 'variable for loop
Dim dp As Long 'variable for datapool
Dim quantity, expdate As String 'variables for fields


dp=SQADatapoolOpen("Order CD") -> Open the Data Pool


For x = 1 to 10 -> Start of loop

Call SQADatapoolFetch(dp) ->fetch a row from the data pool

Window SetContext, "Name=frmMain", ""
PushButton Click, "Name=cmdOrder"
'Result = WindowVP
(CompareProperties, "Name=frmOrder", "VP=Object Properties
1")

Window SetContext, "Name=frmOrder", ""
EditBox Click, "Name=txtQuantity", "Coords=84,8"

'Quantity data
Call SQADatapoolValue(dp,1,quantity)
InputKeys "{HOME}+{END}{DELETE}” &quantity
EditBox Click, "Name=txtCreditCard", "Coords=9,6"
InputKeys "{HOME}+{END}{DELETE}1234 1234 1234 1234"
EditBox Click, "Name=txtExpirationDate", "Coords=14,11"

'Expiration date data
Call SQADatapoolValue(dp,2,expdate)
InputKeys "{HOME}+{END}{DELETE}"&expdate

Result = ComboBoxVP
(CompareData, "Name=comboCardType", "VP=Object Data 1")

PushButton Click, "Name=cmdOrder"
Window SetContext, "Name=frmConfirm", ""
PushButton Click, "Name=cmdOK"

Next x
Call SQADatapoolClose(dp)


End Sub

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is responsibilities of the Rational Robot

1726


Where do you view the results in Trap option?

1693


What are the different data pool access orders?

1792


Where the datapool values are stored?

1938


For unattended execution which playback options you will use?

623






If we write the script for login page and click on submit boutton then it opens order page...How we can validate that opened page is wether orderpage or not?

1823


What is the purpose of inserting delay values in the scripts of rational?

581


How to get the OR SAP discriptive program by using RFT.

2703


How we write a java script using RFT for the below scenario iam having dropdown list COUNTRY(it contains india,us,uk...) once we select the india in that list it will open the corresponding states in STATES dropdown list. i would like to change those values dynamically... can u pls send me the coding....

2576


What is standard data type and what is user defined data type?

1804


How to analyze results after playback?

653


What is the purpose of the Trap options?

1695


Explain Robot?s command line options?

1840


Hi this is chandra if any one have Navigation of LAB RATIONAL ROBOT I want Navigation of those tools, if any one have the and know the Navigation each and every part of the Rational Robot and plz send me my mail naruboinac@yahoo. com,naruboinas@ gmail.com

1570


I wanna to learn RFT can anyone send me the learning material including demo. I am working on mainframe based project using RFT, but don't have that much knowledge of java scripts so need to learn.

2332