We have seen in the previous recipes how to connect and perform SQL queries programmatically. This knowledge is essential because it can give us more flexibility as to how to access our DB and how to process the retrieved data. However, UFT provides an in-built feature to perform DB checkpoints, which can be very useful especially when the person implementing the automated tests is less skilled in coding.
We will use the flight32.mdb
file supplied with the Flight application, which we used in Chapter 1, Data-driven Tests. Make sure that the Microsoft Query application is installed on your machine.
Proceed with the following steps:
From the UFT menu, navigate to Design | Checkpoint | Database Checkpoint:
Now, the Database Query Wizard dialog will open:
Now, in the Database Query Wizard dialog, we can choose to define our SQL statement using Microsoft Query, or we can do so manually. If we select the first option, Create query using Microsoft...