Explain the planning and creating datapool with an example?



Explain the planning and creating datapool with an example?..

Answer / 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

More Rational TestSuite Interview Questions

Symbol for comments in Rational?

1 Answers   GE,


What is datapool cursor?

0 Answers  


hi i did MBA(HR)from IGNOU, NEW DELHI. can any please tell me that is testing is helpful my career?

5 Answers  


What is the purpose of .sbl, .sbh, .rec files?

1 Answers  


pls can any one tell about the institutes available in hyderabad to learn RTRT(Rational Test Real Time).its urgent Thanks in advance

1 Answers  






Could any one share scripts... where we can Parameterize radio buttons and Check boxes.

0 Answers  


Explain Robot?s command line options?

0 Answers  


For distributed functional testing what do we require in test manager? a. Test Agent b. Test Monitor c. Test Executer d. Test Mentor

2 Answers  


How do you analyze results after playback?

2 Answers  


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....

0 Answers   IBM,


Explain user defined data type with an example..?

1 Answers  


If we write a scipt for login page and we click submit button then it moves to order page ... How we can validate once we click the submit button it opens wether order page or not

0 Answers   IBM,


Categories