SlideShare a Scribd company logo
Duda Selenium Automation
MAIN ASPECTS
Aug 2017
Who
Am I ?
https://www.linkedin.com/in/tallanda
tal.landa@gmail.com
● About 1500 Selenium tests
● pass rate < 70%
● 3.5 hours for the entire suite
● Once a day
● Maintenance ~ 30%
● No one really cares about
automation apart from the QA team
● 2.5 automation developers
One Year Ago Now
● Over 3000 Selenium tests
● pass rate > 99%
● Less than 15 minutes for the entire suite
● 30 times a day on different code branches
● Maintenance less than 5%
● Dev is fully committed to keep
automation tests clean
● 2.5 automation developers
What Made The Difference
Architecture
Change
Short Test
Flows
Stable Tests
Only
Visualization
● Focus on very specific checkpoints:
○ Run faster
○ Easy to debug
○ The failure is clear
● Api or other shortcuts usage for peripheral functions:
○ Get to the required condition via fastest and safest way
● Avoid using complicated flows
○ Only if absolutely a must
○ Avoid test dependencies
Atomic Test Flows
● Testing the new tests:
○ All new tests shall run successfully on a sanbox 30 times in a row
○ All tests must pass
○ Runtime < 200 sec per class
● Code Review:
○ Code review meeting with automation team
● Only after sandbox and code review, new tests are added to
“production” XML
(Very) Stable Tests Only
Visualize – Jenkins Pipeline
Visualize – Automation Dashboard
● Short Test Flows
● Stable Tests Only
● Visualization/Immediate Feedback
Wrapping Up
Selenium
Done Right
WWHB Design pattern
About
me
UI Testing Weakness
Bad selectors
Scattered UI flow
Bad waits and
sleeps
Tests prioritized
Obfuscated code in
tests
Bad log report
The small things
video
Asynchronous
Browser
Opening video
● Automation tests are not scripts - they’re software.
● A software project should have a good design and architecture to
overcome future challenges.
● The software developing team should be devoted to maintain a high
quality code standard.
● “The chain is strong as its weakest link”
● It’s not enough if it works
Automation Is Software
Like a glove
● Clean code should be simple and direct
● Clean code should read like well written prose
● Clean code is when each routine you read is pretty
much what you’ve expected
● A function should do one thing, it should do it well
and it should do it only
● Clean code always looks like it was written by
someone who cares
Clean Code
Robert Cecil Martin
a.k.a Uncle bob
● Selector properties
○ Unique
○ Meaningful
○ Low chance of change
● Be the change
Selectors & API’s
WWHB Design Pattern
● What to test
● Where to find the elements
● How to execute the test
● The Browser
● What: @Test
● Best practices
○ Small atomic tests - no priority
○ Setups and teardowns in every @Test
○ Think small - every function should be well thought of.
In Assert use contains, toLowerCase…
○ Minimal logic in tests, only well written prose
○ Minimal global variables
● Measure your code
○ Test score system: url
○ Old navigation test: url
○ New navigation test: url
What
● Where: Page Objects
● In test findBy() -> elementfinder class per test -> @FindBy -> enum -
> public static class
● Best practice
○ Minimal logic in page objects - only simple actions
○ No cross page object function calls
Where
THIS IS HUGE!!
● How: Logics
● Structure of logics and inheritance
● Obstacles solved as part of the infrastructure, not ad hoc per test
(publishSite, setText, Hover, importTemplates)
How
BROWSE
R
TOUCHER
● The browser is the enemy - no one is doing
element.click()
element.getCssValue()
driver.get()
driver.findElement(by)
……
Browser
THIS IS ALSO HUGE!!!!
Test suit
● The browser is the enemy - no one is doing
element.click()
element.getCssValue()
driver.get()
driver.findElement(by)
……
Browser
BROWSE
R
TOUCHER
Test suit
Architecture
LOGICS
Tests
Page Objects
Browser
● Extra:
● Smart waits and ExpectedCondition + stopwatch
● Static functions - no side effects
● Testng-failed.xml for retry
● Sandbox with test randomizer
● FocusOnIframe - open close principle
Extra topics
● Automation is software
● Clean code
● WWHB design pattern
Conclusion
Thank You!

More Related Content

What's hot

Ruin your life using robot framework
Ruin your life using robot frameworkRuin your life using robot framework
Ruin your life using robot framework
Prayoch Rujira
 
Ui Testing with Ghost Inspector
Ui Testing with Ghost InspectorUi Testing with Ghost Inspector
Ui Testing with Ghost Inspector
Harvard Web Working Group
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
Sai Krishna
 
Keeping up with the changes: Automating UAT - Damian Sweeney, Student and Aca...
Keeping up with the changes: Automating UAT - Damian Sweeney, Student and Aca...Keeping up with the changes: Automating UAT - Damian Sweeney, Student and Aca...
Keeping up with the changes: Automating UAT - Damian Sweeney, Student and Aca...
Blackboard APAC
 
Accomplishment report at QNAP
Accomplishment report at QNAPAccomplishment report at QNAP
Accomplishment report at QNAP
Jun-Wei Lin
 
Background threads, async communication and vaadin
Background threads, async communication and vaadinBackground threads, async communication and vaadin
Background threads, async communication and vaadin
Petter Holmström
 
Introduction to K6
Introduction to K6Introduction to K6
Introduction to K6
Knoldus Inc.
 
Keeping business logic out of your UIs
Keeping business logic out of your UIsKeeping business logic out of your UIs
Keeping business logic out of your UIs
Petter Holmström
 
JavaSkop - Automation Skopje
JavaSkop - Automation SkopjeJavaSkop - Automation Skopje
JavaSkop - Automation Skopje
Ana Sarbescu
 
Value of Unit Testing
Value of Unit TestingValue of Unit Testing
Value of Unit Testing
Ferose Khan J
 
Picking the right architecture and sticking to it
Picking the right architecture and sticking to itPicking the right architecture and sticking to it
Picking the right architecture and sticking to it
Petter Holmström
 
Meetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React TestingMeetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React Testing
Augusto Lazaro
 
Overview of Testing Talks at Pycon
Overview of Testing Talks at PyconOverview of Testing Talks at Pycon
Overview of Testing Talks at Pycon
Jacqueline Kazil
 
Mocking in python
Mocking in pythonMocking in python
Mocking in python
Ooblioob
 
My Test Automation Journey
My Test Automation JourneyMy Test Automation Journey
My Test Automation Journey
Vaidas Pilkauskas
 
Akka Persistence
Akka PersistenceAkka Persistence
Akka Persistence
Knoldus Inc.
 
Test driving QML
Test driving QMLTest driving QML
Test driving QML
Artem Marchenko
 
How to go about testing in React?
How to go about testing in React? How to go about testing in React?
How to go about testing in React?
Lisa Gagarina
 
Improve the deployment process step by step
Improve the deployment process step by stepImprove the deployment process step by step
Improve the deployment process step by step
Daniel Fahlke
 
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...
MobileMonday Estonia
 

What's hot (20)

Ruin your life using robot framework
Ruin your life using robot frameworkRuin your life using robot framework
Ruin your life using robot framework
 
Ui Testing with Ghost Inspector
Ui Testing with Ghost InspectorUi Testing with Ghost Inspector
Ui Testing with Ghost Inspector
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
 
Keeping up with the changes: Automating UAT - Damian Sweeney, Student and Aca...
Keeping up with the changes: Automating UAT - Damian Sweeney, Student and Aca...Keeping up with the changes: Automating UAT - Damian Sweeney, Student and Aca...
Keeping up with the changes: Automating UAT - Damian Sweeney, Student and Aca...
 
Accomplishment report at QNAP
Accomplishment report at QNAPAccomplishment report at QNAP
Accomplishment report at QNAP
 
Background threads, async communication and vaadin
Background threads, async communication and vaadinBackground threads, async communication and vaadin
Background threads, async communication and vaadin
 
Introduction to K6
Introduction to K6Introduction to K6
Introduction to K6
 
Keeping business logic out of your UIs
Keeping business logic out of your UIsKeeping business logic out of your UIs
Keeping business logic out of your UIs
 
JavaSkop - Automation Skopje
JavaSkop - Automation SkopjeJavaSkop - Automation Skopje
JavaSkop - Automation Skopje
 
Value of Unit Testing
Value of Unit TestingValue of Unit Testing
Value of Unit Testing
 
Picking the right architecture and sticking to it
Picking the right architecture and sticking to itPicking the right architecture and sticking to it
Picking the right architecture and sticking to it
 
Meetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React TestingMeetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React Testing
 
Overview of Testing Talks at Pycon
Overview of Testing Talks at PyconOverview of Testing Talks at Pycon
Overview of Testing Talks at Pycon
 
Mocking in python
Mocking in pythonMocking in python
Mocking in python
 
My Test Automation Journey
My Test Automation JourneyMy Test Automation Journey
My Test Automation Journey
 
Akka Persistence
Akka PersistenceAkka Persistence
Akka Persistence
 
Test driving QML
Test driving QMLTest driving QML
Test driving QML
 
How to go about testing in React?
How to go about testing in React? How to go about testing in React?
How to go about testing in React?
 
Improve the deployment process step by step
Improve the deployment process step by stepImprove the deployment process step by step
Improve the deployment process step by step
 
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...
 

Similar to Selenium done right

Automated testing
Automated testingAutomated testing
Automated testing
Aiste Stikliute
 
Wso2con test-automation
Wso2con test-automationWso2con test-automation
Wso2con test-automation
krishantha_samaraweera
 
Put "fast" back in "fast feedback"
Put "fast" back in "fast feedback"Put "fast" back in "fast feedback"
Put "fast" back in "fast feedback"
Lars Thorup
 
WSO2Con Asia 2014 - Effective Test Automation in an Agile Environment
WSO2Con Asia 2014 - Effective Test Automation in an Agile EnvironmentWSO2Con Asia 2014 - Effective Test Automation in an Agile Environment
WSO2Con Asia 2014 - Effective Test Automation in an Agile Environment
WSO2
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test Automation
Pekka Klärck
 
Automation is Easy! (python version)
Automation is Easy! (python version)Automation is Easy! (python version)
Automation is Easy! (python version)
Iakiv Kramarenko
 
How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...
Max Barrass
 
Getting started with unit and functional testing
Getting started with unit and functional testingGetting started with unit and functional testing
Getting started with unit and functional testing
Adewale Andrade
 
High Performance Software Engineering Teams
High Performance Software Engineering TeamsHigh Performance Software Engineering Teams
High Performance Software Engineering Teams
Lars Thorup
 
Unit Testing and TDD 2017
Unit Testing and TDD 2017Unit Testing and TDD 2017
Unit Testing and TDD 2017
Xavi Hidalgo
 
OutSystems Tips and Tricks
OutSystems Tips and TricksOutSystems Tips and Tricks
OutSystems Tips and Tricks
OutSystems
 
Quality Assurance: An Overview
Quality Assurance: An OverviewQuality Assurance: An Overview
Quality Assurance: An Overview
Anant Corporation
 
Test-Driven Development (TDD) in Swift
Test-Driven Development (TDD) in SwiftTest-Driven Development (TDD) in Swift
Test-Driven Development (TDD) in Swift
Amey Tavkar
 
Tdd in swift
Tdd in swiftTdd in swift
Tdd in swift
Javal Nanda
 
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
dcieslak
 
Making cross browser tests beautiful
Making cross browser tests beautifulMaking cross browser tests beautiful
Making cross browser tests beautiful
Meaghan Lewis
 
Release & Iterate Faster: Stop Manual Testing
Release & Iterate Faster: Stop Manual TestingRelease & Iterate Faster: Stop Manual Testing
Release & Iterate Faster: Stop Manual Testing
Drew Hannay
 
Demise of test scripts rise of test ideas
Demise of test scripts rise of test ideasDemise of test scripts rise of test ideas
Demise of test scripts rise of test ideas
Richard Robinson
 
Best practices for JavaScript RIAs
Best practices for JavaScript RIAsBest practices for JavaScript RIAs
Best practices for JavaScript RIAs
Carlos Ble
 
Test automation - Building effective solutions
Test automation - Building effective solutionsTest automation - Building effective solutions
Test automation - Building effective solutions
Artem Nagornyi
 

Similar to Selenium done right (20)

Automated testing
Automated testingAutomated testing
Automated testing
 
Wso2con test-automation
Wso2con test-automationWso2con test-automation
Wso2con test-automation
 
Put "fast" back in "fast feedback"
Put "fast" back in "fast feedback"Put "fast" back in "fast feedback"
Put "fast" back in "fast feedback"
 
WSO2Con Asia 2014 - Effective Test Automation in an Agile Environment
WSO2Con Asia 2014 - Effective Test Automation in an Agile EnvironmentWSO2Con Asia 2014 - Effective Test Automation in an Agile Environment
WSO2Con Asia 2014 - Effective Test Automation in an Agile Environment
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test Automation
 
Automation is Easy! (python version)
Automation is Easy! (python version)Automation is Easy! (python version)
Automation is Easy! (python version)
 
How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...
 
Getting started with unit and functional testing
Getting started with unit and functional testingGetting started with unit and functional testing
Getting started with unit and functional testing
 
High Performance Software Engineering Teams
High Performance Software Engineering TeamsHigh Performance Software Engineering Teams
High Performance Software Engineering Teams
 
Unit Testing and TDD 2017
Unit Testing and TDD 2017Unit Testing and TDD 2017
Unit Testing and TDD 2017
 
OutSystems Tips and Tricks
OutSystems Tips and TricksOutSystems Tips and Tricks
OutSystems Tips and Tricks
 
Quality Assurance: An Overview
Quality Assurance: An OverviewQuality Assurance: An Overview
Quality Assurance: An Overview
 
Test-Driven Development (TDD) in Swift
Test-Driven Development (TDD) in SwiftTest-Driven Development (TDD) in Swift
Test-Driven Development (TDD) in Swift
 
Tdd in swift
Tdd in swiftTdd in swift
Tdd in swift
 
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
 
Making cross browser tests beautiful
Making cross browser tests beautifulMaking cross browser tests beautiful
Making cross browser tests beautiful
 
Release & Iterate Faster: Stop Manual Testing
Release & Iterate Faster: Stop Manual TestingRelease & Iterate Faster: Stop Manual Testing
Release & Iterate Faster: Stop Manual Testing
 
Demise of test scripts rise of test ideas
Demise of test scripts rise of test ideasDemise of test scripts rise of test ideas
Demise of test scripts rise of test ideas
 
Best practices for JavaScript RIAs
Best practices for JavaScript RIAsBest practices for JavaScript RIAs
Best practices for JavaScript RIAs
 
Test automation - Building effective solutions
Test automation - Building effective solutionsTest automation - Building effective solutions
Test automation - Building effective solutions
 

Recently uploaded

Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
aymanquadri279
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 

Recently uploaded (20)

Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 

Selenium done right

  • 1. Duda Selenium Automation MAIN ASPECTS Aug 2017
  • 3. ● About 1500 Selenium tests ● pass rate < 70% ● 3.5 hours for the entire suite ● Once a day ● Maintenance ~ 30% ● No one really cares about automation apart from the QA team ● 2.5 automation developers One Year Ago Now ● Over 3000 Selenium tests ● pass rate > 99% ● Less than 15 minutes for the entire suite ● 30 times a day on different code branches ● Maintenance less than 5% ● Dev is fully committed to keep automation tests clean ● 2.5 automation developers
  • 4. What Made The Difference Architecture Change Short Test Flows Stable Tests Only Visualization
  • 5. ● Focus on very specific checkpoints: ○ Run faster ○ Easy to debug ○ The failure is clear ● Api or other shortcuts usage for peripheral functions: ○ Get to the required condition via fastest and safest way ● Avoid using complicated flows ○ Only if absolutely a must ○ Avoid test dependencies Atomic Test Flows
  • 6. ● Testing the new tests: ○ All new tests shall run successfully on a sanbox 30 times in a row ○ All tests must pass ○ Runtime < 200 sec per class ● Code Review: ○ Code review meeting with automation team ● Only after sandbox and code review, new tests are added to “production” XML (Very) Stable Tests Only
  • 9. ● Short Test Flows ● Stable Tests Only ● Visualization/Immediate Feedback Wrapping Up
  • 12. UI Testing Weakness Bad selectors Scattered UI flow Bad waits and sleeps Tests prioritized Obfuscated code in tests Bad log report The small things video Asynchronous Browser Opening video
  • 13. ● Automation tests are not scripts - they’re software. ● A software project should have a good design and architecture to overcome future challenges. ● The software developing team should be devoted to maintain a high quality code standard. ● “The chain is strong as its weakest link” ● It’s not enough if it works Automation Is Software
  • 15. ● Clean code should be simple and direct ● Clean code should read like well written prose ● Clean code is when each routine you read is pretty much what you’ve expected ● A function should do one thing, it should do it well and it should do it only ● Clean code always looks like it was written by someone who cares Clean Code Robert Cecil Martin a.k.a Uncle bob
  • 16. ● Selector properties ○ Unique ○ Meaningful ○ Low chance of change ● Be the change Selectors & API’s
  • 17. WWHB Design Pattern ● What to test ● Where to find the elements ● How to execute the test ● The Browser
  • 18. ● What: @Test ● Best practices ○ Small atomic tests - no priority ○ Setups and teardowns in every @Test ○ Think small - every function should be well thought of. In Assert use contains, toLowerCase… ○ Minimal logic in tests, only well written prose ○ Minimal global variables ● Measure your code ○ Test score system: url ○ Old navigation test: url ○ New navigation test: url What
  • 19. ● Where: Page Objects ● In test findBy() -> elementfinder class per test -> @FindBy -> enum - > public static class ● Best practice ○ Minimal logic in page objects - only simple actions ○ No cross page object function calls Where THIS IS HUGE!!
  • 20. ● How: Logics ● Structure of logics and inheritance ● Obstacles solved as part of the infrastructure, not ad hoc per test (publishSite, setText, Hover, importTemplates) How
  • 21. BROWSE R TOUCHER ● The browser is the enemy - no one is doing element.click() element.getCssValue() driver.get() driver.findElement(by) …… Browser THIS IS ALSO HUGE!!!! Test suit
  • 22. ● The browser is the enemy - no one is doing element.click() element.getCssValue() driver.get() driver.findElement(by) …… Browser BROWSE R TOUCHER Test suit
  • 24. ● Extra: ● Smart waits and ExpectedCondition + stopwatch ● Static functions - no side effects ● Testng-failed.xml for retry ● Sandbox with test randomizer ● FocusOnIframe - open close principle Extra topics
  • 25. ● Automation is software ● Clean code ● WWHB design pattern Conclusion