You are on page 1of 17

Software Testing

Automation Framework
(STAF)
Day - 1
Regression Test Automation Process

2
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
STAF-Definition

Software Testing Automation Framework is a


systematic,organized set of assumptions, concepts, and
practices that provide support for automated software
testing.

It is a tool independent approach to automate


application under test.

3
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
Types Of Test Automation Framework

STAF

Keyword driven Hybrid


Data Driven or [ Data + Keyword
Table driven Driven ]

4
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
Types Of Test Automation Framework-Data Driven

Data Driven • Data driven scripts are application


-specific scripts
• Variables will be used for key application
input fields and program selections
Keyword driven • This allows the script to drive the
or application with external data supplied
STAF
Table driven from the data source.
• Advantage :
• It is the easiest and quickest to
Hybrid implement.
[ Data +
Keyword • Disadvantage:
Driven ] • Difficulty in the maintenance of
the scripts over a long time.
• Application dependent

5
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
Types Of Test Automation Framework –Keyword Driven

Data Driven • It is typically an application-independent


automation framework
• Tests are developed as data tables using a keyword
vocabulary that is independent of the test automation
Keyword driven tool used to execute them.
STAF or
• Advantage :
Table driven
• Application independent
• Easy to maintain
Hybrid
[ Data + • Disadvantage :
Keyword • Tedious to implement
Driven ]
• Time consuming approach

6
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
Types Of Test Automation Framework-Hybrid

• The most successful Automation


Frameworks generally accommodate
Data Driven both keyword driven testing and data
driven scripts.
• This allows data driven scripts to
take advantage of the powerful
libraries and utilities that usually
accompany a keyword driven
Keyword driven architecture.
or
STAF • The framework utilities can make
Table driven
the data driven scripts more compact
and less prone to failure than they
otherwise would have been.
• The framework utilities can also
Hybrid facilitate the gradual and manageable
[ Data + conversion of existing scripts to
Keyword keyword driven equivalents when and
Driven ] where that appears desirable.

7
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
Components of Test Automation Framework

Data Data Files Configuration Files


Layer

Reusable Common External Dlls &


Application
Components Library Application GUI
Common Library

Business Business Module Business Module Business Module


Layer #1 #2 ....... #n

User Interface
Layer Test Suite Driver Script

8
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
Test Automation Framework - Data Layer

This Layer consists of configuration and data files.


Configuration Files:
Consists of configurable data for the application
Example:
URL of the application
Login Name and Password
Machine Details

Data files:
Consists of data required for the application
This could be maintained in
Excel File
MS Access DB
Text Files

9
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
Test Automation Framework - Reusable Components

This is the vital layer of the framework which contains


Common Library
Consists of small utility functions which could be used across
applications (Application Independent)
Example : date formatting function
Application Common Library
Consists of application specific functions which could be used across
different modules of the application (Application dependent)

External Dlls and Application


contains functions/routines to call API and external applications.
Example :BMP to JPEG converter
GUI
contains object identification files that are loaded when the script
begins the execution.
Example : GUI Map file, Object repository

10
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
Business Layer & User Interface Layer

Business Layer:
All the application specific scripts are available here
User Interface Layer:
TestSuiteDriver script is the script which drives the entire Automation
Suite
This script calls all other scripts
All application specific scripts are stored here
Driver script can be developed in the automation tool’s scripting
language

11
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
Identification Of Common Functions

Pre requisites for identifying the common functions are:

Business Functionality Understanding


Business Scenario Identification
Identification of common functionality across modules in an
application

Common functions which are application independent can be


re-used in any other framework

12
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
Supporting documents for Automation Framework

Checklists & Guidelines document for scripting


Script Specification document (Pseudo code)
Templates for Test Artifacts
Traceability Matrix
User Manual

13
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
Comparison of scripts without framework and with
framework.
Scripts
ScriptsWith
WithFramework
Framework Scripts
ScriptsWithout
WithoutFramework
Framework

• Ease of understanding the script • Script Understanding is complex


• Uniform usage of variables • Inconsistent usage of variables
• Ease of maintaining the scripts • Script maintenance is tedious
• Script duplication is avoided • Chances of script duplication are high
• Ease of GUI maintenance when new • Difficulty in GUI maintenance for new
• requirements are introduced requirements
• Development of functions across modules for • Probability of developing multiple functions for
the
the same functionality is high
• same functionality is avoided
• Complexity in Script Debugging
• Ease of Script Debugging
• Difficulty in analysing the Test results
• Ease of analysing the Test results

14
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
STAF –Case Study

15
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
Exercise

Create an Automation Framework for Flight application which covers the following
Functionality
Group A
STR-Select
STR-Update
STR-Add
STR-Link

Group B
STR-Add
STR-Add to KBB
STR-Customize
STR-Advanced Search

16
Copyright Polaris Software Lab Limited, 2005.
Confidential. Not to be republished without prior consent.
Thank You

You might also like