You are on page 1of 56

QTP INTERFACE

INTRODUCTION TO AUTOMATION

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.

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 scripting interface. Development of reusable and modular scripts. Verification of scripts Implementation of a test management system (which controls and synchronizes the multiple tests points, executes tests in batch mode and consolidates the testing results)

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.

What can be automated?

Based upon type of Test

Functional Performance Load, Stress and Volume System Tests and Integration tests Regression Re-Testing Object Oriented Code Walk Through and Coverage Data Base Re Test Regression Speed Reusability Repeatability Comprehensive

Based upon Application Under Test (AUT)


Based upon need


When to Automate?

Repetitive is the keyword


Data upload (Partial / Complete) Re Testing Regression (Versions and Builds) Speed (On repetitive tests) Where manually it is not possible to test.

Time alignment of automation and Testing Activity :


TEST ACTIVITY TEST STRATEGY FINALISATION TEST PLAN PREPERATION FINAL TEST PLAN AVAILABLE AUTOMATION ACTIVITY FINALISATION OF TEST AUTOMATION LEVEL TARGETED AND MAKING OF TEST AUTOMATION STRATEGY CUSTOMISATION OF TOOL , MAKING OF BASIC MESSAGES START MAKING TEST SCRIPTS

PRE-QA RELEASE AVAILABLE TEST SCRIPTING COMPLETED., TESTING OF SCRIPTS STARTED FINAL RELEASE AVAILABLE FOR EVALUATION START TESTING WITH AUTOMATED SCRIPTS

Benefits of Automated Testing (QTP)

How does Automation work?

Inputs Application Under Test (AUT).


Test Data, Keyboard/Mouse Operations, etc.

Output Comparisons
Actual Results. Expected Results.

Test Results

Types of Automated Testing

Certain Types of Automated Testing:

Regression:

Retesting a previously tested program following modification to ensure that faults have not been introduced 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 have been fixed and that no other previously-working functions have failed as a result of the reparations and 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 has attempted to fix a recognized problem or has added source code to a program that may have inadvertently introduced errors. It is a quality control measure to ensure that the newly-modified code still complies with its specified requirements and that unmodified code has not been affected by the maintenance activity.

Regression testing helps to ensure that changes made to the software code do not break other previously working parts of the software. It is important to do regression testing frequently while writing code, because the code as a whole may easily "regress" to a lower level of quality after making a change. Regression testing is necessary, even though a change appears to be working correctly and is believed not to affect the rest of the software.

Certain Types of Automated Testing:

Object Oriented Testing / Object Property Testing based on Functionality:


The concept of testing certain properties of objects based upon certain functionalities established is known as Object Property Testing.

Sometimes it is impossible to verify certain properties of objects like enabled, editable, focused, maximum characters manually. Automation tools have the capability of getting the properties of these objects and to evaluate them.
E.g. In banking when defining an account the Specs specify that when the account type is joint, the joint account holders popup button should be enabled. Testing this functionality is object oriented testing.

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 directly from the application and hence make it easier to apply the these properties as a part of the test.

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 ensures that the bug is fixed. If the Bug is not fixed then it is Re-Raised. If a new defect arises on executing the test case a corresponding bug is raised. This process leads to multiple rounds of testing using the same test case and test data. This is the most common use of an automation tool.

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 AddIns 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 a part of automation).

Exit Criteria for Test Automation:

80% of Features to be tested/Scope completed. Is the Automation Test Suite safe on the AUT, Test Data and the Environment? At least one full test execution with 75% stability of the Automation test suite? 70% of the scripts are code covered or code reviewed? 90% stability in Bug/Defect analysis and reporting? (Quality of test) All developed scripts should be unit tested.

OVERVIEW OF VARIOUS AUTOMATION TOOLS

Tools Overview
Tool Name
NetMechanic

Company Name
NetMechanic

Purpose
Link Check,HTML Check,Browser Compatibility,Load Time Check Spell Check Testing tool that creates scripts for static and dynamic websites to validate all steps of a process, number of links, images, text area elements, select elements, forms, frames, input elements and more. Produces the results in easy-to-read graphical and tabular reports. Link checker, site-mapper Testing tool that creates scripts for static and dynamic websites to validate all steps of a process, number of links, images, text area elements, select elements, forms, frames, input elements and more

Astra QuickTest

Mercury

AstraSite Manager SilkTest

Mercury Segue

Tools Overview
Tool Name Comp Name Purpose

Rational Robot

IBM

IBM Rational Robot v2003 automates regression, functional and configuration testing for e-commerce, client/server and ERP applications. It's used to test applications based upon a wide variety of user interface technologies, and is integrated with the
IBM Rational TestManager solution to provide desktop management support for all testing activities

QARun

Compuware

Test Creation and Execution, Test Verification, Test Result Analysis, Test Apps like web, Java, ERP/CRM, PDA applications. Supports environments like UNIFACE, Siebel, SAP, Oracle, Peoplesoft and Powerbuilder.Full Java support. e-Tester was built solely to test Web-based applications. The tool helps create test scripts without programming and integrates with e-TEST's test management and defect tracking to create an end-toend testing process.

E Tester

Empirix Inc

AUTOMATION LIFE CYCLE

Automated Testing Life-cycle Methodology (ATLM)


4. Test Planning, Design & Dev elopment 3. Automated Testing Introduction Process

5. Execution and Management of Tests

Automated Testing Lif ecy cle Methodology (ATLM)

6. Test Program Rev iew & Assessment

1. Decision to Automate Test

2. Test Tool Acquisition

Decision to Automate Test

The Decision to Automate Test represents the first phase of the ATLM. This phase covers the entire process that goes into the automated testing decision. During this phase it is important for the test team to manage automated testing expectations and to outline the potential benefits of automated testing when implemented correctly. A test tool proposal needs to be outlined, which will be helpful in acquiring management support. Overcoming False Expectations for Automated Testing Benefits of Automated Testing Acquiring management support

Deliverables

ROI

Proposal Document

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

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

Test Planning, Design and Development

Test Planning : The Test Planning phase represents the need to review long lead-time test planning activities. Test Design : The Test Design component addresses the need to define the number of tests to be performed, the ways that test will be approached (paths, functions), and the test conditions which need to be exercised. Test design standards need to be defined and followed. Test Development : Test development involves the development of test procedures that are maintainable, reusable, simple and robust, which in itself can be as challenging as the development of the applicationunder-test. Test procedure development standards need to be in place supporting structured and consistent development of automated tests.

Deliverables

Test Plan Framework Data Templates Test Scripts Run Chart

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 of the test coverage, progress, and the quality of the test effort. Deliverables : Reports, Traceability Matrix

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

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.

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 building functional and regression test suites.

What does QTP do?


Captures any input information in the form of keyboard or mouse operations 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 of checkpoints 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.

Features and Benefits of QTP:

Ensures immediate return on investment through industry-leading ease of use and pre-configured environment support Operates stand-alone, or integrated into Mercury Business Process Testing and Mercury Quality Centre Introduces next-generation zero-configuration Keyword Driven testing technology in Quick Test Professional 8.0 allowing for fast test creation, easier maintenance, and more powerful data-driving capability Identifies objects with Unique Smart Object Recognition, even if they change from build to build, enabling reliable unattended script execution

Handles unforeseen application events with Recovery Manager, facilitating 24x7 testing to meet test project deadlines

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 of checkpoints Collapses test documentation and test creation to a single step with Autodocumentation technology Easily data-drives any object definition, method, checkpoint, and output value 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.

WinRunner Vs QTP

WinRunner Vs QTP
Feature
Data Driven Checkpoints

QuickTest Pro
A checkpoint can be used to compare data on a web page with data in a data table

WinRunner
Each row of the input data table can be connected to a built-in checkpoint file using a naming convention. Checkpoint data can also be stored in the data table itself. Using TSL we can perform this Faster Lower consumption of Disk space Expert view only We can map

Automatically Invokes Browser Speed Disk Space Graphic and Expert view of script Maps whole page at one time into the Object Repository

Starting URL can be specified with a menu item Slower due to Quantity of Graphics displayed More. Because Graphics are stored Yes No, One Object Repository is created every time we use an object. Difficult to see the relationship between them Yes

Web App Support

Yes

WinRunner Vs QTP
Feature
Client Server Support Mainframe Supports Output to Data table Saved

QuickTest Pro
Yes Yes Yes

WinRunner
Yes Yes Export Working table is required

Links to Test Director


Database checking

Yes
Yes

Yes
Yes

Exception Handling

Yes

Yes, but usage is CPU intensive.

Has Update Mode

No

Yes

Key word Driven

Yes

Has to be programmed manually.

Launching QTP:

You can launch QTP from the start menu (main way):

You can also Double Click on the Desk Top Icon (if there is one).
You can also launch by clicking on the QTP Icon in the Task Bar (if there is one).

Add-Ins Manager

Add-Ins: Applications are created in different environments using different architectures and concepts. Objects, properties and methods for all application are not available with QTP. They require special Add-Ins to be installed along with QTP.

QuickTest Professional is provided with several add-ins, including Web, ActiveX, Multimedia, and Visual Basic. You can also purchase additional addins separately.
When you work with these add-ins, you can use special checkpoints, methods, and properties to create the best possible test for your application.

Quick Test Window

The QuickTest Professional window opens displaying the Start Page and a blank test. To access a blank test, click the Test tab.

QTP 9.5 Window

Keyword View

The Keyword View enables you to create and view the steps of your test in a keyword-driven, modular, table format. The Keyword View is comprised of a table-like view, in which each step is a separate row in the table, and each column represents different parts of the steps. You can modify the columns displayed to suit your requirements.

Expert View

In the Expert View, QuickTest displays each operation performed on your application in the form of a script, comprised of VBScript statements. The Expert View is a script editor with many script editing capabilities. For each object and method in an Expert View statement, a corresponding row exists in the Keyword View.

Function Library

QuickTest provides a built-in editor that enables you to create and debug function libraries using the same editing features that are available in the Expert View. Each function library is a separate QuickTest document containing VBscript functions, subroutines, classes, modules, and so forth. Each function library opens in its own window, in addition to the test that is already open. You can work on one or several function libraries at the same time. After you finish editing a function library, you can close it, leaving your QuickTest session open. You can also close all open function libraries simultaneously

Active Screen

The Active Screen provides a snapshot of your application as it appeared when you performed a certain step during a recording session. Additionally, depending on the Active Screen capture options that you used while recording, the page displayed in the Active Screen can contain detailed property information about each object displayed on the page. To view the Active Screen, click the Active Screen button or choose View > Active Screen.

Information Pane

The Information pane provides a list of syntax errors in your test or function library scripts. To show or hide the Information pane, choose View > Information or click the Information button. When you switch from the Expert View to the Keyword View, QuickTest automatically checks for syntax errors in your script, and shows them in the Information pane. If the Information pane is not currently displayed, QuickTest automatically opens it when a syntax error is detected.

Available Keywords Pane

The Available Keywords pane enables you to drag and drop objects or calls to functions into your test. When you drag and drop an object into your test, QuickTest inserts a step with the default operation for that object. When you drag and drop a function into your test, QuickTest inserts a call to that function. To view the Available Keywords pane, click the Available Keywords Pane button or choose View > Available Keywords.

Test Flow Pane

The Test Flow pane is comprised of a hierarchy of actions and action calls in the current test, and shows the order in which they are run. Each action is displayed as a node in a tree, and includes calls to all of a tests actions. The steps of the action that you double-click in the Test Flow pane are displayed in the Keyword View and Expert View. The Test Flow pane is displayed by default when you start QuickTest Professional. To view the Test Flow pane, click the Test Flow Pane button or choose View > Test Flow.

Resources Pane

Tests and actions are associated with resources such as function libraries, recovery scenarios, and object repositories. QuickTest displays all the resources associated with a test in the Resources pane. The Resources pane enables you to add, remove, and manage all of the resources in your test. To view the Resources pane, click the Resources Pane button or choose View >Resources.

Missing Resources Pane

The Missing Resources pane provides a list of the resources that are specified in your test but cannot be found. Missing resources can include calls to missing actions missing function libraries, missing recovery scenarios, a missing XML file used to store environment variables, unmapped shared object repositories, and parameters that are connected to shared object repositories. To show or hide the Missing Resources pane, choose View > Missing Resources or click the Missing Resource button.

Process Guidance Panes

Process guidance is a tool that provides procedures and descriptions on how to best perform specific processes. Process guidance is displayed in two panes: the Process Guidance Activities pane and the Process Guidance Description pane. You display or hide these panes by choosing View > Process Guidance or clicking the Process Guidance panes toggle button.

Data Table

The Data Table contains one Global tab plus an additional tab for each action in your test. The Data Table assists you in parameterize your test. To view the Data Table, click the Data Table toolbar button or choose View > Data Table. The Data Table is a Microsoft Excel-like sheet with columns and rows representing the data applicable to your test.

Debug Viewer

Watch
The Watch tab enables you to view the current value of any variable or VBScript expression that you added to the Watch tab.

Variables
During a run session, the Variables tab displays the current value of all variables that have been recognized up to the last step performed in the run session.

Command
The Command tab enables you to run a line of script to set or modify the current value of a variable or VBScript object in your test or function library. When you continue the run session, QuickTest uses the new value that was set in the command.

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

THANK YOU

You might also like