We will resume this tutorial where we left off, and delve into the remaining QTP checkpoints which include XML, Accessibility, and Database Checkpoints. This marks the end of our QTP checkpoints guide series. We’ve previously covered the nuts and bolts of all QTP checkpoints in the last four lessons.
=> Check Out Our QTP Training Tutorials Series Here
Recommended IPTV Service Providers
- IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
- IPTVRESALE – Rating 5/5 ( 200+ Reviews )
- IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
- IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
- IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
- IPTVTOPS – Rating 5/5 ( 43 Reviews )
By integrating XML checkpoints into your test, you can ascertain the contents of individual XML data files or documents that are integral to your web application.
XML Checkpoint
- XML checkpoints are usable for XML documents inside web pages or frames, XML files, and test objects that support XML.
- An XML checkpoint contrasts the current value of a specified XML element, feature, and/or value with their anticipated value.
- During the insertion of a checkpoint, QuickTest embeds a checkpoint step in the Keyword View and introduces a Check CheckPoint statement in the Expert View.
- When the test is performed, QuickTest contrasts the expected outcomes with the current ones for the checkpoint. If they are not identical, the checkpoint does not pass.
There are three variations of XML checkpoints you have at your disposal:
- XML Web Page/Frame Checkpoint: Validates an XML document within a web page or frame.
- XML File Checkpoint: Validates a specific XML file.
- XML Test Object Checkpoint: Validates the XML data for a particular object or operation.
The procedure for implementing this checkpoint mirrors that of other methods.
Step #1: During recording, select Insert -> Checkpoint -> XML checkpoint (from application) choice
Step #2: Choose the page where the checkpoint will be inserted.
Step #3: The following screen will pop up:
Step #4: Set your desired parameters on this interface and hit OK
Step #5:
Browser("Browser").Page("Page").WebXML("http://www.w3schools.com/xml/c").Check CheckPoint("http://www.w3schools.com/xml/cd_catalog.xml")
– This statement will be incorporated.
Alternatively, if you hope to insert an XML checkpoint on a file on your computer, you can opt for the selection:
“Insert -> Checkpoint -> XML checkpoint (from resource)” and select the XML file test object.
The following steps mirror the ones pointed out above.
The option “XML checkpoint (from the application)” is only accessible when the web add-in is installed and loaded for a certain test.
Accessibility Checkpoint
This checkpoint can only be utilized when the web add-in is up and running. It ascertains whether the columns in a website adhere to the Web Accessibility Guidelines set by the World Wide Web Consortium.
You can include it during recording or when editing through the active screen.
The features validated by the Accessibility Checkpoint include:
- Active X evaluation
- Alt property examination
- Applet evaluation
- Frame titles examination
- Multimedia evaluation
- Server-side Image evaluation
- Tables examination
The tester is free to analyze one or more features from the aforementioned list.
Settings can be adjusted from the menu choice “Tools -> Options -> Web -> Advanced -> Accessibility”. Options can be selected or not selected as needed.
To add the checkpoint, begin recording a test. In this instance, I am loading the gmail.com page by setting up the URL parameters in the record and run settings instead of doing it through programming. When the Gmail.com page opens up, I select the menu option “Insert -> Checkpoint -> Accessibility checkpoint” and click on the page.
The following interface will appear:
Choose the page object and click OK. The available properties to inspect will be revealed so that the user can select one or many options. Furthermore, the message at the end of the property selection outlines the reasons behind the default selection.
Allow us to take a gander at the selected options in the “Web -> Advanced” section of the Options dialog box.
This clarifies why the exclusive option chosen by default in the “Accessibility Checkpoint Properties dialog box” is the “Alt Property check”. If different options have been selected in the Web -> Advanced section of the Options dialog box, it will be mirrored in subsequent Accessibility checkpoints integrated into the test.
Click OK on the Accessibility Checkpoint Properties dialog box. As with other checkpoints, the following declaration will be appended to your test.
Browser("Gmail: Email from Google").Page("Gmail: Email from Google").Check CheckPoint("Gmail: Email from Google")
You can tweak this statement just like any other checkpoint from the Object Repository. The test results will show a good result if the inspection is successful or displays Fails if it is not.
You can make the decision to include a default check to any web page you access by activating the option as highlighted in the following screenshot.
Database Checkpoint
The Database checkpoint operates by constructing a query in your database and creating a DB checkpoint to validate the outcomes of the query, thereby finding bugs.
There are two methods for formulating a Query:
#1) Microsoft query – You can set up Microsoft Query using the custom installation of Microsoft Office.
#2) Jot down a SQL query by hand.
I have designed a Microsoft Access table named “Contacts” and included a row with my personal data. Here’s how the table appears:
To add a database checkpoint to this table, adhere to these steps:
Step #1: Choose “Insert -> Database Checkpoint” from the menu.
Step #2: In the following interface, select the “Specify SQL Query manually” option and click “OK”.
Step #3: You should craft a connection string, so click on “Create” on the screen.
Step #4: If a DSN is already established, select it from the interface below.
Step #5: If there are no created DSNs, you have the option to create one by clicking on the “New” button and selecting your database type from the available list. In my situation, I am choosing “Microsoft Access Driver (.mdb, .accdb)” from the list.
Step #6: Click Next, browse to the desired location to save this DSN. I am choosing the desktop and hitting OK. On the next screen, click Finish.
Step #7: On the screen below, you can select the data source, i.e., the database where you intend to run the query. Click Select and browse for your database.
Step #8: Opt for your database and click OK. The newly crafted DSN will be visible on the list. Select it from the interface below and click OK.