automation frameworks ver2
TRANSCRIPT
-
8/6/2019 Automation Frameworks Ver2
1/20
-Prashant Sinha
-
8/6/2019 Automation Frameworks Ver2
2/20
Topicsy What is an Automation Framework?
y Types of Automation Framework
y Generic Framework Componentsy Framework Directory Structure
-
8/6/2019 Automation Frameworks Ver2
3/20
Automation Framework:y Is a set of testing assumptions, concepts, practices and tools that
provide support for automated software testing.
y It is not a tool to perform some specific task, but an
infrastructure that provides a complete solution where differenttools work together in an unified manner, hence providing acommon platform to the automation engineers using them.
y Provides an Outline of overall Test Structure
y Ensures Consistency of Testing
y Minimizes the amount of code for development which means Low
Maintenance cost.y Maximizes Reusability
y Reduces Exposure of Non-Technical Testers to Code
y Enables Test Automation using different sets of Data
-
8/6/2019 Automation Frameworks Ver2
4/20
Types ofAutomation Frameworky Record and Playback
y Data Driven
y Keyword Driveny Modular or Functional Decomposition
y Hybrid
-
8/6/2019 Automation Frameworks Ver2
5/20
Record and Playbacky It is the simplest of all Frameworks and also know as Linear Scirpting".
y Manually records each step ( Navigation and User Inputs), InsertsCheckpoints ( Validation Steps) in the first round .
y Then Play back the recorded script in the subsequent rounds.
-
8/6/2019 Automation Frameworks Ver2
6/20
Record and Playback ..contd
-
8/6/2019 Automation Frameworks Ver2
7/20
Data Driveny Repeated use of Test Scripts with Different Inputs and Response Data
coming out of predefined Dataset
y In this framework, variables are used for both input values and output
verification values.y Each test case is combined with a related data set and executed using a
reusable set of test logic.
y Navigation through the program, reading of the data files, and loggingof test status and information are all coded in the test script.
y Helps in Reducing Coding for Large Test Casesy Ease of Testing of Time-Consuming & Complex Test Cases
-
8/6/2019 Automation Frameworks Ver2
8/20
Data Driven ..contd
-
8/6/2019 Automation Frameworks Ver2
9/20
Modular or Functional Decompositiony Modularity framework requires the creation of small, independent
scripts that represent modules, sections, and functions of theapplication-under-test. These small scripts are then used in a
hierarchical fashion to construct larger tests, realizing a particular testcase.
y Modular components are often created to correspond with applicationfunctionality but many different types of user-defined functions can becreated.
-
8/6/2019 Automation Frameworks Ver2
10/20
Functional Decomposition ..contd
-
8/6/2019 Automation Frameworks Ver2
11/20
Keyword Driveny 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.
y Keyword-driven testing splits the test procedure into logicalcomponents and these components are then used repeatedly in theassembly of new test scripts.
y Data & Keyword Tables remain independent of the Automation Tool
y Testers can develop scripts without a functioning application.
y Needs more scripting proficiency.
-
8/6/2019 Automation Frameworks Ver2
12/20
Keyword Driven ..contd
-
8/6/2019 Automation Frameworks Ver2
13/20
Hybrid Frameworky Combination of all the frameworks types
y allows data driven scripts to take advantage of the
powerful libraries and utilities that usually accompanya keyword driven architecture.
y Use Linear scripts in Areas which are too difficult toconvert into Keywords
-
8/6/2019 Automation Frameworks Ver2
14/20
Generic Framework ComponentDiagram
-
8/6/2019 Automation Frameworks Ver2
15/20
FrameworkD
esign Componentsy Driver Script: It coordinates test activities by calling a sequence of
automated test scripts. It controls everything that takes place during thetest run, which allows the unattended execution of several scripts.
y Initialization Scripts:An initialization script sets parameters that areused throughout the test run and bring the test environment to a
controlled, stable state.y Configuration Scripts: It sets the parameters that are related to
Application under test and those parameters that are changed relativelyfrequently. Eg: User Ids, Passwords,Web URLs
y Test Scripts: Test scripts contain the logic that verifies specificapplication functionality.
y User-defined Functions: User-defined functions are custom, modularcomponents created for reuse and ease of maintenance, and may becreated at a level that they are reusable for multiple applications, or maybe created in such a way that they are reusable for just tests within asingle application.
-
8/6/2019 Automation Frameworks Ver2
16/20
Framework Design Components Contd..y Types ofUserDefined Functions:
y Utility Functions
y Navigation Functions
y
Error-handling Functionsy Miscellaneous Functions
y Error Handler or RecoveryScenarios: responsible for handlingunexpected occurrences during the test execution, such that the testrun continues and/or concludes in the most graceful manner possible.
y
ReportingUtility: responsible for collating the results from the runand presenting them as reports and logs that are designated parts ofthe framework.
y DataTable: Data sources (like spreadsheets) used to store test data foruse during test execution
-
8/6/2019 Automation Frameworks Ver2
17/20
Framework Directory Structure
-
8/6/2019 Automation Frameworks Ver2
18/20
Framework Directory Structure
-
8/6/2019 Automation Frameworks Ver2
19/20
Learn morey Test Automation Book of Knowledge from:
http://www.automatedtestinginstitute.com/home/
-
8/6/2019 Automation Frameworks Ver2
20/20
Q& A?