Upload
vineelkira
View
222
Download
0
Embed Size (px)
Citation preview
7/31/2019 Automation and QTP Introduction
1/56
QTP INTERFACE
7/31/2019 Automation and QTP Introduction
2/56
INTRODUCTION TO
AUTOMATION
7/31/2019 Automation and QTP Introduction
3/56
What is Test Automation?
Test automation is the use of software
to control the execution of tests,
the comparison of actual outcomes to predicted
outcomes the setting up of test preconditions, and
test reporting functions.
7/31/2019 Automation and QTP Introduction
4/56
Key challenges in adopting Automated testing
Selection of the Automation Level to be targeted. Selection of the appropriate test tool.
Customization of the tool to support the desired scriptinginterface.
Development of reusable and modular scripts. Verification of scripts
Implementation of a test management system (whichcontrols and synchronizes the multiple tests points,
executes tests in batch mode and consolidates thetesting results)
7/31/2019 Automation and QTP Introduction
5/56
FACTORS AFFECTING AUTOMATION
Number of External Interfaces.
Type of External Interface.
Effort needed for Automation.
Number of Releases Expected for testing.
Maturity of the product.
7/31/2019 Automation and QTP Introduction
6/56
What can be automated?
Based upon type of Test
Functional
Performance Load, Stress and Volume
System Tests and Integration tests
Regression
Re-Testing
Based upon Application Under Test (AUT)
Object Oriented
Code Walk Through and Coverage
Data Base
Based upon need
Re Test
Regression Speed
Reusability
Repeatability
Comprehensive
7/31/2019 Automation and QTP Introduction
7/56
7/31/2019 Automation and QTP Introduction
8/56
Time alignment of automation andTesting Activity :
TEST ACTIVITY AUTOMATION ACTIVITY
TEST STRATEGYFINALISATION
FINALISATION OF TEST AUTOMATIONLEVEL TARGETED AND MAKING OF TESTAUTOMATION STRATEGY
TEST PLAN PREPERATION CUSTOMISATION OF TOOL , MAKING OF
BASIC MESSAGES
FINAL TEST PLAN AVAILABLE START MAKING TEST SCRIPTS
PRE-QA RELEASE AVAILABLE TEST SCRIPTING COMPLETED., TESTINGOF SCRIPTS STARTED
FINAL RELEASE AVAILABLEFOREVALUATION
START TESTING WITH AUTOMATEDSCRIPTS
7/31/2019 Automation and QTP Introduction
9/56
Benefits of Automated Testing (QTP)
7/31/2019 Automation and QTP Introduction
10/56
How does Automation work?
Inputs Output
Test Data,
Keyboard/MouseOperations, etc.
Actual Results. Expected Results.
Application
Under Test(AUT).
Comparisons
Test Results
7/31/2019 Automation and QTP Introduction
11/56
Types of Automated Testing
7/31/2019 Automation and QTP Introduction
12/56
Certain Types of Automated Testing:
Regression:
Retesting a previously tested program following modification to ensure that faults have not beenintroduced or uncovered as a result of the changes made.
The selective retesting of a software system that has been modified to ensure that any bugs havebeen fixed and that no other previously-working functions have failed as a result of the reparationsand that newly added features have not created problems with previous versions of the software.
It is also referred to as verification testing, regression testing is initiated after a programmer hasattempted to fix a recognized problem or has added source code to a program that may haveinadvertently introduced errors.
It is a quality control measure to ensure that the newly-modified code still complies with itsspecified requirements and that unmodified code has not been affected by the maintenanceactivity.
Regression testing helps to ensure that changes made to the software code do not break otherpreviously working parts of the software. It is important to do regression testing frequently whilewriting code, because the code as a whole may easily "regress" to a lower level of quality aftermaking a change. Regression testing is necessary, even though a change appears to be workingcorrectly and is believed not to affect the rest of the software.
7/31/2019 Automation and QTP Introduction
13/56
Certain Types of Automated Testing:
Object Oriented Testing / Object Property Testing based onFunctionality:
The concept of testing certain properties of objects basedupon certain functionalities established is known as Object Property
Testing.
Sometimes it is impossible to verify certain properties ofobjects like enabled, editable, focused, maximum characters manually.Automation tools have the capability of getting the properties of theseobjects and to evaluate them.
E.g. In banking when defining an account the Specsspecify that when the account type is joint, the joint account holderspopup button should be enabled. Testing this functionality is objectoriented testing.
7/31/2019 Automation and QTP Introduction
14/56
Certain Types of Automated Testing:
GUI Testing:
Testing the GUI is more a part of Usability testing.
Alignment Colors
Tab Order
Object Spacing
Text Field Validations
Caption verifications on Labels etc.
Test tools can easily retrieve these properties of objects directlyfrom the application and hence make it easier to apply the theseproperties as a part of the test.
7/31/2019 Automation and QTP Introduction
15/56
Certain Types of Automated Testing:
Re-Testing:
It is the process of re executing a test case with the
same test data after a bug has been fixed. This ensuresthat the bug is fixed.
If the Bug is not fixed then it is Re-Raised. If a newdefect arises on executing the test case a corresponding
bug is raised. This process leads to multiple rounds oftesting using the same test case and test data.
This is the most common use of an automation tool.
7/31/2019 Automation and QTP Introduction
16/56
Entry Criteria for Test Automation:
Availability of a stable Application Under Test (AUT). (80%test cases passed)
Availability of the Automation Test Tool with the required Add-Ins and Patches.
Availability of a stable and controlled test environment.
Automation Test Strategy Sign Off. Scope (Type of tests).
Functionalities (Features to be automated).
Assumptions.
Features not to be automated.
SIT or UAT Sign Off. Signed Off Manual Test Cases to be provided.
Availability of Stable Test Bed to be provided (if this is not apart of automation).
7/31/2019 Automation and QTP Introduction
17/56
Exit Criteria for Test Automation:
80% of Features to be tested/Scope completed.
Is the Automation Test Suite safe on the AUT, TestData and the Environment?
At least one full test execution with 75% stability ofthe Automation test suite?
70% of the scripts are code covered or codereviewed?
90% stability in Bug/Defect analysis and reporting?(Quality of test)
All developed scripts should be unit tested.
7/31/2019 Automation and QTP Introduction
18/56
7/31/2019 Automation and QTP Introduction
19/56
Tools Overview
Testing tool that creates scripts for staticand dynamic websites to validate all stepsof a process, number of links, images, textarea elements, select elements, forms,
frames, input elements and more.
SegueSilkTest
Link checker, site-mapperMercuryAstraSite Manager
Testing tool that creates scripts for static
and dynamic websites to validate all stepsof a process, number of links, images, textarea elements, select elements, forms,frames, input elements and more.Produces the results in easy-to-readgraphical and tabular reports.
MercuryAstra QuickTest
Link Check,HTML Check,BrowserCompatibility,Load Time CheckSpell Check
NetMechanicNetMechanic
PurposeCompanyName
Tool Name
7/31/2019 Automation and QTP Introduction
20/56
Tools Overview
e-Tester was built solely to test Web-basedapplications. The tool helps create test scripts withoutprogramming and integrates with e-TEST's testmanagement and defect tracking to create an end-to-end testing process.
Empirix IncE Tester
Test Creation and Execution, Test Verification, TestResult Analysis, Test Apps like web, Java,ERP/CRM, PDA applications. Supportsenvironments like UNIFACE, Siebel, SAP, Oracle,Peoplesoft and Powerbuilder.Full Java support.
CompuwareQARun
IBM Rational Robot v2003 automates regression,
functional and configuration testing for e-commerce,client/server and ERP applications. It's used to testapplications based upon a wide variety of userinterface technologies, and is integrated with the
IBM Rational TestManager solution to providedesktop management support for all testing activities
IBMRational Robot
PurposeComp NameTool Name
7/31/2019 Automation and QTP Introduction
21/56
AUTOMATION LIFE CYCLE
7/31/2019 Automation and QTP Introduction
22/56
Automated Testing Life-cycle Methodology
(ATLM)
4. Test Planning,
Design & Dev elopment
3. Automated Testing
Introduction Process
6. Test Program
Rev iew & Assessment
1. Decision to
Automate Test
Automated Testing
Lifecy cle Methodology
(ATLM)
2.TestTool
Acquisition
5.
Executionan
d
ManagementofT
ests
7/31/2019 Automation and QTP Introduction
23/56
Decision to Automate Test
The Decision to Automate Test represents the first phase of theATLM.
This phase covers the entire process that goes into theautomated testing decision.
During this phase it is important for the test team to manageautomated testing expectations and to outline the potentialbenefits of automated testing when implemented correctly.
A test tool proposal needs to be outlined, which will be helpfulin acquiring management support.
Overcoming False Expectations for Automated Testing
Benefits of Automated Testing
Acquiring management support
7/31/2019 Automation and QTP Introduction
24/56
Deliverables
ROI
Proposal Document
7/31/2019 Automation and QTP Introduction
25/56
Test Tool Acquisition
This phase guides the test engineer through the entire test tool evaluation and
selection process, starting with confirmation of management support.
Since a tool should support most of the organizations testing requirements,
whenever feasible, the test engineer will need to review the systems
engineering environment and other organizational needs and come up with a
list of tool evaluation criteria.
The test engineer then needs to define an evaluation domain to pilot the test
tool.
Finally, after all those steps have been completed, the test engineer can make
vendor contact to bring in the selected tool (s).
Deliverable: POC
7/31/2019 Automation and QTP Introduction
26/56
Automated Testing Introduction Phase
Test Process Analysis : Test Process Analysis ensures that an overall test process and
strategy are in place and are modified, if necessary, to allow automated test to be
introduced in a successful fashion. The test engineers define and collect test process
metrics in order to allow for process improvement.
Test Tool Consideration : The Test Tool Consideration phase includes steps that
investigate whether incorporation of automated test tools that have been brought into the
company without a specific project in mind now would be beneficial to a specific
project, given the project testing requirements, available test environment and personnel
resources, the user environment, platform, and product features of the application under
test.
Deliverable: Effort Estimation
7/31/2019 Automation and QTP Introduction
27/56
Test Planning, Design and Development
Test Planning : The Test Planning phase represents the need to reviewlong lead-time test planning activities.
Test Design : The Test Design component addresses the need to definethe number of tests to be performed, the ways that test will beapproached (paths, functions), and the test conditions which need to beexercised. Test design standards need to be defined and followed.
Test Development : Test development involves the development of testprocedures that are maintainable, reusable, simple and robust, which in
itself can be as challenging as the development of the application-under-test. Test procedure development standards need to be in placesupporting structured and consistent development of automated tests.
7/31/2019 Automation and QTP Introduction
28/56
Deliverables
Test Plan
Framework
Data Templates
Test Scripts
Run Chart
7/31/2019 Automation and QTP Introduction
29/56
Execution and Management of Tests
With the test plan in hand and the test environment now
operational, it is time to execute the tests defined for the test
program.
When executing test procedures, the test team will need to
comply with a test procedure execution schedule.
The test procedure execution schedule implements the
strategy defined within the test plan.
Test metrics provide the test manager with key indicators ofthe test coverage, progress, and the quality of the test effort.
Deliverables : Reports, Traceability Matrix
7/31/2019 Automation and QTP Introduction
30/56
Test Program Review and Assessment
Test Program review and assessment activities need to be
conducted throughout the testing life-cycle, in order to
allow for continuous improvement activities.
Following test execution, the test team needs to review the
performance of the test program in order to determine
where improvements can be implemented to improve the
test program performance on the next project.
This test program review represents the final phase of the
Automated Test Life-cycle Methodology (ATLM).
Deliverable : Test Metrics, Enhanced Scripts
7/31/2019 Automation and QTP Introduction
31/56
Advantages
ATLM is a structured methodology that is geared toward
ensuring successful implementation of automated testing.
The end-user of the software product is actively involved
throughout analysis, design, development and test of each
software build, which is augmented in an incremental
fashion.
By using the systematic approach outlined within the
ATLM, organizations are able to organize and execute test
activities in such a way as to maximize test coverage within
the limits of testing resources.
7/31/2019 Automation and QTP Introduction
32/56
What is QTP?
Quick Test Professional (5.6, 6.5, 8.0, 8.2,9.0,9.5).
A Functional Testing Automation Tool.
A Tool by HP.
A GUI based Automation Testing Tool. An Object Oriented Automation testing Tool.
An advanced automated testing solution for buildingfunctional and regression test suites.
7/31/2019 Automation and QTP Introduction
33/56
What does QTP do?
Captures any input information in the form of keyboard or mouseoperations
Will allow to modify and parameterize the operations captured Allows us to enhance the test by adding conditional statements
and control structures
Will allow to insert milestones verification in the form ofcheckpoints Allows us to compare and report test results with that of expected
results Can connect to backend data bases to do a backend verification. Will allow to Run the designed tests and report results Allows to control the test and evaluate the results based on
keyword driven and data driven techniques.
7/31/2019 Automation and QTP Introduction
34/56
Features and Benefits of QTP:
Ensures immediate return on investment through industry-leading easeof use and pre-configured environment support
Operates stand-alone, or integrated into Mercury Business ProcessTesting and Mercury Quality Centre
Introduces next-generation zero-configuration Keyword Driven testingtechnology in Quick Test Professional 8.0 allowing for fast testcreation, easier maintenance, and more powerful data-driving capability
Identifies objects with Unique Smart Object Recognition, even if theychange from build to build, enabling reliable unattended script execution
Handles unforeseen application events with Recovery Manager,facilitating 24x7 testing to meet test project deadlines
7/31/2019 Automation and QTP Introduction
35/56
Features and Benefits of QTP
Preserves your investments in Mercury WinRunner test scripts, by
leveraging TSL assets from QuickTest Professional/WinRunner integration
Rapidly isolates and diagnoses defects with TestFusion reports
Enables thorough validation of applications through a full complement ofcheckpoints
Collapses test documentation and test creation to a single step with Auto-documentation technology
Easily data-drives any object definition, method, checkpoint, and outputvalue via the Integrated Data Table
Provides a complete IDE environment for QA engineers
Supports environments like Windows, Web, .NET, Java/J2EE, SAP, Siebel,Oracle, Peoplesoft, Visual Basic, Activex, Mainframe Terminal Emulators,Web services.
7/31/2019 Automation and QTP Introduction
36/56
WinRunner Vs QTP
7/31/2019 Automation and QTP Introduction
37/56
WinRunner Vs QTP
YesYesWeb App Support
We can mapNo, One Object Repository is created
every time we use an object. Difficult tosee the relationship between them
Maps whole page at one time into the
Object Repository
Expert view onlyYesGraphic and Expert view of script
Lower consumption of Disk spaceMore. Because Graphics are storedDisk Space
FasterSlower due to Quantity of Graphicsdisplayed
Speed
Using TSL we can perform thisStarting URL can be specified with amenu item
Automatically Invokes Browser
Each row of the input data table can beconnected to a built-in checkpoint fileusing a naming convention. Checkpointdata can also be stored in the data tableitself.
A checkpoint can be used to comparedata on a web page with data in a datatable
Data Driven Checkpoints
WinRunnerQuickTest ProFeature
7/31/2019 Automation and QTP Introduction
38/56
WinRunner Vs QTP
Has to be programmed manually.YesKey word Driven
YesNoHas Update Mode
Yes, but usage is CPU intensive.YesException Handling
YesYesDatabase checking
YesYesLinks to Test Director
Export Working table is requiredYesOutput to Data table Saved
YesYesMainframe Supports
YesYesClient Server Support
WinRunnerQuickTest ProFeature
7/31/2019 Automation and QTP Introduction
39/56
Launching QTP:
You can launch QTP fromthe start menu (main way):
You can also Double Clickon the Desk Top Icon (ifthere is one).
You can also launch byclicking on the QTP Icon inthe Task Bar (if there isone).
7/31/2019 Automation and QTP Introduction
40/56
Add-Ins Manager
Add-Ins: Applications are created indifferent environments using differentarchitectures and concepts. Objects,properties and methods for allapplication are not available with QTP.They require special Add-Ins to beinstalled along with QTP.
QuickTest Professional is providedwith several add-ins, including Web,ActiveX, Multimedia, and Visual Basic.You can also purchase additional add-ins separately.
When you work with these add-ins,you can use special checkpoints,methods, and properties to create thebest possible test for your application.
7/31/2019 Automation and QTP Introduction
41/56
Quick Test Window
The QuickTest Professionalwindow opens displaying theStart Page and a blank test.To access a blank test, click
the Test tab.
7/31/2019 Automation and QTP Introduction
42/56
QTP 9.5 Window
7/31/2019 Automation and QTP Introduction
43/56
Keyword View
The Keyword View enables you to create and view the stepsof your test in a keyword-driven, modular, table format. TheKeyword View is comprised of a table-like view, in which eachstep is a separate row in the table, and each column
represents different parts of the steps. You can modify thecolumns displayed to suit your requirements.
7/31/2019 Automation and QTP Introduction
44/56
Expert View
In the Expert View, QuickTest displays each operationperformed on your application in the form of a script,comprised of VBScript statements. The Expert View is a scripteditor with many script editing capabilities. For each object
and method in an Expert View statement, a correspondingrow exists in the Keyword View.
7/31/2019 Automation and QTP Introduction
45/56
7/31/2019 Automation and QTP Introduction
46/56
Active Screen
The Active Screen provides a snapshot of your application as it
appeared when you performed a certain step during a recordingsession.
Additionally, depending on the Active Screen capture options thatyou used while recording, the page displayed in the Active Screencan contain detailed property information about each objectdisplayed on the page.
To view the Active Screen, click the Active Screen button or chooseView > Active Screen.
7/31/2019 Automation and QTP Introduction
47/56
Information Pane
The Information pane provides a list of syntax errors in your test or functionlibrary scripts.
To show or hide the Information pane, choose View > Information or click theInformation button.
When you switch from the Expert View to the Keyword View, QuickTestautomatically checks for syntax errors in your script, and shows them in theInformation pane.
If the Information pane is not currently displayed, QuickTest automatically opensit when a syntax error is detected.
7/31/2019 Automation and QTP Introduction
48/56
Available Keywords Pane
The Available Keywords paneenables you to drag and dropobjects or calls to functionsinto your test.
When you drag and drop anobject into your test, QuickTest
inserts a step with the defaultoperation for that object. When you drag and drop a
function into your test,QuickTest inserts a call to thatfunction.
To view the AvailableKeywords pane, click theAvailable Keywords Panebutton or choose View >Available Keywords.
7/31/2019 Automation and QTP Introduction
49/56
7/31/2019 Automation and QTP Introduction
50/56
Resources Pane
Tests and actions areassociated with resourcessuch as function libraries,recovery scenarios, and objectrepositories.
QuickTest displays all the
resources associated with atest in the Resources pane. The Resources pane enables
you to add, remove, andmanage all of the resources inyour test.
To view the Resources pane,click the Resources Panebutton or choose View>Resources.
7/31/2019 Automation and QTP Introduction
51/56
Missing Resources Pane
The Missing Resources pane provides a list of the resources that arespecified in your test but cannot be found.
Missing resources can include calls to missing actions missing functionlibraries, missing recovery scenarios, a missing XML file used to storeenvironment variables, unmapped shared object repositories, andparameters that are connected to shared object repositories.
To show or hide the Missing Resources pane, choose View > MissingResources or click the Missing Resource button.
7/31/2019 Automation and QTP Introduction
52/56
Process Guidance Panes
Process guidance is a toolthat provides proceduresand descriptions on how tobest perform specificprocesses.
Process guidance isdisplayed in two panes: theProcess Guidance Activitiespane and the ProcessGuidance Description pane.
You display or hide these
panes by choosing View >Process Guidance orclicking the ProcessGuidance panes togglebutton.
7/31/2019 Automation and QTP Introduction
53/56
Data Table
The Data Table contains one Global tab plus an additional tabfor each action in your test. The Data Table assists you inparameterize your test.
To view the Data Table, click the Data Table toolbar button orchoose View > Data Table.
The Data Table is a Microsoft Excel-like sheet with columnsand rows representing the data applicable to your test.
7/31/2019 Automation and QTP Introduction
54/56
7/31/2019 Automation and QTP Introduction
55/56
Different types of Tool Bars in QTP :
Standard Tool Bar
Automation Tool Bar
Debug Tool Bar
Edit Tool Bar
Insert Tool Bar
Tools Tool Bar
View Tool Bar
Action Tool Bar
7/31/2019 Automation and QTP Introduction
56/56
THANK YOU