In this presentation, you will learn about the basics of Testing Automation framework. You will learn about the types of automation frameworks, details of these frameworks as well as pros and cons of these frameworks.
Java Selenium 3.0 Training
--------------------------------------
http://techcanvass.com/Courses/selenium-training-course.aspx
Python Selenium 3.0 Training
---------------------------------------------
http://techcanvass.com/Courses/selenium-training-with-python.aspx
Techcanvass is a software development and training organization. We provide IT certifications training for mid-level professionals.
We specialize in the following areas:
a) Selenium v3.0 training with Java and Python
b) IIBA Business Analysis certifications (all levels)
c) Certified Agile Business Analyst Training
d) Data Science Training ( R, Python and Big Data) and Tableau
Website: http://techcanvass.com
Facebook Page: https://www.facebbook.com/Techcanvass
Twitter Handle: @techcanvass
2. AGENDA
What is Automation Framework
Why we need
Advantages
Types of Framework
Framework Architecture
How to Design (Practical..)
3. WHAT ?
Automation Framework is not a single
tool or process but it’s collection of
tools and processes working together to
support automated testing of an
application
4. WHAT ?
It integrates function libraries, test
data, object details and various
reusable modules
5. WHAT ?
Is an integrated environment that sets
the rules, assumptions, standards,
concepts, guidelines and tools to aid
automated testing
6. WHY ?
To maintain the defined approach across the test suites
To fasten the work progress
To easy maintain the test code
To eliminate the human error
To test the application effectively
To achieve CT and CD
7. ADVANTAGES
Defined approach to be followed by everyone across
the test suite
Understandable code
Low cost maintenance
Reusability of code
11. MODULE DRIVEN FRAMEWORK
Module Driven Framework is based on one of
the OOPs concept – Abstraction
The framework divides the entire “Application
Under Test” into number of logical and isolated
modules
12. MODULE DRIVEN FRAMEWORK
For each module, we create a separate and
independent test suite
These modules are separated by an abstraction
layer in such a way that the changes made in
one module doesn’t affects other module scripts
13. MODULE DRIVEN FRAMEWORK
Integrating all the individual modules together
builds a larger test suite representing entire
application under test
14. PROS’ OF MDF
Easier and cost efficient maintenance due high level of
modularization
The framework is pretty much scalable
If the changes are implemented in one part of the
application, only the test script representing that part
of the application needs to be fixed leaving all the
15. CONS’ OF MDF
While designing the test scripts for each module, we
embed the test data into the test scripts.Whenever we
want to test with a different set of test data, it requires the
manipulations of test scripts
16. CONS’ OF MDF
Need to modify the script if sanity or regression based
testing to be performed other parts untouched.
18. DATA DRIVEN FRAMEWORK
This framework is mainly centralized with Test Data
Test Script will not be embedded with test data
Test Data will be stored in external databases like
xml, csv, excel, odbc repository with key-value map.
Ex :Validating Gmail login functionality
User Name Password HomePage Message
Shruthi Superman Welcome Shruthi
1234 (@)(&) Welcome 1234
Test123 Test456 WelcomeTest123
Key Value
Username_Shruthi Shruthi
Password_Shruthi Superman
WelcomeMessage_Shruthi Welcome Shruthi
19. PROS’ OF DATA DRIVEN FRAMEWORK
Pros
Single test script can be executed with all various Test Data, so more
coverage
Increases flexibility and maintainability of test data because one place to
modify
Cons
The process is bit complex
Requires proficiency in a programming language that is being used to
develop test data sources and reading mechanisms
20. PROS’ OF DATA DRIVEN FRAMEWORK
Pros
Single test script can be executed with all various Test Data, so more
coverage
Increases flexibility and maintainability of test data because one place to
modify
Cons
The process is bit complex
Requires proficiency in a programming language that is being used to
develop test data sources and reading mechanisms
21. 3) KEYWORD DRIVEN FRAMEWORK
As the Name suggests, it enables Keyword Driven Testing or Table Driven
Testing
Data & Keyword Tables being Independent of the Automation Tool
Enables documentation of the functionality of the Application under Test
(AUT) in A tabular format
22. PROS’ & CONS’
Pros
Easy to use since the approach is keyword based
Easy to modify the execution layer
Cons
Requires proficiency in a programming language that is being used to
develop keyword based functional library
23. 4) HYBRID FRAMEWORK
Hybrid Testing Framework is a combination of more than one above
mentioned frameworks. The best thing about such a setup is that it
leverages the benefits of all kinds of associated frameworks
24. HOWTO DESIGN :
Identify the Scope of Testing
Company Oriented, Application Oriented, Project Oriented
Identification of the Needs of Testing
Identify Types of testing e.g. Functional Testing, Web Services etc. and
application / modules to be tested
Evaluation of the Test Automation Tool
Preparation of Evaluation Checklist, Identification of the Candidate Tools
Available, Sample Run, Rate & Select the Tool, Implementation &
Training
25. POM DESIGN PATTERN
Test scripts will be written on page wise
Ex: Home Page has features like header, footer, menus and carousal
Images.
All the home page features validation script is written in one class file
Advantages:
Script maintenance is easy since its in page level.
Since its page level, stitching of scripts to make entire test suite is
easy
Disadvantage's:
Classifying the scripts into Sanity, Functional and Integration is not
easy
Partial execution is not possible
26. HYBRID DESIGN PATTERN
Hybrid Module
It’s the combination of multiple framework design pattern like data
driver, keyword driven, module driver etc.
We can achieve maximum benefit since we are clubbing multiple
frameworks pattern
28. FRAMEWORK COMPONENT
Object Repository
Object Repository is consist of set of locators types associated with web
elements in the application
Test Data
Input data with which the test scenario would be tested and it can be the
expected values with which the actual results would be compared.
Configuration File
The file stores the information regarding the application URL, browser
specific information, server IP, device ID’s etc.
Generics/ Readers
These are the utility classes that store the functions which can be commonly
used across the entire framework.
Build tools and Continuous Integration
These are the tools/API’s used to build, deploy the application, generate test
reports, email notifications and logging information.
29. FRAMEWORK COMPONENT (CONT..
Logging:
Logging mechanism generates the log file, which writes the entire stack
information of the application during run
Reporting
Reporting is the key point in success of any automation framework
Since Selenium doesn’t have inbuilt reporting mechanism we can rely on
TestNg / ReportNg report, Extent Report, html based customized report
etc.
Execution:
Execution can be initiated by using Eclipse, ANT Build, TestNg , Jenkins
and Email based triggering using outlook
Scheduling can be done using Windows scheduler and Jenkins
Editor's Notes
Team has 5 members, if each one follow there own idea, thought process to write the code. Then it will leads to problems like unstructured code, Full of ambiguity, difficult to sync the code.
Now we have basic idea what , why and when Automation framework. Now will see what are various types of automation framework.