SlideShare a Scribd company logo
PATTERNS OF A “GOOD”
TEST AUTOMATION
FRAMEWORK!
Anand Bagmar
Software Quality Evangelist
ABOUT ME
@BagmarAnand
Blog - essenceoftesting
about.me/anand.bagmar
WHAT DO YOU EXPECT FROM THIS SESSION?
TELL ME ...
¨ Any Managers in the room?
¨ Developers / Testers / Automation “folks” in the room?
¨ What toolset do you use for Automation?
¨ How many automated tests do you have?
¨ Have you heard the phrase - ”Test Automation code
should be of Production Quality”?
¨ Do you believe it?
¨ Anyone in the room does not code / understand code?
4
Disclaimer
Patterns of a “good” test automation framework
What is a Pattern?
Patterns of a “good” test automation framework
https://en.wikipedia.org/wiki/Software_design_pattern
Have you heard-of or
used any
Pattern(s) in Test
Automation?
COMMON PATTERNS USED IN TEST AUTOMATION
¨ Page-Object
¨ Business Layer
¨ Singleton
¨ Composition
¨ Factory
¨ Builder
Test Automation
Framework Patterns
Patterns of a “good” test automation framework
Code sample - #1
Page-Object Pattern
PAGE OBJECT PATTERN
Model pages
in code
Simulates user actions
One place change
Reduces code duplication
Snippets
of page
Patterns of a “good” test automation framework
Code sample - #2
AUTOMATION FRAMEWORK WITH PAGE OBJECTS
LIMITATIONS OF PAGE-OBJECT PATTERN
¨ Test intent gets polluted
¨ Duplication of Test intent & implementation
¨ Intent becomes Imperative
¨ Maintenance challenges
¨ Scaling challenges
Business-Layer
Page-Object Pattern
BUSINESS-LAYER PAGE-OBJECT PATTERN
Code sample - #3
ADVANTAGES OF
BUSINESS-LAYER PAGE-OBJECT PATTERN
¨ Validate what is important - Business requirements
¨ Test Pyramid remains sane
¨ Abstraction layers allow separation-of-concerns
¨ Changes are isolated
¨ Maintenance & Scaling becomes ‘easier’
Test Data Patterns
Why do we need to
think differently
about Test Data?
CRITERIA FOR TEST DATA
¨ Data is complex
¨ Needs to mimic “real” data
¨ Needs to be unique
¨ Data can be nested
¨ Though specified as static, may need to be Dynamic
¨ Data can be shared and reused
DIFFERENT WAYS TO SPECIFY TEST DATA
¨ In Test implementation
¨ In Test specification / intent
¨ In code … separate data structures / classes / etc.
¨ External files
TEST DATA SPECIFICATION EXAMPLES
¨ Excel
¨ CSV
¨ Property
¨ XML
¨ YAML
¨ Database
¨ Json
Code sample - #4
CRITERIA FOR SELECTION
¨ Easy to specify
¨ Easy to read and consume (by test framework)
¨ Ability to override specified data, easily
¨ Usable
TIPS FOR IMPLEMENTATION
¨ Consistent way to specify test data
¨ Read the data – as Business Entities
¨ Override as appropriate
¨ Create DSL to give meaning to data
¨ Use in test implementation
¨ Implement Test Data Entity Utilities – Build, Equals,
Copy, Find, etc.
Locators’ Patterns
DIFFERENT WAYS TO SPECIFY ELEMENT LOCATORS
¨ In Page-Objects
¨ In separate files, per Page-Object
¨ In external files / locator files
Advantages of
using Patterns for
Test Automation
ADVANTAGES OF PATTERNS
¨ Well known, well understood
¨ Tried & tested solutions for common problems
¨ Reduces complexity
¨ Language neutral
¨ Aid in communication
ADVANTAGES OF PATTERNS IN TEST AUTOMATION
Saves time & effort
(eventually)
Single ownership
Test Automation Code is of Production Quality!
Single point of change
Easy to –
- Implement
- Maintain
- Debug
- Scale
WHICH IS THE “BEST” PATTERN TO USE ?
It DEPENDS!
on the
Context!
REFERENCES
Page Objects – Google
https://code.google.com/p/selenium/wiki/PageObjects
Page Objects – Martin Fowler
http://martinfowler.com/bliki/PageObject.html
Perils of Page-Object Pattern – Anand Bagmar
http://essenceoftesting.blogspot.in/2014/09/perils-of-page-object-pattern.html
Test Design Consideration
http://docs.seleniumhq.org/docs/06_test_design_considerations.jsp
Sample Test Framework implementation
https://github.com/anandbagmar/cuke-jvm-sample
@BagmarAnand
Blog - essenceoftesting
about.me/anand.bagmar
THANK YOU

More Related Content

What's hot (20)

PPTX
Chapter 3 - Test Automation
Neeraj Kumar Singh
 
PPTX
Agile testing - Testing From Day 1
Kaizenko
 
PPTX
Test automation
Xavier Yin
 
PPTX
SDLC vs STLC
David Tzemach
 
PDF
Test automation design patterns
Vitaly Tatarinov
 
PPTX
Introduction to Automation Testing
Archana Krushnan
 
PDF
Test Automation
nikos batsios
 
PPT
Automated Testing vs Manual Testing
didev
 
PPTX
Significance of AI in Testing
Agile Testing Alliance
 
PDF
BDD & Cucumber
Vladimir Arutin
 
PPTX
How to Design a Successful Test Automation Strategy
Impetus Technologies
 
PPT
Automation testing strategy, approach & planning
SivaprasanthRentala1975
 
PPTX
Manual testing
ShahaniIntikab
 
PPT
Automation testing
Biswajit Pratihari
 
PPTX
Test Automation and Selenium
Karapet Sarkisyan
 
PDF
Performance Requirement Gathering
Atul Pant
 
PDF
Manual Testing Interview Questions | Edureka
Edureka!
 
PPTX
Automation Testing
Sun Technlogies
 
PPTX
Hybrid automation framework
doai tran
 
PPTX
Automation Testing
AbdulImrankhan7
 
Chapter 3 - Test Automation
Neeraj Kumar Singh
 
Agile testing - Testing From Day 1
Kaizenko
 
Test automation
Xavier Yin
 
SDLC vs STLC
David Tzemach
 
Test automation design patterns
Vitaly Tatarinov
 
Introduction to Automation Testing
Archana Krushnan
 
Test Automation
nikos batsios
 
Automated Testing vs Manual Testing
didev
 
Significance of AI in Testing
Agile Testing Alliance
 
BDD & Cucumber
Vladimir Arutin
 
How to Design a Successful Test Automation Strategy
Impetus Technologies
 
Automation testing strategy, approach & planning
SivaprasanthRentala1975
 
Manual testing
ShahaniIntikab
 
Automation testing
Biswajit Pratihari
 
Test Automation and Selenium
Karapet Sarkisyan
 
Performance Requirement Gathering
Atul Pant
 
Manual Testing Interview Questions | Edureka
Edureka!
 
Automation Testing
Sun Technlogies
 
Hybrid automation framework
doai tran
 
Automation Testing
AbdulImrankhan7
 

Viewers also liked (7)

PDF
The What, Why and How of Analytics Testing
Anand Bagmar
 
PDF
Client-Side Performance Testing
Anand Bagmar
 
PDF
Automating Web Analytics
Anand Bagmar
 
PDF
The What, Why and How of (Web) Analytics Testing (Web, IoT, Big Data)
Anand Bagmar
 
PPT
Test Automation Strategies For Agile
Naresh Jain
 
PPT
Test Automation Framework Designs
Sauce Labs
 
PDF
Agile Testing Framework - The Art of Automated Testing
Dimitri Ponomareff
 
The What, Why and How of Analytics Testing
Anand Bagmar
 
Client-Side Performance Testing
Anand Bagmar
 
Automating Web Analytics
Anand Bagmar
 
The What, Why and How of (Web) Analytics Testing (Web, IoT, Big Data)
Anand Bagmar
 
Test Automation Strategies For Agile
Naresh Jain
 
Test Automation Framework Designs
Sauce Labs
 
Agile Testing Framework - The Art of Automated Testing
Dimitri Ponomareff
 
Ad

Similar to Patterns of a “good” test automation framework (20)

PDF
Patterns in Test Automation
Anand Bagmar
 
PDF
Patterns of a "Good" Test Automation Framework, Locators & Data
Agile Testing Alliance
 
PDF
Patterns of Test Automation
vodQA
 
PDF
Integration Testing in Enterprises using TaaS
Anand Bagmar
 
PDF
6 Traits of a Successful Test Automation Architecture
Erdem YILDIRIM
 
PDF
Create an architecture for web test automation
Elias Nogueira
 
PDF
walkmod - JUG talk
walkmod
 
PPTX
Unit testing
Adam Birr
 
PDF
Mastering Test Automation: How to Use Selenium Successfully
Applitools
 
PDF
How to use selenium successfully
TEST Huddle
 
PPT
Software Testing: Application And Script Independent Automation Framework: Th...
guest0efb5e
 
PDF
AI Coding Assistants & Test Automation: A Simplified Suitability Analysis
Kiran Kumar Edupuganti
 
PDF
How To Use Selenium Successfully
Dave Haeffner
 
PPTX
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
Mikalai Alimenkou
 
PDF
The Automation Firehose: Be Strategic & Tactical With Your Mobile & Web Testing
Perfecto by Perforce
 
PDF
Approaching ATDD/BDD
Dhaval Dalal
 
PDF
Developing an Ember Test Strategy - EmberConf 2019
Todd Jordan
 
PPTX
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
SQALab
 
PDF
How to Use Selenium, Successfully
Sauce Labs
 
PDF
Selenium Deep Dive
Anand Bagmar
 
Patterns in Test Automation
Anand Bagmar
 
Patterns of a "Good" Test Automation Framework, Locators & Data
Agile Testing Alliance
 
Patterns of Test Automation
vodQA
 
Integration Testing in Enterprises using TaaS
Anand Bagmar
 
6 Traits of a Successful Test Automation Architecture
Erdem YILDIRIM
 
Create an architecture for web test automation
Elias Nogueira
 
walkmod - JUG talk
walkmod
 
Unit testing
Adam Birr
 
Mastering Test Automation: How to Use Selenium Successfully
Applitools
 
How to use selenium successfully
TEST Huddle
 
Software Testing: Application And Script Independent Automation Framework: Th...
guest0efb5e
 
AI Coding Assistants & Test Automation: A Simplified Suitability Analysis
Kiran Kumar Edupuganti
 
How To Use Selenium Successfully
Dave Haeffner
 
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
Mikalai Alimenkou
 
The Automation Firehose: Be Strategic & Tactical With Your Mobile & Web Testing
Perfecto by Perforce
 
Approaching ATDD/BDD
Dhaval Dalal
 
Developing an Ember Test Strategy - EmberConf 2019
Todd Jordan
 
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
SQALab
 
How to Use Selenium, Successfully
Sauce Labs
 
Selenium Deep Dive
Anand Bagmar
 
Ad

More from Anand Bagmar (20)

PDF
The Path to Autonomous Testing - Anand Bagmar
Anand Bagmar
 
PDF
My Journey With Appium @AppiumConf Sept 2024
Anand Bagmar
 
PDF
Streamlining End-to-End Testing Automation
Anand Bagmar
 
PDF
Eradicate Flaky Tests
Anand Bagmar
 
PDF
Automating the real-user scenarios across multi-apps, and multi-devices
Anand Bagmar
 
PDF
Visual Validation - The missing tip of the automation pyramid @GoT2022
Anand Bagmar
 
PDF
Design Patterns in Automation
Anand Bagmar
 
PDF
Change Tyres In A Moving Car - Make Functional Test Automation Effective Keynote
Anand Bagmar
 
PDF
Rewrite vs Refactor (AgileIndia 2021)
Anand Bagmar
 
PDF
Next Generation Functional & Visual Testing powered by AI
Anand Bagmar
 
PDF
The Best Test Automation Framework is...
Anand Bagmar
 
PDF
Eradicate Flaky Tests - AppiumConf 2021
Anand Bagmar
 
PDF
Getting started with Appium 2.0
Anand Bagmar
 
PDF
Visual Validation - The missing tip of the automation pyramid @AgileIndia2020
Anand Bagmar
 
PDF
Does your functional automation really add value?
Anand Bagmar
 
PDF
Measuring Coverage From E2E Tests
Anand Bagmar
 
PDF
Getting started with Visual Testing using Applitools - @TPC, Feb2020
Anand Bagmar
 
PDF
Visual validation - The missing tip of the automation pyramid @ QA Symposium
Anand Bagmar
 
PDF
Collaboration - A Taboo!
Anand Bagmar
 
PDF
Visual Validation - The Missing Tip of the Automation Pyramid
Anand Bagmar
 
The Path to Autonomous Testing - Anand Bagmar
Anand Bagmar
 
My Journey With Appium @AppiumConf Sept 2024
Anand Bagmar
 
Streamlining End-to-End Testing Automation
Anand Bagmar
 
Eradicate Flaky Tests
Anand Bagmar
 
Automating the real-user scenarios across multi-apps, and multi-devices
Anand Bagmar
 
Visual Validation - The missing tip of the automation pyramid @GoT2022
Anand Bagmar
 
Design Patterns in Automation
Anand Bagmar
 
Change Tyres In A Moving Car - Make Functional Test Automation Effective Keynote
Anand Bagmar
 
Rewrite vs Refactor (AgileIndia 2021)
Anand Bagmar
 
Next Generation Functional & Visual Testing powered by AI
Anand Bagmar
 
The Best Test Automation Framework is...
Anand Bagmar
 
Eradicate Flaky Tests - AppiumConf 2021
Anand Bagmar
 
Getting started with Appium 2.0
Anand Bagmar
 
Visual Validation - The missing tip of the automation pyramid @AgileIndia2020
Anand Bagmar
 
Does your functional automation really add value?
Anand Bagmar
 
Measuring Coverage From E2E Tests
Anand Bagmar
 
Getting started with Visual Testing using Applitools - @TPC, Feb2020
Anand Bagmar
 
Visual validation - The missing tip of the automation pyramid @ QA Symposium
Anand Bagmar
 
Collaboration - A Taboo!
Anand Bagmar
 
Visual Validation - The Missing Tip of the Automation Pyramid
Anand Bagmar
 

Recently uploaded (20)

PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PPTX
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 

Patterns of a “good” test automation framework