Database checkpoint:
Database checkpoint enables user to check the Content of the back end Database.
Steps to follow for inserting Database checkpoint:
QTP need not be in Recording mode and we do not need AUT since data is from backend.
Insert --> checkpoint --> Database checkpoint -->choose “specify SQL statement manually” option -->click next --> click create --> select machine data source --> Select DSN (QT_flight32) --> click OK --> enter SQL statement (select * from orders) --> finish --> click OK
It will add a line in the expert view as:
.Result--------------------------------------------------------------------------------------------------------
Database checkpoint enables user to check the Content of the back end Database.
Steps to follow for inserting Database checkpoint:
QTP need not be in Recording mode and we do not need AUT since data is from backend.
Insert --> checkpoint --> Database checkpoint -->choose “specify SQL statement manually” option -->click next --> click create --> select machine data source --> Select DSN (QT_flight32) --> click OK --> enter SQL statement (select * from orders) --> finish --> click OK
It will add a line in the expert view as:
DbTable("DbTable").Check CheckPoint("DbTable")
When you will run the script QTP will check the database whether the
record is updated with the customer name or not and will give you the
result as pass or fail. DbTable is the database table object, which has
following properties and methods associated with it.- Exist Property –checks whether the database table exists
- GetToProperty method – is the same method used for test objects to get the specified identification property.
- SetToProperty method – is to set the specified identification property.
- If DbTable("DbTable").Exist (0) Then
- Print " Current query : " & DbTable("DbTable").GetTOProperty ("Source")
- DbTable("DbTable").SetTOProperty "Source", "Select * from Orders"
- Print " Modified query : " & DbTable("DbTable").GetTOProperty ("Source")
- End If
.Result--------------------------------------------------------------------------------------------------------


No comments:
Post a Comment