we are trying to use a database checkpoint in QTP to verify the values retreived from a query.
We find that QTP takes large time to complete the DB check point in case of large table, where as the same can be done quickly through manually.i mean the fetching the value formt he same table manually does not take so much time as QTP takes.
Please post any work around or steps to resolve this.
Are you using QTP 10, if so please use code sample plus and database functions.
[ QUOTE ]
Using Database Functions:-
The examples and the function library can be found in DatabaseFuncitonCollection.vbs file located in the <QuickTest installation folder>\CodeSamplesPlus folder.
I use the ADO Recordset object, it seems to be pretty quick response to me (provided the db is available)
Here's a query execution function:
Function DatabaseConnection (DSNName,Username,PassWord,QueryString)
Dim con, rs,strSQL
Set con=Createobject("ADODB.Connection") 'Creates the connection object
Set rs=Createobject("ADODB.recordset") 'Creates a resultset
rs.CursorLocation = 3
connSTR= "DSN="+DSNName+";UID="+Username+";password="+PassW ord+";" 'Connection string
con.open connSTR 'Opens the connection
strSQL=QueryString 'Querry string
rs.open strSQL, con 'Executes the querry
Set DatabaseConnection = rs 'Returns the result set
Keep in mind, this requires that you create a DSN(s) on your test boxes.