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

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

What is the purpose of the wait state?

2 Answers  

How do you insert Log Messages and delay values in scripts?

1 Answers  

What information is contained in the Datapool_config section?

1 Answers  

Explain user defined data type with an example..?

1 Answers  

Explain what kind of problems are solved by datapools?

0 Answers  

What is the use of Global.sbl file in Rational?

2 Answers   Satyam,

Where the datapool values are stored?

2 Answers  

Where do you view the results in Trap option?

0 Answers   Accenture,

Which of these is not a kind of report in Rational Test Manager a. Performance Report b. Build Listing Report c. Test Plan Report d. Test Case Report

0 Answers  

How will you test Java Applications and what settings you need to do?

1 Answers  

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

0 Answers  

How can I date change in tally whenever new voucher entery. When I press F2 I can change the date only 1,2&31. When I feed other dates like 12,15,17, 21 etc. not changed. Please tell me how can I change the all voucher dates.

0 Answers