how we do database testing with qtp using descriptive
programming?

Answer Posted / harikrishna

Database testing is all about data validation & data integration.The correctness of new data insertion is called data validation.
The correctness of changes incurred due to insertion of new data from parent table to child tables is called data integrity
All we have to know is DML(select,insert,update,delete) commands in sql to use to dbase testing
ADODB-we use this to connect to any kind of dbase(sql,oracle..etc)
rso(Record set object)-a temp buffer where we use to store for retriving information frm dbase.
here am posting an example hw to connect a dbase and count no.of rows in a table via qtp
Option explicit
Dim cono,rso,n
Set cono=createobject("ADODB.connection")
cono.Open("DSN=hari")
Set rso=createobject("ADODB.recordset")
rso.Open "select * from harikrishnaa",cono
n=0
While rso.EOF<>true
n=n+1
rso.MoveNext
Wend
print "no of rows in record set is"&n
Set rso=nothing
Set cono=nothing
..................i used my own crated DSN.instead you shud use connection strings(which are ready available in google search engine)

HAPPY TESTING ALL.plz write comments as i hav used my time 4 u

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can any give an example(if possible templates) how to test web application using QTP. thanks in advance

1769


How to handle dynamic objects in quicktest professional?

699


How to test login module with different username and password by using data driven testing in QTP?

809


Why to use descriptive programming?

761


Can UFT be connected to Quality Center? If ‘Yes’ brief the process or steps.

830


what is the difference between modular framework & datadriven framework

1776


How many types of parameters are available in quicktest professional?

711


In qtp, how you can remove the spaces from string?

745


How to modify the text checkpoint?

787


Hi Samrat, Thank u very much, what u said it is right.

1642


terminal services client

1988


Is there any relation between Keyword Driven Framework and Recording modes provided in QTP( whether Recording modes are applied on keyword driven framework or not?)

1636


Explain the benefits of quick test pro(qtp)?

749


How to handle Java tree in QTP?

994


How the exception handling can be done using quicktest professional (qtp)?

746