SlideShare a Scribd company logo
Automation Strategies
  for Agile Testing
    “Is your automation testing
        “Agile” or “Fragile”?



                               Gaurav Bansal



           www.agiletour.org
Agenda


 Why use automation in Agile Projects?


 Selecting Automation Strategy


 Record and Playback. Right Choice?


 Design patterns for test automation


 Best Practices
Why automation in agile projects?

 A
Selecting Automation Strategy



 Licenced Tools




 Light weight Record and Playback




 Automation Framework using Open Source
  Tools
Automation Framework
                               (Using Open Source Tools)




 Typical Issues:
    •   Hard Coded Values
    •   Duplicate Code
    •   No Data Driven Testing
    •   No Exception Handling
    •   God Object Pattern
    •   Brittle Locators
    •   Fragile Test Scripts
    •   Liability rather than Asset
Possible Solutions..

 Build Abstraction to avoid code duplication




 What If we moved the page-specific behavior
  into a corresponding class?




 Voila! The Page Object is born.
The Page Object


                                                        The Page Object pattern
                                                         represents the screens of your web
                                                         app as a series of objects.
                                                        The page object contains all the
                                                         services offered by a particular
                                                         page.
                                                        Consolidates the code for
                                                         interacting with any given UI
                                                         element.
                                                        Exposes methods that reflect the
                                                         things a user can see and do on
                                                         that page, e.g.
                                                           • loginSuccessfully(),
                                                           • searchKeyword(),
 Hides the details of telling the browser how to do
                                                             addOrder(), getFilter(),
  those things.
                                                             openDetails()
                                                           • seeMore(), closeDetails(),
                                                             showSearch()
Build UI Repository



 Easily maintain your test components when an object in your application
  changes.
 No need to modify the script when object properties changes.
 Easy to identify objects in AUT by Object Logical Names.
 Can be created independently from scripts.
Make tests Data Driven

 Allows to develop automated test scripts that are
  more generic, requiring only that the input and
  expected results be updated.



 Information like data inputs or outputs,
  expected results get stored in the form of
  conveniently managed text records.
Reporting features for Automation

 Report should provide where errors
  occurred and using which test data.


 Should be easily sharable.


 Details for each step execution.


 Snapshots for failed tests.


 Customizable reporting.


 Automated notifications on failure or
  reaching threshold level.


 Should have instrumentation for
  debugging purpose.
Continuous Integration



 Constant availability of a “current” build.
 Detect and fix integration problems continuously.
 Early warning of incompatible code.
 Immediate automated testing of all changes.
 Immediate feedback to developers
 Useful Metrics
Best Practices



 Avoid Duplicate Code
 Don't swallow Exceptions
 Don't use brittle locators
 Avoid Pesticide Paradox : Parameterize test data
 Create and leverage GUI Map
 Write reusable modules for common test functions.
 Make tests atomic
 Readable and maintainable code
 Automation Handover
Best Practices (Contd..)
Email: gbansal@xebia.com; @gaurav_bansal

More Related Content

PDF
Intro to iOS Application Architecture
PDF
Angular JS tutorial
PPTX
Asp.net boilerplate
PPTX
Azure functions
PDF
Xcode Project Infrastructure
PPTX
Angular Js Basics
PPTX
Angular JS, steal the idea
Intro to iOS Application Architecture
Angular JS tutorial
Asp.net boilerplate
Azure functions
Xcode Project Infrastructure
Angular Js Basics
Angular JS, steal the idea

What's hot (14)

PPTX
Angular JS
PPTX
ANGULAR JS TRAINING IN PUNE
PPTX
Step by Step - AngularJS
PPTX
Getting Started with Angular JS
PDF
PPTX
Angular js 1.0-fundamentals
PDF
apidays LIVE LONDON - Exploring an API with Blocks by Larry Kluger
PDF
iOS Layout Overview
PPTX
PL SQLDay Machine Learning- Hands on ML.NET.pptx
PPTX
Angular js for beginners
PPTX
Angular js presentation at Datacom
PPTX
Why do I Love C#?
PPTX
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
PPTX
Introduction to AngularJS
Angular JS
ANGULAR JS TRAINING IN PUNE
Step by Step - AngularJS
Getting Started with Angular JS
Angular js 1.0-fundamentals
apidays LIVE LONDON - Exploring an API with Blocks by Larry Kluger
iOS Layout Overview
PL SQLDay Machine Learning- Hands on ML.NET.pptx
Angular js for beginners
Angular js presentation at Datacom
Why do I Love C#?
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
Introduction to AngularJS
Ad

Viewers also liked (7)

PDF
At2012 chennai lean_agile_krishnas
PDF
At2012 chennai roleofa_coach-madhurk
PDF
At2012 bengaluru continuous_visibility-souvikb
PDF
At2012 chennai driving_changebyencouragingrightbehaviours_maheshv
PDF
Master the how in Agile- Shweta Parashar
PDF
ATH2013-Mohan -Lean for Leaders
PDF
Agile Tour 2016 Pune - Innovation Agility with innovative Agile by Kshitij Nema
At2012 chennai lean_agile_krishnas
At2012 chennai roleofa_coach-madhurk
At2012 bengaluru continuous_visibility-souvikb
At2012 chennai driving_changebyencouragingrightbehaviours_maheshv
Master the how in Agile- Shweta Parashar
ATH2013-Mohan -Lean for Leaders
Agile Tour 2016 Pune - Innovation Agility with innovative Agile by Kshitij Nema
Ad

Similar to Automation strategies for agile testing Gaurav bansal (20)

PPTX
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
PPTX
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
PDF
Современная архитектура Android-приложений - Archetype / Степан Гончаров (90 ...
PPT
Building Rich User Experiences Without JavaScript Spaghetti
PPTX
Coding Naked
DOCX
QTP Interview Questions and answers
PDF
Top iOS Testing Tools and Frameworks.pdf
PPTX
Better End-to-End Testing with Page Objects Model using Protractor
PDF
Javascript spaghetti stirtrek_5_17
PDF
How to Use Playwright Locators_ A Detailed Guide.pdf
PDF
Faites évoluer votre accès aux données avec MongoDB Stitch
PDF
Serverless API with Azure Functions
PPTX
Introduction to j2 ee frameworks
PDF
PukaPuka Presentation
PPTX
Coded UI: Hand Coding based on Page Object Model
PPTX
Azure serverless architectures
PPTX
1,2,3 … Testing : Is this thing on(line)? with Mike Martin
PPTX
Angular JS, A dive to concepts
PPTX
Angular patterns
PDF
Gang of Four in Java
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
Современная архитектура Android-приложений - Archetype / Степан Гончаров (90 ...
Building Rich User Experiences Without JavaScript Spaghetti
Coding Naked
QTP Interview Questions and answers
Top iOS Testing Tools and Frameworks.pdf
Better End-to-End Testing with Page Objects Model using Protractor
Javascript spaghetti stirtrek_5_17
How to Use Playwright Locators_ A Detailed Guide.pdf
Faites évoluer votre accès aux données avec MongoDB Stitch
Serverless API with Azure Functions
Introduction to j2 ee frameworks
PukaPuka Presentation
Coded UI: Hand Coding based on Page Object Model
Azure serverless architectures
1,2,3 … Testing : Is this thing on(line)? with Mike Martin
Angular JS, A dive to concepts
Angular patterns
Gang of Four in Java

More from India Scrum Enthusiasts Community (20)

PPTX
Deciphering Agile Big Data
PPTX
“How We Learnt to Stop Worrying and Live with Uncertainty” – Case Studies fro...
PPTX
Rubber Meets the Road
PPTX
Can Agile Enthusiasm See The Organization Through?
PPTX
Agile​ ​HR​ ​From​ ​the​ ​trenches
PDF
PPTX
Software 4.0 : “How” of Building Software Driven Business
PPTX
Agile Digital Architecture
PPTX
Governance mechanism to further business agility
PDF
Opening the Mainframe world to Mobile Ecosystem in a seamless and beneficial ...
PDF
Workplace Happiness - Is Business Agility Taking us Towards Happy Workplaces?
PDF
Wave 2 of Agile: Agile Leadership Redefined
PDF
Agile Engineering Environment – 2017
PPTX
Management for Agility and Outcomes
PPTX
Agile Mindset Shifting: Agile For All
PDF
Agile Engineering Environment – 2017
PDF
Wave 2 of Agile: Agile Leadership Redefined
PDF
Five (Oops!) Six Mistakes You are Making as a Leader
PPTX
Empower the Forbidden Power Players
PPTX
Agility in Education System for Digital India
Deciphering Agile Big Data
“How We Learnt to Stop Worrying and Live with Uncertainty” – Case Studies fro...
Rubber Meets the Road
Can Agile Enthusiasm See The Organization Through?
Agile​ ​HR​ ​From​ ​the​ ​trenches
Software 4.0 : “How” of Building Software Driven Business
Agile Digital Architecture
Governance mechanism to further business agility
Opening the Mainframe world to Mobile Ecosystem in a seamless and beneficial ...
Workplace Happiness - Is Business Agility Taking us Towards Happy Workplaces?
Wave 2 of Agile: Agile Leadership Redefined
Agile Engineering Environment – 2017
Management for Agility and Outcomes
Agile Mindset Shifting: Agile For All
Agile Engineering Environment – 2017
Wave 2 of Agile: Agile Leadership Redefined
Five (Oops!) Six Mistakes You are Making as a Leader
Empower the Forbidden Power Players
Agility in Education System for Digital India

Recently uploaded (20)

DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
KodekX | Application Modernization Development
PDF
Encapsulation theory and applications.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
MYSQL Presentation for SQL database connectivity
The AUB Centre for AI in Media Proposal.docx
Diabetes mellitus diagnosis method based random forest with bat algorithm
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Encapsulation_ Review paper, used for researhc scholars
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
KodekX | Application Modernization Development
Encapsulation theory and applications.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Spectroscopy.pptx food analysis technology
NewMind AI Weekly Chronicles - August'25 Week I
Network Security Unit 5.pdf for BCA BBA.
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Big Data Technologies - Introduction.pptx
Approach and Philosophy of On baking technology
Building Integrated photovoltaic BIPV_UPV.pdf
Programs and apps: productivity, graphics, security and other tools
Understanding_Digital_Forensics_Presentation.pptx
Chapter 3 Spatial Domain Image Processing.pdf
MYSQL Presentation for SQL database connectivity

Automation strategies for agile testing Gaurav bansal

  • 1. Automation Strategies for Agile Testing “Is your automation testing “Agile” or “Fragile”? Gaurav Bansal www.agiletour.org
  • 2. Agenda  Why use automation in Agile Projects?  Selecting Automation Strategy  Record and Playback. Right Choice?  Design patterns for test automation  Best Practices
  • 3. Why automation in agile projects?  A
  • 4. Selecting Automation Strategy  Licenced Tools  Light weight Record and Playback  Automation Framework using Open Source Tools
  • 5. Automation Framework (Using Open Source Tools)  Typical Issues: • Hard Coded Values • Duplicate Code • No Data Driven Testing • No Exception Handling • God Object Pattern • Brittle Locators • Fragile Test Scripts • Liability rather than Asset
  • 6. Possible Solutions..  Build Abstraction to avoid code duplication  What If we moved the page-specific behavior into a corresponding class?  Voila! The Page Object is born.
  • 7. The Page Object  The Page Object pattern represents the screens of your web app as a series of objects.  The page object contains all the services offered by a particular page.  Consolidates the code for interacting with any given UI element.  Exposes methods that reflect the things a user can see and do on that page, e.g. • loginSuccessfully(), • searchKeyword(),  Hides the details of telling the browser how to do addOrder(), getFilter(), those things. openDetails() • seeMore(), closeDetails(), showSearch()
  • 8. Build UI Repository  Easily maintain your test components when an object in your application changes.  No need to modify the script when object properties changes.  Easy to identify objects in AUT by Object Logical Names.  Can be created independently from scripts.
  • 9. Make tests Data Driven  Allows to develop automated test scripts that are more generic, requiring only that the input and expected results be updated.  Information like data inputs or outputs, expected results get stored in the form of conveniently managed text records.
  • 10. Reporting features for Automation  Report should provide where errors occurred and using which test data.  Should be easily sharable.  Details for each step execution.  Snapshots for failed tests.  Customizable reporting.  Automated notifications on failure or reaching threshold level.  Should have instrumentation for debugging purpose.
  • 11. Continuous Integration  Constant availability of a “current” build.  Detect and fix integration problems continuously.  Early warning of incompatible code.  Immediate automated testing of all changes.  Immediate feedback to developers  Useful Metrics
  • 12. Best Practices  Avoid Duplicate Code  Don't swallow Exceptions  Don't use brittle locators  Avoid Pesticide Paradox : Parameterize test data  Create and leverage GUI Map  Write reusable modules for common test functions.  Make tests atomic  Readable and maintainable code  Automation Handover