Date post: | 04-Apr-2018 |
Category: |
Documents |
Upload: | krishna-keshav |
View: | 215 times |
Download: | 0 times |
of 24
7/29/2019 QTP-PPT-DAY1-CHAP3
1/24
2008, Cognizant Technology Solutions. All Rights Reserved.The information contained herein is subject to change without notice. Testing ServicesTesting Services
QTP Training
7/29/2019 QTP-PPT-DAY1-CHAP3
2/24
Create a Test
7/29/2019 QTP-PPT-DAY1-CHAP3
3/24
Objectives
After completing this chapter, you will be able to:
Create a basic test from a manual test case.
Run a test and check for errors.
Store the test file.
Define and plan for initial and end conditions in test creation.
7/29/2019 QTP-PPT-DAY1-CHAP3
4/24
QuickTest Professional Workflow
Prepare
1Create
2Verify & Enhance
3Integrate
4
Setup for test automation Create basic test
Document manual test stepsCheck applications/ environment stability Check that data is valid
Record user actions Confirm successful playback Use Object Repository
Enhance basic test
Add synchronization
Insert checkpoints
Data drive the test
Pass data
Build integrated test sets
Integrate tests
Figure 3-1 Step 2 of Workflow CreateTests
7/29/2019 QTP-PPT-DAY1-CHAP3
5/24
QuickTest Professional Workflow
Once you have outlined your test plan, isolated test requirements, and
determined where to locate data, the automation process can begin.
We are ready to follow the procedural steps to use QuickTest to automate
our business processes.
7/29/2019 QTP-PPT-DAY1-CHAP3
6/24
The User InterfaceTitle Bar
Menu Bar
Testing Toolbar
Keyword View
Data Table
Status Bar
Active Windo
Debug Toolbar
File Toolbar
Figure 3-2 QuickTest Professional 8.2 User
Interface
7/29/2019 QTP-PPT-DAY1-CHAP3
7/24
The User Interface
The QuickTest Professional user interface is broken up into a number offunctional areas. You can choose to focus on one or more areas depending
on the task you are performing.
The toolbars within the QTP interface are standard Windows toolbars. The
options you see may vary.
7/29/2019 QTP-PPT-DAY1-CHAP3
8/24
Record a Test
Figure 3-3 Building Blocks of aStep
1 2 3
7/29/2019 QTP-PPT-DAY1-CHAP3
9/24
Record a Test
Once the RECORD button is pressed and test steps are performed,QuickTest listens and records the activities. This results in the recording
and storing of each step of the business process. Each step consists of:
- The object
- The method (operation)
- The method property (a value for the action performed on the object) QuickTest should be running before the application under test is invoked.
For some environments, this is mandatory.
7/29/2019 QTP-PPT-DAY1-CHAP3
10/24
Saving Tests
Figure 3- 4 QuickTest ProfessionalSaveAs Dialog
7/29/2019 QTP-PPT-DAY1-CHAP3
11/24
Saving Tests
If you are using QuickTest Professional alone, the file system you will saveto is under the QuickTest Professionals Tests directory.
You have the option to save the test results along with the test.
7/29/2019 QTP-PPT-DAY1-CHAP3
12/24
Run a Test and Save Results
Step 1
Step 2
Step 3
Figure 3- 5 Save and Run A
Test
7/29/2019 QTP-PPT-DAY1-CHAP3
13/24
1. From the QTP toolbar, Click on the RUN button.
2. A best practice is to use the Temporary folder to hold the results while
debugging your test.
3. Press the OK button to execute the Run command.
Run a Test and Save Results
7/29/2019 QTP-PPT-DAY1-CHAP3
14/24
Viewing the Test Run
Figure 3- 6 Viewing A TestRun
7/29/2019 QTP-PPT-DAY1-CHAP3
15/24
When you run a test, QuickTest performs each step as it was recordedon the AUT.
This requires that the AUT is running before or as the test is executed.
You can watch in the AUT as QuickTest performs each step. A yellowarrow in the left margin of the KEYWORD VIEW points out the step
currently running.
When QuickTest finished running the test, you can open the Test Results
window.
Viewing the Test Run
7/29/2019 QTP-PPT-DAY1-CHAP3
16/24
Steps To View Results
Figure 3- 7 Test Results
Window
7/29/2019 QTP-PPT-DAY1-CHAP3
17/24
Steps To View Results
1. Decide if results must be viewed.
2. If yes, select TEST RESULTS from the QTP menu bar.
3. View the outcome of the test run.
4. Expand the results tree, From the Test Results menu bar, select VIEW
EXPAND ALL.
7/29/2019 QTP-PPT-DAY1-CHAP3
18/24
View Test Results
Figure 3- 8 Test ResultsSummary
7/29/2019 QTP-PPT-DAY1-CHAP3
19/24
View Test Results
Failures roll-up to the parent at the top level of the tree.
Expand the Test Results tree to see the outcome of each step.
Navigate to the child step that caused the failure.
7/29/2019 QTP-PPT-DAY1-CHAP3
20/24
Review Questions
1. Which application must be started first in order to ensure that QTP will beable to start to automate testing?
a) The application under test.
b) QuickTest Professional.
c) Neither of the above.
7/29/2019 QTP-PPT-DAY1-CHAP3
21/24
2. When outlining your test steps, what principle is important to implement
so a test can be re-used any number of times?
a) Load the appropriate Add-In.
b) Have all required applications running on the desktop.
c) Set initial and end conditions as part of the test.
7/29/2019 QTP-PPT-DAY1-CHAP3
22/24
3. How can you tell that QTP is in the
Recordmode?a) The Keyword View changes.
b) The word Recording flashes in the lowerright corner of the interface.
c) There is no indication.
7/29/2019 QTP-PPT-DAY1-CHAP3
23/24
4. Which tool is available to help analyze
the outcome of a test run?a) The Active Screen.
b) The Global data table.
c) The test results.
d) The Record and Run settings.
7/29/2019 QTP-PPT-DAY1-CHAP3
24/24
2008, Cognizant Technology Solutions. All Rights Reserved.The information contained herein is subject to change without notice.
Thank you
Testing ServicesTesting Services