Automation Concepts and QTP Session
Automation Concepts and QTP Session
Demo
2
Agenda
Automation Concept
1. Test Automation – Why?
2. Test Automation – Qualifying Criteria
3. Test Automation - Prerequisites
4. Automation Readiness Check
5. Challenges in Automation
6. Phases of Automation
7. Automation Framework
8. Skills required for scripting
9. Availability of Automation tools
Automation Tool - QTP
1. Tool Selection Process
2. Costs involved in automation
3. ROI
4. Automation Benefits
5. Automation Drawbacks
6. Case Study
7. Test
QTP Demo
3
3
Test Automation – Why?
Reduced Test Cycle Time
4
Test Automation – Qualifying Criteria
5
Test Automation – Prerequisites
Project Process
Readiness Readiness
The project has reached a stage The right automation framework is
when test automation is estimated, identified and communicated to the
The approval of project
management team for going ahead automation team.
with test automation.
6
Automation Readiness Check
Framework should be • Includes Test Calls, Test data arrangement, scripting standards
functional
Tasks allocation is • automation specific tasks like GUI objects maintenance and synching,
understood local to shared staging, reviewing, configuration control etc.
Project Management Team • Formal – Automation plan signoff, kick off meeting; informal – stand up
informed meeting
7
Test Methodology - Automated
Key Considerations for automation
Application/functionality stability, release plans
Application architecture
Test pack analysis for automatable test conditions/cases
Interfacing application dependency
Analysis of automation ROI
1 2
Establi
3
Script
Tool4 5 6, 7
Assess Identify sh Stabilizati
Evaluatio
Environment Gaps Framew Develop on
n, PoC
Application Completed
ork
Prioritize Test Pack Research, Evaluate, ment
Test Scripts Stds Script Integration,
Architecture, Environmental Test Strategy Score test tool Learning, Metrics from Reviews, Testing, Re-
Stability Assessment Test Pack Re- candidates PoC re-used work
Test Pack Analysis Determine priorities engineering Object Identification Automation Framework Dry Run
Financial Identify Strategic Proof of Concept / Design Documentation
Resources Outlook Prototyping Test Scripting Training
Personnel Approval Metrics (% Automation
Time-line achieved)
Dependencies Process Improvements
Maintenance Phase
Early Involvement
Software Testing Life Cycle (STLC)
Software Development Life Cycle ( Testing Activities Test Automation Performance Testing
Manual / Automation/ Performance Specific Activities Specific Activities
SDLC )
Test Strategy Identify features which can/ •Identify business
Test Planning cannot be automated
scenarios for
Requirement Analysis Test Scenarios/ High level Automation Design / Define Performance Testing
performance testing
Framework Requirements
Conditions Automation Strategy
Automation Framework
Application Maintenance
Regression Testing
Enhancement
Test Test
Modularized Automation Automation Business Automation
Automation Design Standards / Scenarios Configuration
Test Suite Considerations
Guidelines Control
Test Environment
Modularity Driven
Data Driven
Keyword Driven
Hybrid
Back
The Test Automation Life Cycle
Customer Speaks…..
Process Expertise
Development of Scripts
3
• Test Scripts
• Identify & place re-usable
components in reuse library
• Add checkpoints, synchronization
2 points& functional validations
Test Planning & Design • Dry Run 4 Test Execution
• Automation Effort Estimation • Test Script Execution
• Test Strategy • Reporting Results
• Test Framework • Defect Management
• Prepare Test Conditions/Cases • Test Automation metrics
• Prepare Traceability Matrix • Update scripts
• Prepare Operations Manual
Fast – Runs Tests significantly faster with reduced time of testing lifecycle
Reliable – Tests perform precisely the same operations each time they are run
Repeatable – Repeat the same set of execution as many times desired.
Programmable – Program sophisticated tests that bring out hidden information.
Comprehensive – Build a suite of comprehensive tests that covers every feature
Reusable – Reuse test cases created in various situations
Maintainable – Easy maintainability and minimizes effort of maintenance
Long Term Savings – Phased ROI based Automation - in testing effort & cycle time
Improved Planning and Focused testing effort
Enhanced Coverage
Minimal Manual Intervention and coding and hence reliable
Regression Pack for Future Product Releases
Reduces Go-To-Market time for an application
Reduced Defect Density
Challenges in Automation - Process
15
Challenges in Automation – Application
16
Challenges in Automation - Tool
Backward
Objects not Difficult to Non-
compatibility Memory
recognizable use, non- availability of
of tool cache size
by tool. user friendly support
versions
17
Challenges in Automation - Skill
18
Test Automation – Framework Architecture
OBJECT RECOVERY
REPOSITORY DATA FILES TEST
MANAGER RESULTS
QUICK TEST
QUICKSCRIPT
TEST PROFESSIONAL
PROFESSIONAL
REUSABLE
LIBRARY FILES
ACTIONS
QUALITY CENTER
VPN
TERMINAL
`
TERMINAL
TERMINAL `
`
Tools Availability
Selenium
Floyd
Watir
•HP-QTP Frankenstein SWTbot
•HP-WinRunner JMeter
•Rational Robot
•Compuware TestPartner
•Segue Silktest
20
About QTP
Note:
Add-ins for special environments such as Java, Oracle, SAP
solutions, .NET Windows and Web Forms, Siebel,
PeopleSoft, Web services, and Terminal emulator
applications.
QTP Versions
QTP 10.0
QTP 9.5
QTP 9.2
QTP 9.0
QTP 8.2
QTP 8.1
QTP 8.0
QTP 6.5
QTP 6.0
QTP 5.6
QTP – Add in Manager
Keyword & Expert View
Keyword View:
Enables to create and view the steps of the test in a keyword-
driven.
Table-like view, in which each step is a separate row in the
table, and each column represents different parts of the steps.
Expert View:
Enables to create scripts in the form of VBscript for each
operation performed on the application.
Script editor and for each object and method in an Expert
View statement, a corresponding row exists in the Keyword
View
Keyword View
Expert View
Creating QTP Script
Record a session
When you run tests, your application may not always respond
with the same speed. For example, it might take a few seconds:
for a progress bar to reach 100%
Synchronization point
A synchronization point is a
line in the test script that
instructs QTP to wait for a
certain response from the
application during playback.
Insert ->Synchronization Point
37
Object Repository
Object Spy
Constructs
Conditional Statements
If .. Then
Else
End If
ElseIf … Then
Loop Statements
For … Next
Do… while
Do… until
If..Else Example
If window("Notepad").Exist(2) Then
reporter.ReportEvent micPass, "Notepad dialog",
"Notepad dialog exists"
Else
reporter.ReportEvent micFail, "Notepad dialog",
"Notepad dialog exists"
End If
Checkpoints
'One way
'Other Way
Myobject.Click
Integration of QC with QTP:
Note: Quality Center projects are password protected, so you must provide a user name
and a password
QC Server Name
Host Number
Running the Test Scripts
Mapping the test cases into Test lab
In the Run Stage, for the Host
Tab we have to specify the Host
Number on which you want to
run the test scripts, The Status
Tab will give the status of the
Test Script during the execution
of the Test Script and after
executing the script
When you click on the left side run button in the test lab, you will get one window
which is shown on the right side of this slide. In this window we have a tab called
“Launch Report”; with this tab we will get the Results Summary of that particular
test script.
Integration of QC with QTP (Contd):
DEMO
54
QC Access – IV & VS Lab
http://10.103.91.73/qabin/
Login credentials
Constraints of usage
1. 15 concurrent licenses
2. Training licenses, Can not be used for evaluation or project purposes
3. Do not use at the cost of impacting assigned work or schedule
55
What is expected from you
When you accomplish some thing new – please share the knowledge
On software testing community on arKMedis
With IV&VS academy which takes care of Learning / Growth
56
What is expected from you
A few exercises
Problem – Automate LOS – Module (Create, Edit & Verify) – Mandatory for all
Demonstrate the creation of Automation scenarios for LOS – Module which includes Create, Edit & Verify.
57
What is expected from you … continued
Conditions :
Do not combine multiple solutions into one document. Submit separate documents for responses to
each problem
1.No more than 2 people can be teamed up for answering a question. Please mention “the names of the
people” and “problem you are submitting the response for” on the first page.
2.Each response must be provided with the step-by-step explained along with screen shots wherever
possible
3.Use the demo/training version of the licenses for practice purpose. Do not use any client provided
licenses as far as possible
58
Questions and Answers
59