qtp training

40
Learning HP Quick Test Professional (A Test Automation Tool) Get our Blog posts in your Inbox Trainer : Rajamanickam Antonimuthu Click to know about training p rogram Buy eBook about Software Testing And QTP Automation

Upload: qualitypoint-technologies

Post on 20-Nov-2014

471 views

Category:

Documents


2 download

DESCRIPTION

I am planning to write more articles about software testing and QTP. So you can subscribe to our blog. http://bit.ly/subscribeqtp

TRANSCRIPT

Page 2: QTP Training

What is Software Testing?

Software Testing is the process of verifying whether a software application or a software product meets the business and technical requirements. i-e verifying whether the developed software application works as expected.

It will be done by comparing the Actual result against the Expected Result.

Different types of Testing. (e.g Functional, Regression)

Page 3: QTP Training

What is Test Automation?

• Executing Test cases automatically using tools such as QTP, Test Partner, Rational robot, etc to shorten the testing life cycle with respect to time.

Page 4: QTP Training

Need for Test Automation To avoid human errors

A way of storing domain/project/task Knowledge gained by the Test Engineers

A proof for completion of testing.

Accurate Reporting.

Fast Test execution.

Scheduled test execution.

Page 5: QTP Training

What is QTP?

•QTP is a Functional and Regression Test Automation Tool.

•QTP is developed by Mercury and acquired by HP.

• Supports automation of various Software Applications and Websites.

• Record and Play + vb scripting

•Various Frameworks including custom framework

•Integration with HP Quality Center.

Page 6: QTP Training

Technologies Supported

Default Support 1. Standard Windows applications 2. Web objects / Applications 3. ActiveX controls 4. Visual Basic applications Additional QuickTest add-ins Support

1. Java 2. Oracle 3. SAP 4. .NET 5. Web Forms 6. Siebel 7. PeopleSoft 8. Web services 9 Main frame (Terminal Emulator)

Page 7: QTP Training

Quick Test Windows

Subtitle

Page 8: QTP Training

Object Repository

•Centralized place for storing Properties of objects available in AUT

•Stores only the TO properties

•Stores as Name & Value pair

•Depends on setting in Object Identification window .

Page 9: QTP Training

Recording Modes

•Normal•Analog -records and tracks every movement of the mouse •Low level -records at the object level and records all run-time objects as Window or WinObject test objects

Page 10: QTP Training

Run Modes

•Normal -displays execution marker•Fast- won’t show the execution marker•Update – will update the test object properties

Page 11: QTP Training

Types of Object Repository

• Local Object Repository -QTP creates a Local Repository for every action automatically during Recording

• Shared Object Repository -User creates shared repository by adding objects. It can be shared among number of Actions/tests.

Page 12: QTP Training

Test and Actions

Action - A Set of Statements for performing a Task or Tasks.We divide our test into actions to streamline the process of testing

- Non-Reusable Actions

- Reusable Actions

- External Action

Page 13: QTP Training

Operations on Actions

• Creating Actions

• Splitting Actions

• Renaming Actions

• Deleting Actions

• Calling an Action

• Copying an Action

• Making an Action Reusable/Non Reusable

Page 14: QTP Training

CheckPoints

A checkpoint is a verification point that compares a current value for a specified property with the expected value for that property

We can view the results of the checkpoint in the Test Results window

Page 15: QTP Training

Types of CheckPoints

Standard check point Text check point Text area check point Bit map check point Data base check point Accessibility check point XML Check point (from Application) XML Check point (from Resource) Page check point Image checkpoint Table checkpoint

Page 16: QTP Training

Standard CheckPoints

Standard Checkpoint checks the property value of an object in your application or Web page.

The standard checkpoint checks a variety of objects such as buttons, radio buttons, combo boxes, lists, and so forth.

For example, you can check that a radio button is activated after it is selected or you can check the value of an edit box.

Page 17: QTP Training

CheckPoints (continued..)

Image Checkpoint checks the value of an image in your application or Web page.

For example, you can check that a selected image's source file is correct.

Bitmap Checkpoint checks an area of your Web page or application as a bitmap

Useful for testing zoom of map and for testing logo.

Table Checkpoint checks information within a table.

Page 18: QTP Training

CheckPoints (continued..)

Text Checkpoint checks that a text string is displayed in the appropriate place on a Web page or application

Accessibility Checkpoint identifies areas of your Web site that may not conform to the World Wide Web Consortium (W3C) Web Content Accessibility Guidelines (e.g Alt for Img tag)

Page Checkpoint checks the characteristics of a Web page. (e.g web page loading time, checking broken links)

Database Checkpoint checks the contents of a database accessed by your application.

XML Checkpoint checks the data content of XML documents in XML files or XML documents in Web pages and frames

Page 19: QTP Training

Supported Check Points

Checkpoint Type

Web Standard Windows VB ActiveX

Standard S S S S

Image S NS NS NS

Table S S (WinListView) S (VbListView) S

Text S NS NS NS

Bitmap S S S S

Accessibility S NS NS NS

XML (Web Page/Frame) S NA NA NA

XML (From Resource) S S S S

Page S NA NA NA

Database S S S S

S—Supported NS—Not Supported NA—Not Applicable

Page 20: QTP Training

Data Tables

Integrated Spread sheet (Excel), used for Data driven testing.

Data driven Testing: Testing the same task with multiple sets of test data.

Page 21: QTP Training

Data Tables

Two types of sheets in Data Tables.

Global Sheet- for entire test. i-e used for all actions in the test.Action Sheets- for specific action only.

Data can be imported to the Data Tables from external files (Flat files, excel sheets, etc) and Data bases (MS access, Sql Server, oracle, etc.)

Page 22: QTP Training

Data Tables

Design time data table.

Run time data table. - Available in result screen

Page 23: QTP Training

Data Tables

Two types of sheets.Global Sheet- for entire test. i-e used for all actions in the test.Action Sheets- for specific action only.

Page 24: QTP Training

Parmeterization

- For Checkpoints- In Object Repository- In Action steps.

Page 25: QTP Training

QTP Result Window

- CheckPoint Results- Reporter.ReportEvent results.- Filter results.- Save results as HTML file.

Page 26: QTP Training

OutPut Values

It is stored in run time data table

Types of Output values.

• Standard output value• Text output value• Text area output value• Database output value• XML output value

Page 27: QTP Training

Recovery Scenario

-For handling unexpected pop-ups

-Use wizard for creating recovery scenario file.

-Add/Enable the required recovery scenario from the Tests.

Page 28: QTP Training

QTP Testing process

-Planning Automation Framework

-Creating Scripts (Recording, adding objects)

-Enhancing the Scripts (Checkpoints, parameterization)

-Executing the scripts

-Analyzing the Results

Page 29: QTP Training

Recovery Scenario

-For handling unexpected events such as random pop-up windows.

-Recovery Scenario Manager - Wizard for creating recovery scenario.

-Define Trigger Event (e.g pop-up window, object state, Test run error, application crash)

-Specify Recovery operations. (keyboard/mouse operations, close application process, function call, restart windows)

-Choose post recovery test run operation. (Repeat current step, proceed to next step, proceed to next action iteration, proceed to next test iteration, restart current test run, stop test run)

Page 30: QTP Training

Descriptive Programming

-Adding object properties directly in the Test scripts instead of using Object Repository.

Two Types- Static Programming (e.g dialog("text:=Login").Activate)- Dynamic Programming e.g Set objLogin=description.CreateobjLogin("text").value="Login“objLogin.Activate

Page 31: QTP Training

Synchronization

- It is required to match execution speed of QTP with the loading/responding speed of application.

- Exist

- Waitproperty

- Adding synchronization point from menu

Page 32: QTP Training

Regular expression

- Pattern matching

- Used in object repository, checkpoints, etc.

- Take care about backslash warning

- Most frequency used expression – (.* )

Page 33: QTP Training

Environment Variables

- Global variables

- Different Types

• Built in variables • User defined variables

Page 34: QTP Training

Scripting

- Windows Script host (.wsh)

- Vbscript (.vbs)

- VB Script Variables

- Dim, Option Explicit

- VBScript has only one data type called a Variant

- Conditions, Loops

Page 35: QTP Training

Automation Framework

- What is Framework?

- Record/playback model

- Data Driven

- Modular Framework

- Hybrid Framework->Keyword Driven

Page 36: QTP Training

Automation Object Model

- What is AOM?

- Generate script button for exporting IDE settings.

- Scheduling script execution using AOM.

Page 37: QTP Training

Automation processes

- Creating Automation framework

- Creating Tests

- Enhancing Tests (Checkpoints, synchronization, parameterization)

- Running Tests

- Analyzing Results.

- Reporting Defects.

Page 38: QTP Training

Typical automation Framework.

ObjectRepository-> To keep your shared object repositories.Datatables->To keep QTP data tables and external Excel sheets.Config-> To keep environment variable xml fileRecoveryScenario ->To keep your recovery scenario files.Tests-> You can keep your QTP Tests here. You may include Test containing Reusable Actions here. And a Test which is getting used as driver script can also be stored here.library->you can keep your vbs file which contains vbscript functions.Results-> You can store Result files (Either QTP result file or customized result file) here

Page 39: QTP Training

Tools

- Object spy

- Step Generator

- Function Generator

- Debugging

Page 40: QTP Training

Tips

- Coding Standards.

- Best practices (.e.g Use Shared repository, open application after opening QTP, Use reference path, etc.)

- Using COM object for handling Browser, FSO (File system) and Excel.

Click to know about training program

Buy eBook about Software Testing And QTP Automation