0% found this document useful (0 votes)
101 views22 pages

QTP Presentation

Automation testing frameworks provide structure and organization for automated tests. This document discusses different types of automation frameworks including record and playback, modular, and keyword-driven frameworks. It focuses on the keyword-driven framework, explaining that tests are developed in Excel using keywords to describe actions independently of the test tool. The document also covers elements of an automation framework like folder structure, initialization scripts, and driver scripts.

Uploaded by

sheenasebastian
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views22 pages

QTP Presentation

Automation testing frameworks provide structure and organization for automated tests. This document discusses different types of automation frameworks including record and playback, modular, and keyword-driven frameworks. It focuses on the keyword-driven framework, explaining that tests are developed in Excel using keywords to describe actions independently of the test tool. The document also covers elements of an automation framework like folder structure, initialization scripts, and driver scripts.

Uploaded by

sheenasebastian
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Automation Framework!!

Automation:

Accessing one Software Object from another Software.


Automation Framework:

It is a set of guidelines, assumptions and process developed in order to perform a task(s) in an effective, efficient and optimized way. A systematic approach for automating software applications.

Why Automation Framework ??


In project test automation we use various files, we perform various tasks, in order to organize and manage them all, a systematic approach (Automation Framework) required. Test Automation Framework will reduce the amount of scripting required. Test Automation Framework will accommodate changes with minimum effort

Types Of Automation Framework:


Automation Framework is not a QTP feature, its a 3rd party concept. And this is purely a local concept.(framework may vary from one company to another) Record/Playback or Linear Framework (1st generation framework). It is the simplest of all Frameworks .In this Framework , Tester manually records each step ( Navigation and User Inputs), Inserts Checkpoints ( Validation Steps) in the first round . He then , Plays back the recorded script in the subsequent rounds. Advantages Fastest way to generate script Automation expertise not required Easiest way to learn the features of the Testing Tool Disadvantages Little reuse of scripts Test data is hard coded into the script Maintenance

Other Automation Frameworks are Modular framework ,Hybrid Framework etc.

Keyword Driven Framework !!


Keyword-driven testing, also known as table-driven

testing or action-word testing.


Here automated tests are developed in excel with a

vocabulary of Keywords ('Action' words).


These Keywords are used to describe actions and are

independent of the automated test tool used to execute them.


This is an application-independent framework utilizing data

tables and self-explanatory "keywords" to explain the actions to be performed on the application.

Object Repository in QTP!!


It is a storage place of QTP where we can store the objects information and it also acts as interface between the test script and the application in order to identify the objects during execution. Object: Object is something, which has structure and properties.

Software objects:
We call windows, WebPages, buttons, edit boxes, check boxes etc.. as software objects.

Types of Object in QTP: There are four types of object available in QTP. 1. Run time objects 2. Test objects 3. Utility objects 4. Automation objects/User defined objects.

Run time objects: The objects present in the AUT. Ex: Buttons, links, etc
Test Objects: References of Run time objects. Ex: WinEdit, WinButton, WebButton, etc Note: Test objects names vary from one environment to another

Ex.

Run time objects

Test objects in windows Environment


WinButton WinEdit WinCheck box

Test objects in windows Environment


WebButton WebEdit WebCheck box

Buttons Edit Box Check Box

Utility objects

They are QTP reserved objects used for testing and result reporting. Ex: 1. SystemUtil for launching/closing the application. 2. Reporter for defining results. 3. Services for inserting transaction points . 4. Environment for using environment variables.

Spying objects !!
For getting objects information, (Test objects names, property & Values) QTP is providing a feature called Object Spy, using this we can get objects information. Navigation>Tools>object spy>take hand icon & Show the object>get information (Object Spy shows the specific objects all available properties with their values) Note: As Object spy is an important feature, it can be available in 3 Areas.(1. In tools Menu 2. In local repository 3. In Repository manager)

How to identify an Object??

Working with Web edit.


'WebEdit' is a object class type for Edit box or Textbox. Browser("").Page("").WebEdit("WebEdit").Set value

ParentObject.Webedit(propertyname1&":="&property

value1).Set USR

The Concept of Keyword Driven Framework


In Key Work Driven Framework the script values will be written in Excel files and QTP will execute them using a Driver Script. There are majorly two approaches followed to make Keyword Driven Framework.
Specify Script Values Directly in the Excel Write Global Functions for each and every application

control and specify those functions as keywords in Excel

Key elements of Automation Framework:


1. Well defined folder structure. 2. Initialization script. 3. Driver script. 4. Input data spreadsheet. 5. Process guidelines document

Folder Structure

Why folder structure?


In order to create, store, organize and manage files a well defined folder structure required. Folder structure is a mandatory element of any framework, but folder names may vary from one framework to another and company to another . The basic components in Keyword Driven Framework : 1. Path File 2. Scenario File 3. Test Case File 4. Driver Script 5. Function Library 1) Path File This is an Excel file with the path to which Scenario file and Test Case File can be accessed

2) Scenario File An Excel file consisting list of all the Test scenarios possible in the application to be automated.

3) Test Case File Contains the detailed steps to be carried out for the execution of a test case It is also in the form of an excel sheet and contains columns for Keyword, Object Name, Parameter
4) Driver Script It Reads the scenario files and corresponding Test Case files. Checks the keywords and calls the appropriate utility script functions based on specific keyword. 5) Function Library: This folder contains two sub folders one is for storing common functions of our company, another folder for storing our project specific functions(.vbs).

scenario.xls

testcase.xls

Merits
The low cost for maintenance. In case of change only the

Test Case File needs to be updated and the Driver Script and Function will remain the same.
Enables to Begin to Develop Tests for a New Product or

Feature Earlier in the Development Cycle .


"Generic" utility scripts created for testing an application

can be reused to test another application.


Enables Automation Experts to Focus on Maintaining

Objects And Functions while Application Testers Focus on Maintaining The Test Structure and Design.

Demerits
The Development of "customized" Functions and

Utilities requires proficiency in the tools Scripting language.


Takes lot of time initially.

You might also like