QTP Exercises
1) Check the properties of Update Order, Delete Order and Insert Order buttons in Flight Reservation Application.
a. Method1: Using Standard Checkpointb. Method2: Using VB Script
Test Case:-
Steps Action Button Enable Property1 Login to Flight
ReservationUpdate Order FALSE
Delete Order FALSE
Insert Order FALSE2 Open Existing Order Update Order TRUE
Delete Order TRUE
Insert Order FALSE3 Insert New Order Update Order FALSE
Delete Order FALSE
Insert Order TRUE
2) Check the Number of Images, Links present on the Flight Reservation Application.
a. Method: Using Standard Checkpoint (Page Check Point)
Test Case:-
Step Action Expected
1 Open Flight application URLhttp://newtours.demoaut.com/
Home Page should display
2 Check Number of Links, Images present on Home Page.
Number of Links – 20Number of Images -26
3) Check the Text present in the edit box is correct on FR Application (Match Case, Exact Match, Ignore Spaces, Text not displayed)
a. Method1: Using TEXT Check point.b. Method2: Using VB Script.
Test Case:-
Step Action Expected
1 Login to Flight Reservation Application
Login Successful
2 Open Existing Order. Name should display correctly on Edit box.
4) Check the part of the Text displayed in the edit box is correct on FR Application.
a. Method1: Using TEXT AREA Check point.b. Method2: Using VB Script.
Test Case:-
Step Action Expected
1 Login to Flight Reservation Application
Login Successful
2 Open Existing Order. Part of the Name should display correctly on Edit box.
5) Check the Bitmaps displayed in MS-Paint using BITMAP check point.
a. Method: Using Bitmap Check point.
Test Case:-
Step Action Expected1 Compare two
bitmaps/images.Both the bitmaps should not be the same.
Approach:-
1. Create Bitmap Check point on Circle.2. Run the Bitmap Checkpoint on Circle (Should Pass).3. Change/Modify Circle into Rectangle.4. Run the Bitmap Checkpoint on Rectangle (Should Fail).
6) Check Flight Reservation Database w.r.t Update and Delete operations from FR application.
a. Method: Using Database checkpoint.
Test Case:-
Step Action Expected1 Login to Flight
application2 Open existing Order3 Update existing Order Check the order updated in
Database.4 Delete existing order Check the order deleted
from Database.
Approach:-
1. Create DB Check point.2. Run the DB Check point (Should Pass).3. Update existing order from FR application.4. Run the DB Check point (Should Fail)5. Delete existing order from FR application.6. Run the DB Check point (Should Fail)
7) Check content in the XML file using XML Check point
Approach:-
1. Open the xml file http://www.w3schools.com/xml/cd_catalog.xml2. Insert XML Check point.3. Run the XML Check point (Should Pass)3. Do some changes in XML File4. Run the XML Check point (Should Fail)
8) Check content of Files (.txt, .doc, .pdf etc.) using File content check point
Test Case:-
1. Create File content check point on File.2. Run the File content check point (Should PASS)3. Do changes on File.4. Run the File content check point (Should FAIL).
8) Check w3c content supported by Web page using Accessibility Check Point.
9) Check Login for FR Application.
a. Method: Use Data Table
Test Case
Step No Action Expected1 Launch FR Login Login window opens2 Provide Agent Name3 Provide Password4 Click Ok Case 1: Valid Inputs
FR main window should display.Case2: Invalid InputsWarning dialog should display.
Test Data:-
Agent Name Password ResultMercury Mercury PASSMer Mercury FAILMercury Mercury1 FAIL
MER MERCURY1 FAIL
10) Check the Total=tickets* Price for first FIVE orders.
Method: Using Looping statement
11) Verify Flight From & Flight To Combo Boxes (In Flight reservation, select an item from Fly From: combo box and verify weather that item available or not in Fly To: combo box, like this select all items one by one in Fly From and verify weather selected items available or not in Fly To.).