ICT Role in 21st Century Education & its Challenges.pptx
QTP Automation Testing Tutorial 1
1. Copyright 2015 IT Professional Academy 1
Automation (QTP) Testing
Course
WELCOME
2. Copyright 2015 IT Professional Academy 2
About IT Professional Academy
•Team of Highly Skilled Trainer with work Exp of 7+Y.
•Expertise in areas like Software Testing, Big Data,
Linux-Unix, SAP BI as well as Software Development.
•Provides both Classroom and Online Classes.
•Training centers across multiple cities.
•Provides Job Assistance, Interview preparation, Mock
Interviews, Resume Preparation.
4. Copyright 2015 IT Professional Academy 4
About Trainer:
Exp: 7+ Y in Automation Testing
Technical Expertise:
QTP, -UFT, Selenium, Excel Macro, Test
Complete, PHP, HTML-CSS, PL-SQL
Batch Intro.
5. Copyright 2015 IT Professional Academy 5
Course Agenda
•Fluent in VB Script: variables, if-else, loops,
arrays, Ddics, Objects, Functions etc
•Excel Macro: Basics of Excel Macro
•QTP-Basics: handling different web controls
•QTP-Advanced: Excel, Data Tables, Mouse
hovers, DB connections, DOM, AOM, COM
•QTP-Framework Development: KW
Driven, Data Driven, Hybrid, Function Driven
and Action Driven
After end of the course, You will be comfortable in
below things:
6. Copyright 2015 IT Professional Academy 6
Demo Agenda
•Introduction to Software Testing.
•Introduction to Automation Testing
•Automation Tools
•QTP Vs Selenium
•Introduction to VB script
•Introduction to HTML
•Introduction to Objects and Methods.
•Introduction to QTP
•Record and Play Back in QTP
7. Copyright 2015 IT Professional Academy 7
Day 1 Topics
1) Automation General information
i. Automation definition
ii. Purpose of the Automation
iii. Benefits of the automation
iv. Which applications are suitable for automation
v. Which test cases are right candidates for automation
vi. Which are not right candidates for automation
2) Automation Efforts Estimation
i. POC preparation
ii. CBA & ROI
3) Automation Tool Types
i. Test management Tools
ii. Functional or Regression Tools
iii. Performance Tool
8. Copyright 2015 IT Professional Academy 8
Expectations
What are your Expectations with
this course?
9. Copyright 2015 IT Professional Academy 9
Introduction To Software Testing
•Purpose of Software Testing: To get Quality
Product with out exceeding the set Cost.
Live Example: Bank Lost $10000k in a month
due to a defect.
•Methodologies in Testing: Water fall Vs Agile
•Software testing Life Cycle.
10. Copyright 2015 IT Professional Academy 10
Software Testing: Water Fall Model
13. Copyright 2015 IT Professional Academy 13
Introduction To Automation Testing
“Automation is the use of tools and strategies
that reduce human involvement or
interaction in repetitive or redundant tasks.”
14. Copyright 2015 IT Professional Academy 14
Need for Automation Testing?
•It Involves automating a manual process of testing.
•Ever shrinking schedule and minimal resources.
•Budget constraints.
•Save time for repetitive tasks performed during
testing.
etc etc etc.
15. Copyright 2015 IT Professional Academy 15
Need for Automation Testing?
Bottom Line:
“So that machine works while you sleep so
as to save
TIME
&
MONEY.
Budget is the Driving Factor for all automation
efforts.
16. Copyright 2015 IT Professional Academy 16
Need for Automation Testing?
ROI Example:
ROI = Benefit/Cost
Simple Rule: If Number of Automation
Tester is more than Number of Manual
Tester then ROI is not Achieved.
17. Copyright 2015 IT Professional Academy 17
Automation ROI
If green line is not going down, ROI will never
be achieved.
18. Copyright 2015 IT Professional Academy 18
Before you Automate..
Ask two questions:
1. Shall you Automate?
Should get some value out of it.
“Automating Flow which will only be used once should not be
automated. Having said that, automating a flow which will be
used only once but is important and not possible manually;
should be automated.”
2. Can you Automate?
Check Automation feasibility.
“Before committing, always check if flow or AUT is feasible to
automate. Do not false commit.”
20. Copyright 2015 IT Professional Academy 20
Advantages & Disadvantages of
Automation Testing
Advantages Disadvantages
Saves Time High Investment in Tool and training
Cost Reduction Test Coverage
Reliable: Eliminating human error High man power requirement for test
preparations.
Reusable
Better Quality Software
21. Copyright 2015 IT Professional Academy 21
Criteria For Automation Test Tool
Scope
Ease of Integration
Compatibility
Performance
Types of tests
Maintainability
Affordability
22. Copyright 2015 IT Professional Academy 22
QTP Vs Selenium-1
QTP: It is commercial tool and hence it requires a license is expensive
Selenium: Its an open source tool hence it does not require license and
is free
QTP: It is used for testing client-server applications. It can test web-
based as well as desktop applications
Selenium: Using Selenium only web applications can be tested
QTP: QTP tests can only be developed in QTP IDE
Selenium: Selenium has the option of using wide range of IDEs like
Visual Studio, Eclipse, Netbeans
QTP: HP UFT only supports VB script
Selenium: Selenium supports JAVA, .NET, Ruby, Perl, PHP, and many
other programming languages
23. Copyright 2015 IT Professional Academy 23
QTP Vs Selenium-2
QTP: HP UFT comes with built in object repository. Object repository
development and maintenance is quite easy in HP ALM
Selenium: Selenium dose not have such built in object repository, but
object can be managed by using UI element user extension
QTP: HP UFT integrates with test management tool like HP Quality
Center
Selenium: There is no such tool that integrates with Selenium
QTP: All types of dialog box is supported by it
Selenium: It supports dialog box partially
QTP: It supports different environments like SAP, Oracle, .NET but
user need to purchase add-on license for them
Selenium: It supports addition of plug-ins to include features that are
not provided by core Selenium
24. Copyright 2015 IT Professional Academy 24
QTP Vs Selenium-3
QTP: Automation testing is expensive due to licensing cost
Selenium: Web automation testing with Selenium incurs less cost
QTP: HP QTP offers very good technical support
Selenium: It has no official support, since it is an open source
QTP: HP QTP supports only VBScript . Hence Object Oriented Approach
to Test Automation becomes challenging
Selenium: Selenium supports mature Object Oriented Language like
Java
QTP: HP QTP is more user friendly and scripts are developed quickly.
Selenium: It is a low level tool with less functionality. Script requires
more time to develop and maintain
QTP: Backward compatibility is powerful. Latest version of HP ALM
supports code that was developed 5 years back
Selenium: With new Selenium release the API changes. So Test Scripts
need to be updated
25. Copyright 2015 IT Professional Academy 25
QTP Vs Selenium-4
In Short it is similar to Buying a Laptop
QTP: Laptop with Windows 10 and useful Applications installed.
Every thing up and Running.
Selenium: Laptop Case + Hard Disk+ Ram+ Linux CD + useful
Applications CD. But Every thing for Free.
26. Copyright 2015 IT Professional Academy 26
Introduction to VB Script
VBScript
designed to run on multiple platforms that use the ActiveX Scripting
Interface.
VBA (VB for Applications)
More sophisticated customization.
Power user focus, natural upgrade, superb integration
Visual Basic
Best tool for distributed client/Server solutions.
Powerful, robust, scalable.
27. Copyright 2015 IT Professional Academy 27
What is VBScript?
•A subset of visual basic
•The VBScript Code is case Insensitive.
•Microsoft Visual Basic Scripting Edition brings active
scripting to a wide variety of environments, including
Web client scripting in Microsoft Internet Explorer
and Web server scripting in Microsoft Internet
Information Service (IIS).
28. Copyright 2015 IT Professional Academy 28
VB Script Example
1. VB Script Editor
2. Create a .vbs File
3. Create a simple Program for Addition and Display
the result.
4. Calculator Program for Add, Subtract, Multiply
and Divide.
5. Walk thorough the VB Script Code to Automate
IE.
29. Copyright 2015 IT Professional Academy 29
HTML Basics:
1. Hyper Text MarkUp Language
2. It is the Implementation behind a Web page.
3. Do Inspect Element in Chrome to Check the HTML
code of the Page.
4. You can alter the HTML Page by changing the text
in the Chrome Editor.
5. HTML Tags and Attributes.
30. Copyright 2015 IT Professional Academy 30
HTML Basics
Types of Control:
1. Text Elements
2. Text Box
3. Links
4. Table
5. Radio Group
6. Select List
7. Drop down
8. Check Box
9. Buttons
10.Hovers
11.Tooltips
31. Copyright 2015 IT Professional Academy 31
HTML Basics: Tag Implementation
1. <!DOCTYPE html>
2. <html>
3. <body>
4. <h1><u>My First Heading</u></h1>
5. <p><u>My first paragraph.</u></p>
6. <p><u>My first Link.</u></p>
7. <a href="http://www.itprofessionalacademy.in">Visit our Site</a>
8. <p><u>My first Table</u></p>
9. <table style="width:100%">
10. <tr>
11. <td>Vinod</td>
12. <td>Khanna</td>
13. <td>50</td>
14. </tr>
32. Copyright 2015 IT Professional Academy 32
Object and Methods
Every thing is an Object.
All Objects has properties and methods/functions.
I am an Object:
Properties:
1. Name: Akash
2. Age: 34
3. DNA: ATCG
4. Weight: 80KG
And many more..
Actions I can
Do
1. Type(what to
type)
2. Dance(which
dance)
3. Sing(which
song)
And many more…
33. Copyright 2015 IT Professional Academy 33
Object and Methods:Hierarchy
All Objects has Parent.
I am an Object:
Properties:
1. Name: Akash
2. Age: 34
3. DNA: ATCG
4. Weight: 80KG
And many more..
Actions I can
Do
1. Type(what to
type)
2. Dance(which
dance)
3. Sing(which
song)
And many more…
I am an Object:
Properties:
1. Name: Akash_Dad
2. Age: 60
3. DNA: ATCG_1
4. Weight: 75KG
And many more..
Actions I can
Do
1. Read(what to
type)
And many more…
34. Copyright 2015 IT Professional Academy 34
Object and Methods
<input id="gs_htif0" class="gsfi" disabled="" autocomplete="off" aria-
hidden="true" style="border: medium none; padding: 0px; margin: 0px;
height: auto; width: 100%; position: absolute; z-index: 1; background-color:
transparent; color: silver; transition: all 0.218s ease 0s; opacity: 0; text-align:
left; left: 0px;" dir="ltr" kl_virtual_keyboard_secure_input="on">
I am an Object:
Properties:
1. id: “gs_htifo”
2. class: “gsfi”
3. background-color:
“transparent”
and many more…
Actions I can Do
1. Type
2. Click
and many more..
Google
Input Box
35. Copyright 2015 IT Professional Academy 35
Target-Command-Value-Sync
All interactions are the combination of :
1. Target
2. Command
3. Value
4. Sync
5. Verify
Analogy: “Paint- This Wall- With Red
Color- wait for it to Dry -Verify
36. Copyright 2015 IT Professional Academy 36
QTP Demo Example:
Example:
•Record Script
Demo Site:
http://parabank.parasoft.com/parabank/index.htm
Script1: ValidateLoginFunctionality
37. Copyright 2015 IT Professional Academy 37
QTP DAY 1 Ends.
Thank you.
Editor's Notes
HTML Link: http://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic_document
http://parabank.parasoft.com/parabank/index.htm