Automation Testing Training(QTP)

  • View
    134

  • Download
    2

Embed Size (px)

Text of Automation Testing Training(QTP)

Automation Testing Training(QTP)

Rajesh Valluru

Session ObjectivesIntroduction to Automation Benefits of Automated Testing Automated Testing Process Introduction to QTP and its Salient Features Environment Supported

Introduction to Automation

Drawbacks of Manual testingManual testing is time-consuming and tedious.

Manual Testing

Requiring a heavy investment in human resources. Time constraints often make it impossible to manually test every feature thoroughly before the application is released. Low reliability

Benefits of Automated TestingWhy Automation ?Fast Reliable Repeatable Programmable Comprehensive Reusable

Automated Testing

Which Test Cases to Automate?Tests that need to be run for every build of the application (sanity check, regression test). Tests that use multiple data values for the same actions (data driven tests) Stress/load testing Tests requiring a great deal of precision

Which Test Cases Not to Automate?Usability testing"How easy is the application to use?

One-time testing "ASAP" testing"We need to test NOW!

Ad hoc/random testing

based on intuition and knowledge of application

Leading Automation Tools available in the Market For Functional testingWinRunner QTP Rational Robot Silk Test QA Run

Automated Testing Process

Automated testing involves three main steps

Creating Script(s) Executing Script(s) Analyzing Result(s)

Advantages of QTP over Win runnerQTP has user-friendly Browser, At a Glance we can have a look of Scripts, Active Screen and the Data XL Sheet. QTP uses VB Script while win runner uses TSL which is C language based QTP has Recovery Manager QTP generates output values and these can be used as input values to other Objects

Click to edit Master text styles Second level Third level Fourth level Fifth level

Introduction to QTPQuick Test Professional is the flagship functional testing tool from Mercury Interactive. Now HP undertaken it. It is an icon based tool, which automates the functional & regression testing of an application. QTP is easier to use and implement for both technical & non technical testers in comparison to other functional testing tools available. Available versions are QTP 8.2,9.2 and 9.5

Salient FeaturesIts Active Screen technology offers a Point-and-check interface for accessing & interacting with the components of the application under test. QTP produces an Icon-Based test tree in which each branch represents a step in the business process Testers can view and edit their test using either the tree view, an Icon-Based representation, or the expert View, which reveals the VBScript test that QTP automatically generates. QTP can automatically introduce Checkpoints

Salient Features

During execution testers can manually insert several types of check points to verify that the objects continue to behave as expected. These check points are shown in the presentation in the later stage Testers are able to record their tests so that each action, or step in the business process are modular & reusable. When application under test changes, testers can update Object Repository, thus the change made is then propagated across all the scripts that reference to this object

EX: In the Authentication screen when the name of the button is changed to Sign In form Login, Just make an update in the Object Repository.

Salient Features

After running a test QTP displays the results in a tress structure and in clear visual reports Scripting Language is VBScript which is easy to use , understand and program even complex functionalities with ease.. Library files contains VBScript functions and subroutines that can be added to the test. Support Modern Development Environment.

Quick Test testing processThe Quick Test testing process consists of 7 main phases:

Preparing to record Recording a session on your application Enhancing your test Debugging your test Running your test Analyzing the test results Reporting defects

AddIn ManagerDefault ActiveX Visual Basic Web

Additional Java Oracle PeopleSoft

Environments Supported

Basic Web Technologies HTML DHTML XML Browsers Netscape Internet Explorer AOL Advanced Web Technologies JavaScript Java ActiveX

Environments Supported

Multimedia Technologies Flash RealAudio/Real Video MS Media Player ERP Solutions mySAP.com Siebel 2001 Oracle PeopleSoft

Environments SupportedWeb Services XML WSDL

Operating Systems Windows XP/2003 Windows 2000 Windows 98 Windows NT Windows ME

Environments SupportedTerminal Emulators 3270 5250 VT100 Languages European Japanese Chinese (traditional and simplified) Korean

Environments not SupportedCustom C/S

PowerBuilder Forte Delphi Centura Stingray Smalltalk

ERP/CRM

Baan PeopleSoft Windows Siebel 5, 6 GUI Clients Oracle GUI Forms

QTP ScreenClick to edit Master text styles Second level Third level Fourth level Fifth level

Important ToolbarsTest toolbar: containing buttons to assist you in the testing process(ex: record, Run..) Debug toolbar: containing buttons to assist you in debugging your test Action toolbar: containing buttons and a list of actions, enabling you to view the details of an individual action or the entire test flow Test pane: containing two tabs to view your testthe Keyword View and the Expert View Test Details pane : containing the Active Screen

What you need to Know in QTP?How are the objects recognized? What is Object Repository? What is Object Recognition configuration? What is Active Screen? What is Keyword View and Expert View? What are Actions? What are the checkpoints available? Output Values Synchronization Point Data Driven Tests Transaction Response Time Exception Handling Reporting

Recording Modes in QTPNormal: This mode is the default and takes full advantage of Quick Test's test object model, recognizing the objects in your application regardless of their location on the screen

Analog Recording: Enables you to records the exact mouse and keyboard operations you perform in relation to either the screen or the application window. In this recording mode, Quick Test record and tracks every movement of the mouse as you drag the mouse around a screen or window. User cannot edit analog recording steps from within Quick Test

Recording Modes in QTPLow Level Recording: Enables you to record on any object in your application, whether or not Quick Test recognizes the specific object or the specific operation. This mode records at the object level and records all run-time objects as Window or Win Object test objects. Use low-level Recording for Recording tests in an environment or on an object not recognized by Quick Test. You can also use lowlevel Recording if the exact coordinates of the object are important for your test.

What you need to Know in QTP?How are the objects recognized? What is Object Repository? What is Object Recognition configuration? What is Active Screen? What is Keyword View and Expert View? What are Actions? What are the checkpoints available? Output Values Synchronization Point Data Driven Test? Transaction Response Time

Object Repository

Object Repository acts as a translator between QTP script and the Operating System ( similar to GUI map concept in win runner).

QTP stores information it learns about a window or an object in object repository

When QTP runs a test, it uses the object repository to locate objects. QTP reads an objects description in the repository and then looks for an object with the same properties in the application under test.

How QTP Stores Objects

Generates Script

Add objects using object identification settings

Object Repository

QTP TEST SCRIPT

Object Repository

Types of Object Repositories

Per Action Object Repository Shared Object Repository

Object Repository Per Action

TEST 1 ACTION 1 ACTION 2 TEST 2 ACTION 1 ACTION 2

Repository Repository

Object

Object

Repository

Object

Repository

Object

Shared Object RepositoryTEST 1 ACTION 1 ACTION 2 Object Repository

TEST 2 ACTION 1 ACTION 2

Per Action vs. Shared Object RepositoryPer Action Object Repositoryq

Shared Object Repositoryq

Separate action repository for each action. If an object description changes, you need to modify the object in every action repository using that object. No need for any Object Repository administrator. Preferred method if application wont change during renovation Default Object Repository.

q

can use the same shared object repository file for multiple tests. If an object description changes, you only have to modify in the shared Object Repository all tests will playback properly. Requires Shared object repository creation and maintenance.

q

q

q

q

q

What you need to Know in QTP?How are the objects recognized? What is Object Repository? What is Object Recognition configuration? What is Active Screen? What is Keyword View and Expert View? What are Actions? What are the checkpoints available? Output Values Synchronization Point Data Driven Test? Transaction Response Time Exception Handling Reporting

Object Recognition configurationTo identify objects uniquely, object identification configuration can be done. User can configure Mandatory, Assistive properties and ordinal identifier Examples:

List Box Combo Box Text Box Text Area

Smart Object IdentificationSmart Object Identification to Ensure Successful Test Execution A sophisticated object recognition mechanism allows tests to automatically recover when obj