Hello, Can anyone kindly explain me how to use a datapool in rational testmanager. I created a datapool, e.g a datapool of 1 column for entering 5 strings one after the other in an edit box. The problem is that I cannot retrieve the strings from the datapool. Please explain it by an example.Thanks in advance

Showing Answers 1 - 7 of 7 Answers

Rathi Praba

  • Apr 19th, 2006
 

Using rational test manager, datapool should be created and save it some name under repository of ur project.
Then access the values in datapool one by one using for loop.
For datapool there is one header file called sqlutil.h, include in ur test script, use commands like datapoolopen, datapoolfetch, datapoolvalue, datapoolclose.
 

  Was this answer useful?  Yes

diwaker srivastava

  • May 23rd, 2007
 

in this script note0 is datapool file . datapool file contain two fields
filename and desc and have 3 records'


'$include "sqautil.sbh"


Sub Main
    Dim Result As Integer
    dim dp,i,fn,ds

    'Initially Recorded: 5/22/2007  9:02:07 AM
    'Script Name: wordpad0

dp = SQADatapoolOpen ("note0", FALSE,SQA_DP_SEQUENTIAL, FALSE)
   
   
 for i = 0 to 3
 
 sqadatapoolfetch(dp)
 call sqadatapoolvalue(dp,"filename",fn)
 call sqadatapoolvalue(dp,"desc",ds)
    
    Window SetContext, "Class=Shell_TrayWnd", ""
    PushButton Click, "Text=Start"
   
    Window SetContext, "Class=BaseBar", ""
    Toolbar Click, "ObjectIndex=2;;ItemID=401", "Coords=70,25"
   
    Window SetContext, "Caption=Run", ""
    InputKeys "{BKSP}wordpad{ENTER}"
   
    Window SetContext, "Caption=Document - WordPad", ""
    InputKeys ds
    Toolbar Click, "Text=Standard;;ItemID=57603", "Coords=19,9"
   
    Window SetContext, "Caption=Save As", ""
    Toolbar Click, "ObjectIndex=2;;ItemID=41061", "Coords=39,26"
    InputKeys fn
  
    Window SetContext, "Caption={*}", ""
    Toolbar Click, "Text=Standard;;ItemID=57603", "Coords=16,19"
    MenuSelect "File->Exit"

next i
   
End Sub

  Was this answer useful?  Yes

vaishali

  • Oct 24th, 2007
 

hi

we use datapool option to test any field wid multiple values.
like if we want to test the password field in login form for that :-

in script write as:-
---------------------
dim dp as long
dim i as integer
dim temp as string
dp=sqadatapoolopen("datapool name")
for i=1 to 5
call sqadatapoolopen(dp)

in ur script before sub main include statement as:-
--------------------------------------------------------------
'$include"sqautil.sbh"

in ur script u wil b havin some input keys before dat insert this line:-
------------------------------------------------------------------------------------
call sqadatapoolvalue(dp,"pwd",temp)
msgbox  temp
inputkeys "temp"



  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions