Automation Frameworks Ver2

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 20

Automation Frameworks

-Prashant Sinha
Topics
What is an Automation Framework?
Types of Automation Framework
Generic Framework Components
Framework Directory Structure
Automation Framework:
 Is a set of testing assumptions, concepts, practices and tools that
provide support for automated software testing.
 It is not a tool to perform some specific task, but an infrastructure
that provides a complete solution where different tools work
together in an unified manner, hence providing a common
platform to the automation engineers using them.
 Provides an Outline of overall Test Structure
 Ensures Consistency of Testing
 Minimizes the amount of code for development which means Low
Maintenance cost.
 Maximizes Reusability
 Reduces Exposure of Non-Technical Testers to Code
 Enables Test Automation using different sets of Data
Types of Automation Framework
Record and Playback
Data Driven
Keyword Driven
Modular or Functional Decomposition
Hybrid
Record and Playback
 It is the simplest of all Frameworks and also know as “Linear Scirpting".
 Manually records each step ( Navigation and User Inputs), Inserts
Checkpoints ( Validation Steps) in the first round .
 Then Play back the recorded script in the subsequent rounds.
Record and Playback ..contd
Data Driven
 Repeated use of Test Scripts with Different Inputs and Response Data
coming out of predefined Dataset
 In this framework, variables are used for both input values and output
verification values.
 Each test case is combined with a related data set and executed using a
reusable set of test logic.
 Navigation through the program, reading of the data files, and logging
of test status and information are all coded in the test script.
 Helps in Reducing Coding for Large Test Cases
 Ease of Testing of Time-Consuming & Complex Test Cases
Data Driven ..contd
Modular or Functional Decomposition
 Modularity framework requires the creation of small, independent
scripts that represent modules, sections, and functions of the
application-under-test. These small scripts are then used in a
hierarchical fashion to construct larger tests, realizing a particular test
case.
 Modular components are often created to correspond with application
functionality but many different types of user-defined functions can be
created.
Functional Decomposition ..contd
Keyword Driven
 Keyword driven framework is one where (pre-defined) keywords are
used to describe the actions. These actions match up to a process,
related to the application.
 Keyword-driven testing splits the test procedure into logical
components and these components are then used repeatedly in the
assembly of new test scripts.
 Data & Keyword Tables remain independent of the Automation Tool
 Testers can develop scripts without a functioning application.
 Needs more scripting proficiency.
Keyword Driven ..contd
Hybrid Framework
Combination of all the frameworks types
allows data driven scripts to take advantage of the
powerful libraries and utilities that usually accompany
a keyword driven architecture.
Use Linear scripts in Areas which are too difficult to
convert into Keywords
Generic Framework Component Diagram
Framework Design Components
 Driver Script: It coordinates test activities by calling a sequence of
automated test scripts. It controls everything that takes place during the
test run, which allows the unattended execution of several scripts.
 Initialization Scripts: An initialization script sets parameters that are
used throughout the test run and bring the test environment to a
controlled, stable state.
 Configuration Scripts: It sets the parameters that are related to
Application under test and those parameters that are changed relatively
frequently. Eg: User Ids, Passwords, Web URLs
 Test Scripts: Test scripts contain the logic that verifies specific application
functionality.
 User-defined Functions: User-defined functions are custom, modular
components created for reuse and ease of maintenance, and may be created
at a level that they are reusable for multiple applications, or may be created
in such a way that they are reusable for just tests within a single application.
Framework Design Components Contd..
 Types of User Defined Functions:
 Utility Functions
 Navigation Functions
 Error-handling Functions
 Miscellaneous Functions
 Error Handler or Recovery Scenarios: responsible for handling
unexpected occurrences during the test execution, such that the test
run continues and/or concludes in the most graceful manner possible.
 Reporting Utility: responsible for collating the results from the run
and presenting them as reports and logs that are designated parts of
the framework.
 Data Table: Data sources (like spreadsheets) used to store test data for
use during test execution
Framework Directory Structure
Framework Directory Structure
Learn more…
Test Automation Book of Knowledge from:
http://www.automatedtestinginstitute.com/home/
Q & A?

You might also like