hp qtp quick test professional basics online training ppt

52
For more details please contact us: US : +1 718 819 9361 INDIA : +91 8099776681 Email Us : [email protected] Welcome to QTP (QUICK TEST PROFESSIONAL)

Upload: kernel-training

Post on 15-Apr-2017

769 views

Category:

Education


3 download

TRANSCRIPT

Page 1: HP QTP Quick Test Professional Basics Online Training PPT

For more details please contact us:US : +1 718 819 9361INDIA : +91 8099776681Email Us : [email protected]

Welcome to QTP(QUICK TEST PROFESSIONAL)

Page 2: HP QTP Quick Test Professional Basics Online Training PPT

2 http://kerneltraining.com/qtp/

What is QTP QTP stands for QuickTest Professional It is an automated testing tool provided by

HP/Mercury Interactive QTP integrates with other Mercury testing

solutions including:• TestDirector/Quality Center• WinRunner• LoadRunner

Utilizes an add-in architecture for compactness and extensibility

Page 3: HP QTP Quick Test Professional Basics Online Training PPT

3 http://kerneltraining.com/qtp/

Types of Testing

Manual• Usage of steps defined within test cases

to manually test the application to ensure that it functions properly

Automated• Automation of the manual testing process

to all unattended execution and ensure repeatability

Page 4: HP QTP Quick Test Professional Basics Online Training PPT

4 http://kerneltraining.com/qtp/

What Should Be Automated Good candidates

• Tests executed for each build• Business critical tests• Tests that are difficult/tedious to perform

manually

Bad candidates• Tests without predictable results• Test that require variable input/responses from

the tester• Tests that perform operations in multiple

environments

Page 5: HP QTP Quick Test Professional Basics Online Training PPT

5 http://kerneltraining.com/qtp/

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

Page 6: HP QTP Quick Test Professional Basics Online Training PPT

6 http://kerneltraining.com/qtp/

QTP – An Introduction Quick Test Professional is the flagship functional testing

tool from Mercury Interactive.

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.

The new version of HP QTP is being called HP Unified Functional Testing 11.5 (UFT 11.5). UFT 11.5 is actually a combination of HP QTP (for testing GUI) and HP Service Test (for testing API).

Page 7: HP QTP Quick Test Professional Basics Online Training PPT

7 http://kerneltraining.com/qtp/

Leading Available Automation Tools

Page 8: HP QTP Quick Test Professional Basics Online Training PPT

8 http://kerneltraining.com/qtp/

Salient Features

Scripting Language is VBScript which is easy to use , understand and program even complex functionalities with ease..

Uses “Active Screen” technology to record scripts which aids the tester in referring to the screens object properties.

Library files contains VBScript functions and subroutines that can be added to the test.

Support Modern Development Environment.

Page 9: HP QTP Quick Test Professional Basics Online Training PPT

9 http://kerneltraining.com/qtp/

QTP Environment

Windows• C++, Visual Basic, Java, .NET

Web• Web Applications, Web services

Other technologies• SAP, Siebel, Oracle, Peoplesoft,

ActiveX

Page 10: HP QTP Quick Test Professional Basics Online Training PPT

10 http://kerneltraining.com/qtp/

Add-in Architecture

Enables QTP to provide support for multiple technologies.

Add-ins are software that need to be installed on a system that has QTP. It then becomes integrated with the QTP environment.

QTP is sold with the ability to understand a few technologies, add-ins provide QTP with the ability to understand additional technologies

Users are able to select the specific add-ins for the technologies they are testing thereby reducing the memory footprint of QTP

Page 11: HP QTP Quick Test Professional Basics Online Training PPT

11 http://kerneltraining.com/qtp/

QTP Add-ins

When QTP is started, you should select only the add-ins for technologies that are used with your application.

Some of the available add-ins are• ActiveX - For testing software written using ActiveX

(also known as COM) technology. This technology allows people to create objects in one language and use those objects within other languages/applications

• Visual Basic - For applications written in the Visual Basic language

• Web - For testing web applications written in any language. In web applications, we interact with the application though a web browser and so the web application can be written in any language.

Page 12: HP QTP Quick Test Professional Basics Online Training PPT

12 http://kerneltraining.com/qtp/

The Main Screen

Page 13: HP QTP Quick Test Professional Basics Online Training PPT

13 http://kerneltraining.com/qtp/

Testing Process

Create Object Repository Create Tests

o Recordo Edit

• Insert checkpoints• Insert synchronization points• Insert output values• Parameterize test• Include VBScript code

Debug test Run tests

Page 14: HP QTP Quick Test Professional Basics Online Training PPT

14 http://kerneltraining.com/qtp/

What is a QTP Test

It is called a test script but is actually a folder containing several files

Broken down into subparts known as 'Actions‘

Internally represented using the VBScript programming language

Page 15: HP QTP Quick Test Professional Basics Online Training PPT

15 http://kerneltraining.com/qtp/

Actions

A test is broken into a series of ‘Actions’• Actions can be renamed to reflect what

they do

• Actions can be invoked multiple times within a test

• Actions can be marked as reusable so they can be called from other tests

Only reusable actions can be called from other tests

reusable actions can be called from other

Page 16: HP QTP Quick Test Professional Basics Online Training PPT

16 http://kerneltraining.com/qtp/

Menus Toolbar

• Provides easy access to items on the menus

Record & Run Settings Test Settings Tools

Overview QTP Tool

Page 17: HP QTP Quick Test Professional Basics Online Training PPT

17 http://kerneltraining.com/qtp/

QTP Tool [Code Window]

Provides a WYSIWYG editor to use in writing your test scripto Keyboard view

• Provides an icon-based representation of the code being written. This is often the easiest code view for non-programmers

o Expert View• Provides a VBScript code based representation

of the code being written. This is the most flexible code

Page 18: HP QTP Quick Test Professional Basics Online Training PPT

18 http://kerneltraining.com/qtp/

QTP Tool [Views]

Active Screen• Provides screenshots of all objects

recorded and also supports object highlighting

Data Table• Shows the data file that can be used to

configure the application Debug Viewer

• Provides tools to debug code and view the value of variable/expression during code execution

Page 19: HP QTP Quick Test Professional Basics Online Training PPT

19 http://kerneltraining.com/qtp/

Create Object Repository [STEP 1]

Intro to Object Oriented Programming

o Objects are a representation of every item found in an application

o Objects are visual (e.g. Button, Textbox) and non-visual (e.g. Dictionary, Reporter) elements within an application. Each object has the following elements• Properties, Methods & Events

o All objects must have a unique name and belong to a class.

o Objects are referenced in code using dot notation objectName.Method()

Page 20: HP QTP Quick Test Professional Basics Online Training PPT

20 http://kerneltraining.com/qtp/

Objects Properties

• These are characteristics of the object e.g. the text on a button. QTP uses this to recognize the object

Methods• These are built in functionality of the object. The VBScript

code that we write (or record) actually makes calls to the methods of an object e.g. Reporter.ReportEvent() Here ReportEvent is the method of the Reporter object

Events• These are what can be done to an object. This is used by

programmers to determine what an object does in response to an action you perform. It is however unused in QTP.

Page 21: HP QTP Quick Test Professional Basics Online Training PPT

21 http://kerneltraining.com/qtp/

Objects

Page 22: HP QTP Quick Test Professional Basics Online Training PPT

22 http://kerneltraining.com/qtp/

QTP Object Identification Process

Object Identification• The tool determines what properties of

objects are recorded Object Spy

• Allows users to view the property of an object without recording it

Object Repository• Holds information recorded about each

object allowing the test to identify the object during execution

Page 23: HP QTP Quick Test Professional Basics Online Training PPT

23 http://kerneltraining.com/qtp/

Creating an Object Repository

Per Action• An object repository is created for each

action • This means that multiple object

repositories can be created per test

Shared• A single object repository is used for

multiple tests

Page 24: HP QTP Quick Test Professional Basics Online Training PPT

24 http://kerneltraining.com/qtp/

CREATE TEST [STEP 2]

Record Steps Edit

• Insert synchronization points• Insert checkpoints• Insert output values• Parameterize values• Include VBScript code

Page 25: HP QTP Quick Test Professional Basics Online Training PPT

25 http://kerneltraining.com/qtp/

Record

Read the outline of steps to perform Practice performing the steps to

minimize error Choose record mode

• Context Sensitive• Analog• Low level

RECORD Stop, Save test, playback

Page 26: HP QTP Quick Test Professional Basics Online Training PPT

26 http://kerneltraining.com/qtp/

To Record a Test

Page 27: HP QTP Quick Test Professional Basics Online Training PPT

27 http://kerneltraining.com/qtp/

Keyword View

Page 28: HP QTP Quick Test Professional Basics Online Training PPT

28 http://kerneltraining.com/qtp/

Expert View

Page 29: HP QTP Quick Test Professional Basics Online Training PPT

29 http://kerneltraining.com/qtp/

Edit Test

Insert synchronization points• Used to slow down execution of a test script

Checkpoints• Used to check expected value of a step

against the actual value at a specific point during execution

Insert output values• Used to retrieve values from the AUT

Insert Parameterization• Allows you to store data in the data table

Include VB Script code• Last option. Very powerful.

Page 30: HP QTP Quick Test Professional Basics Online Training PPT

30 http://kerneltraining.com/qtp/

Synchronization Point

Specific time• Uses the wait function to pause the test for

a specific amount of time [in seconds] Until an event occurs

• Pauses until a specific property of an object has a specific value

A synchronization point is a line in the test script that instructs QTP to wait for a certain response from the application during playback.

Page 31: HP QTP Quick Test Professional Basics Online Training PPT

31 http://kerneltraining.com/qtp/

How to Add Synchronization Points Locate the lines in the script to insert the

synchronization point

In Quick Test choose Insert > Step > Synchronization Point. The mouse pointer turns into a pointing hand. This should be done while recording.

Using the Hand Pointer click on the object to Synchronize.

Add Synchronization Point dialog box opens.

Page 32: HP QTP Quick Test Professional Basics Online Training PPT

32 http://kerneltraining.com/qtp/

Check Points in QTP

• A checkpoint verifies that expected information is displayed in your application while the test is running.

Page 33: HP QTP Quick Test Professional Basics Online Training PPT

33 http://kerneltraining.com/qtp/

Checkpoints Standard

• Checks multiple properties of a single object Text

• Checks part or all the text within an object Text Area

• Checks part or all the text within a text area object Bitmap

• Checks the visual layout of an entire object or a portion of the object

Database• Checks data in the database

Accessibility• Checks web content accessibility against W3C

accessibility rules for the disabled XML

• Checks files using XML rules

Page 34: HP QTP Quick Test Professional Basics Online Training PPT

34 http://kerneltraining.com/qtp/

Inserting Check Points

Right Click the object and select Insert Checkpoint.

Page 35: HP QTP Quick Test Professional Basics Online Training PPT

35 http://kerneltraining.com/qtp/

Output values Standard

• Stores a single property of an object in the data table Text

• Stores part or all the text of an object in the data table Text Area

• Stores the content of a text area in the data table Database

• Retrieves content from a database [using a SQL query] and stores it in the data table

XML• Retrieves content from an XML file and store it in the data

table

Page 36: HP QTP Quick Test Professional Basics Online Training PPT

36 http://kerneltraining.com/qtp/

Parameterize Data

Allows your test to read data from the data table.

The data table is an Excel spreadsheet file editable from using Excel or any other application that can edit a .xls document

The DataTable is encapsulated in QTP in the DataTable object. This object contains a sheet for every action in the test as well as a globally accessible sheet known as the global sheet

Each sheet in the DataTable contains several columns and rows.

The columns can be renamed by double-clicking on the header of the column.

Page 37: HP QTP Quick Test Professional Basics Online Training PPT

37 http://kerneltraining.com/qtp/

Why Parameterization ?

Parameterization allows us to pick different values at run time.

Reduces Time and Effort.

Usage of data drivers allow us to use the same data for various input boxes.

Parameterization can also be done for checkpoints.

Page 38: HP QTP Quick Test Professional Basics Online Training PPT

38 http://kerneltraining.com/qtp/

Parameterization Continues

Page 39: HP QTP Quick Test Professional Basics Online Training PPT

Slide 39http://kerneltraining.com/informatica/

Global and Action Data Sheets

The Data Table contains two types of sheets:

Global sheet: This enables you to share information from one action to another. Should be used for data drivers and Output Values.

Action Sheet: Each action also has its own sheet in the Data Table so that you can insert data that applies only to that action.

When there are parameters in a current action’s sheet, you can set Quick Test to run one or more iterations on that action before continuing with the current global iteration of the test.

Page 40: HP QTP Quick Test Professional Basics Online Training PPT

40 http://kerneltraining.com/qtp/

VBScript Coding

When the tools provided by QTP are not sufficient to test an application, VBScript coding can be used.

VBScript was created as a web programming language by Microsoft and licensed by many companies for use in their tools.

Page 41: HP QTP Quick Test Professional Basics Online Training PPT

41 http://kerneltraining.com/qtp/

VBScript Coding

Analyzing Test Results

Page 42: HP QTP Quick Test Professional Basics Online Training PPT

42 http://kerneltraining.com/qtp/

Test Results Window

Page 43: HP QTP Quick Test Professional Basics Online Training PPT

43 http://kerneltraining.com/qtp/

Test Results

Test Results Tree - an icon-based view of the steps that were performed while the test was running. Similar to the test tree in Quick Test main screen

Iteration Summary – Provides the Status (pass/Fail) of each iteration individually.

Status Summary - Indicates the number of checkpoints or reports that passed, failed, and raised warnings during the test.

Page 44: HP QTP Quick Test Professional Basics Online Training PPT

44 http://kerneltraining.com/qtp/

Viewing Test Results

Page 45: HP QTP Quick Test Professional Basics Online Training PPT

45 http://kerneltraining.com/qtp/

Viewing Test Results

Integration of Winrunner, QTP & Test Director

Page 46: HP QTP Quick Test Professional Basics Online Training PPT

46 http://kerneltraining.com/qtp/

Why Integrate QTP ? With Win Runner

Facilitates running Win Runner tests and call TSL functions in compiled modules with parameters by creating calls to Win Runner tests and functions.

With Test Director (TD)

TD, Mercury Interactive test management tool, can help you organize and control the testing process. It provides an intuitive and efficient method for scheduling and running tests, collecting test results, analyzing the results, and managing test versions.

Page 47: HP QTP Quick Test Professional Basics Online Training PPT

47 http://kerneltraining.com/qtp/

QTP & WinRunner

QTP can easily be integrated with Win Runner, Test Director and Load Runner.

If the Winrunner is already installed and being used, then QTP can be added without the loss of Winrunner scripts.

Quick Test Pro will be able to call Win Runner Scripts.

A single test can contain both Winrunner & QTP scripts.

Page 48: HP QTP Quick Test Professional Basics Online Training PPT

48 http://kerneltraining.com/qtp/

Advantages of QTP over other Functional Automation tools

Easy to use, icon based scripts. Easier for non technical testers to learn.

Usage of VBScript language for scripting which is very powerful ,has lots of capabilities and can program even complex functionalities with ease.

The active screen technology allows the person writing script to pick-up values that may have been left out during recording. This helps to reduce re-work for scripting.

Page 49: HP QTP Quick Test Professional Basics Online Training PPT

49 http://kerneltraining.com/qtp/

Advantages of QTP over other Functional Automation tools

Supports .Net, XML and other modern Environments.

Test Run Iterations/Data driven testing is much easier and better implemented with QTP. Capturing output values add data driven testing more kick and flexibility.

Provides ability to trap exceptions and handle them using inbuilt functions or user defined ones.

Page 50: HP QTP Quick Test Professional Basics Online Training PPT

50 http://kerneltraining.com/qtp/

Recap

Checkpoints - check Synchronization points - wait Output values – retrieve information Parameterization – configuration

data VBScript – adds programmable logic

Page 51: HP QTP Quick Test Professional Basics Online Training PPT

51

Call us: +91 8099776681Email: [email protected]://kerneltraining.com/qtp/

Questions ?

Page 52: HP QTP Quick Test Professional Basics Online Training PPT

52

Call us: +91 8099776681Email: [email protected]://kerneltraining.com/qtp/