Create and Execute Basic
Scripts
1. Recording Tests
- Start Quick Test and open a new test.
·
If Quick Test is not currently open, choose Start >
Programs > Quick Test Professional > Quick Test 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 Quick Test.
Note: While Quick Test loads your selected add-ins,
the Quick Test 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 Quick Test is already open, check which add-ins are
loaded by selecting Help > About Quick Test Professional. If the Web Add-in
is not loaded, you must exit and restart Quick Test. 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 Quick Test, choose Tools > Options. In the General tab, select
Display Add-in Manager on startup. When you exit and restart Quick Test, the
Add-in Manager opens.
- Start recording.
·
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.
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 for example. http://newtours.mercuryinteractive.com.
·
Confirm that Close the browser when the test is closed is
selected.
·
In the Windows Applications tab, confirm that Record and
run on these applications 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.
This setting prevents you from inadvertently recording operations performed on various Windows applications (such as e-mail) during a recording session.
·
Click OK.
Quick Test begins
recording, and your browser opens to the Mercury Tours Web site.
- Login 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.
- Enter flight
details.
Change the following selections:
Departing From: New Delhi
On: Jan 29
Arriving In: Benguluru
Returning: Jan 31
Service Class: Business class
Click CONTINUE to accept the other default
selections. The Select Flight page opens.
Note: 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 you did
not load the Java Add-in for this tutorial.
To check which add-ins have been loaded,
click Help > About Quick Test Professional. To change the available add-ins
for your tests, you must close and reopen Quick Test Professional.
- Select a flight.
Click CONTINUE to accept the default flight
selections. The Book a Flight page opens.
- 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.
- Review and
complete your booking.
Click BACK TO HOME. The Mercury Tours home page
opens.
- Stop recording.
In Quick Test, click Stop on the test toolbar to stop the recording
process.
You have now reserved an imaginary business class
ticket from New Delhi to Benguluru . Quick Test recorded your Web
browser operations from the time you clicked the Record button until you
clicked the Stop button.
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 are selected.
Click Save. The test name (Recording) is displayed
in the title bar of the main Quick Test window.
2.
Running a Test
Here you will run the test you recorded.
1) Start Quick
Test and open the Recording test.
If Quick Test is not already open, choose Start
> Programs > Quick Test Professional > Quick Test Professional.
·
If the Welcome window opens, click Open Existing.
·
If Quick Test opens without displaying the Welcome
window, choose File > Open
Or click the Open
button.
In the Open Test dialog box, locate and select the
Recording test, then click Open.
2) Confirm that
all images are saved to the test results.
Quick Test allows you to determine when to save
images to the test results. In this lesson, all images should be saved to the
test results.
Choose Tools > Options and select the Run tab.
In the Save step screen capture to test results option, select always.
Click OK to close the Options dialog box.
3) Start running
your test.
Click Run or choose Test > Run. The Run dialog
box opens.
Select New run results folder. Accept the default
results folder name.
Click OK to close the Run dialog box.
Watch carefully as Quick Test opens your browser
and starts running the test. In the browser, you can see Quick Test perform
each step you recorded; a yellow arrow in the left margin of the test tree
indicates the step that Quick Test is running.
1 comment:
Very Informative. Thanks :)
Post a Comment