Thursday, 13 December 2012

Recording a Test | QTP Tutorial PDF


Recording a Test

In this Recording a Test, you will record the process of making a reservation for a flight from New York to San Francisco on the Mercury Tours Web site.

1 Start QuickTest and open a new test.

=> If QuickTest is not currently open, choose Start > Programs > QuickTest Professional > QuickTest Professional.
In the Add-in Manager, confirm that the Web Add-in is selected, and clear all other add-ins. Click OK to close the Add-in Manager and open QuickTest.
Note: While QuickTest loads your selected add-ins, the QuickTest splash screen is displayed. This may take a few seconds.
If the Welcome window opens, click Blank Test.
Otherwise, choose File > New, or click the New button.
A blank test opens.
=> If QuickTest is already open, check which add-ins are loaded by selecting Help > About QuickTest Professional. If the Web Add-in is not loaded, you must exit and restart QuickTest. When the Add-in Manager opens, select the Web Add-in, and clear all other add-ins.
Choose File > New, or click the New button.
A blank test opens.
Note: If the Add-in Manager does not open when starting QuickTest, choose Tools > Options. In the General tab, select Display Add-in Manager on startup. When you exit and restart QuickTest, the Add-in Manager opens.

2 Start recording on the Mercury Tours Web site.

Choose Test > Record or click the Record button. The Record and Run Settings dialog box opens.
 
=> In the Web tab, select Open the following browser when a record or run session begins.
Choose a browser from the Type list and confirm that the URL in the Address box is http://newtours.mercuryinteractive.com.
Confirm that Close the browser when the test closes and Do not record and run on browsers that are already open are selected.
=> In the Windows Applications tab, confirm that Record and run on these applications (opened on session start) is selected, and that there are no applications listed.
This setting prevents you from inadvertently recording operations performed on various Windows applications (such as e-mail) during a recording session.
Click OK.
QuickTest begins recording, and your browser opens to the Mercury Tours Web site.

3 Log in to the Mercury Tours Web site.

In the User Name and Password boxes, type the name and password you registered with Mercury Tours.
Click Sign-In.
The Flight Finder page opens.

4 Enter flight details.

Change the following selections:
=> Departing From: New York
=>On: Dec 29
=>Arriving In: San Francisco
=> Returning: Dec 31
=> Service Class: Business class
Click CONTINUE to accept the other default selections. The Select Flight page opens.

Notes:

When selecting the date, you must click on the drop-down list, scroll to any entry that is not showing, and select it. This is because QuickTest only records a step if the value in the list changes. The tutorial will not work correctly if you accept the currently displayed month or day.
When entering dates while recording this test, do not click the View Calendar button, which opens a Java-based calendar. Your test will not record the date selected using this calendar because the Java Add-in is not loaded for this tutorial (The Java Add-in is an external add-in that can be purchased separately.)
To check which add-ins are loaded, click Help > About QuickTest Professional. To change the available add-ins for your tests, you must close and reopen QuickTest Professional.

5 Select a flight.

Click CONTINUE to accept the default flight selections. The Book a Flight page opens.

6 Enter required passenger and purchase information.

Enter the required information (fields with red text labels) in the Passengers and Credit Card sections. (You may enter fictitious information.)
In the Billing Address section, select Ticketless Travel.
At the bottom of the page, click SECURE PURCHASE. The Flight
Confirmation page opens.

7 Review and complete your booking.

Click BACK TO HOME. The Mercury Tours home page opens.

8 Stop recording.

In QuickTest, click Stop on the Testing toolbar to stop the recording process.
You have now reserved an imaginary business class ticket from New York to San Francisco. QuickTest recorded your Web browser operations from the time you clicked the Record button until you clicked the Stop button.

9 Save your test.

Select File > Save or click the Save button. The Save dialog box opens to the Tests folder.
Create a folder named Tutorial, select it, and click Open.
Type Recording in the File name field.
Confirm that Save Active Screen files is selected.
Click Save. The test name (Recording) is displayed in the title bar of the main QuickTest window.

No comments: