SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
End-to-end browser testing 

with a manageable number of annoyances
— Steven Noble, 2019
About me
• Creating software since Dick
Smith added a Basic cartridge
and cassette data storage to
the Wizard

• Working in the digital
economy since 1994:
journalism, PR, marketing,
consulting, research, etc

• React/Node software
developer with GorillaStack:
we’re like IFTTT for your
enterprise cloud infrastructure
End-to-end browser testing: 

the theory
• Confirm that your services and units work
together as required

• Test your app the way your users test it —
through the user interface

• Spend less time on manual testing
End-to-end browser testing: 

the reality
…that’s all true, but…

• It’s really slow

• It’s hard to debug

• It can be flakey

…so here’s how to get those benefits with a
manageable number of annoyances
But first, your stack
Headless 

web 

browser
Chrome 

only
Chrome

Firefox

etc
Browser
automation 

driver
Chromedriver
Chromedriver 

Marionette (Firefox)

etc
Browser
automation
server
DevTools

protocol
Selenium
Browser

testing

framework
Google

Puppeteer
Webdriver.io
Nightwatch

TestCafe

etc
It looks like this
browser.url('/login');

$('#login-form').waitForVisible();
$('#username').setValue(WDIO_USERNAME);

$('#password').setValue(WDIO_PASSWORD);

$('#login').click();
$('#dashboard').waitForVisible();
expect(browser.getUrl()).to.equal('/dashboard');

expect($('h1')).getText().to.equal('Dashboard');

expect($('#header').getText())

.to.include(`Welcome ${WDIO_USERNAME}`);
TIP: Employ software developers,
not automation testers
So you can quickly
tell whether a failure
is a bug in the app
or a bug in the test
So developers will
write or maintain tests
whenever they write
or maintain features
aka, be GorillaStack, not the ABC
TIP: Employ software developers,
not automation testers
• So you can define semantic selectors:

• Testing your own code:

• button#reset-password
• Testing someone else's code:

• //div[@class="col-md-12"]/
form[@id="login"]/button[2]
TIP: Employ software developers,
not automation testers
So you can change the behaviour of the app being
tested:

• Disable Google Analytics, Rollbar, Intercom etc

• Use test keys for Google Recaptcha, Stripe, etc

• Execute next steps immediately instead of
sending them to a message queue

• Load/unload database fixtures
TIP: Lock down Google Chrome
If you are just using the Google Chrome binary that you
use for everyday browsing, then you are liable to find:

• Test behaviour changes randomly after automatic
Chrome version updates

• Test behaviour differs on different machines that are
running different versions of Chrome

Instead, use a Docker container or similar that lets you
lock your tests to a specific version of Chrome
TIP: If you Dockerise Selenium, don’t
treat the container as a black box
• If you get weird Selenium errors in your tests, start by
dropping down a level:

• Visit http://localhost:4444/wd/hub/static/resource/
hub.html

• Send commands to Selenium directly via its HTTP
API

• You’ll probably see errors related to a known
issues with the official SeleniumHQ containers,
with possible solutions in GitHub issues
TIP: If you Dockerise Selenium, don’t
treat the container as a black box
• If not, drop down a second level:

• docker exec -it <constainerID> 

/bin/bash
• Send commands directly to Selenium via its
CLI

• You’ll probably see errors related to a known
issues with the official SeleniumHQ containers,
with possible solutions in GitHub issues
TIP: Create forgiving pipelines 

in your CI
For example, in Buildkite, we:

• Run the WDIO step after all other steps, as they all
provide useful feedback more quickly

• Make the WDIO step mandatory when merging a
feature branch in develop

• Make the WDIO step optional in all other scenarios

• Make good use of the retry attributes in
pipeline.yml
Webdriver.io
Webdriver.io
Webdriver.io

Contenu connexe

Tendances

JUST EAT: Tools we use to enable our culture
JUST EAT: Tools we use to enable our cultureJUST EAT: Tools we use to enable our culture
JUST EAT: Tools we use to enable our culturePeter Mounce
 
Intro to Netflix's Chaos Monkey
Intro to Netflix's Chaos MonkeyIntro to Netflix's Chaos Monkey
Intro to Netflix's Chaos MonkeyMichael Whitehead
 
Selenium and Appium Training from Sauce Labs
Selenium and Appium Training from Sauce LabsSelenium and Appium Training from Sauce Labs
Selenium and Appium Training from Sauce LabsSauce Labs
 
Sauce Labs for Visual Studio Team Services & TFS
Sauce Labs for Visual Studio Team Services & TFSSauce Labs for Visual Studio Team Services & TFS
Sauce Labs for Visual Studio Team Services & TFSSauce Labs
 
Release the Monkeys ! Testing in the Wild at Netflix
Release the Monkeys !  Testing in the Wild at NetflixRelease the Monkeys !  Testing in the Wild at Netflix
Release the Monkeys ! Testing in the Wild at NetflixGareth Bowles
 
Task runners + theming automating your workflow
Task runners + theming  automating your workflowTask runners + theming  automating your workflow
Task runners + theming automating your workflowJoshua Gilmer
 
Intro to Electron - Creating Desktop Applications with HTML5
Intro to Electron - Creating Desktop Applications with HTML5Intro to Electron - Creating Desktop Applications with HTML5
Intro to Electron - Creating Desktop Applications with HTML5Felicia O'Garro
 
Coding with jetpack
Coding with jetpackCoding with jetpack
Coding with jetpackRich Collier
 
Installing and setting up eclipse java projects
Installing and setting up eclipse java projectsInstalling and setting up eclipse java projects
Installing and setting up eclipse java projectshccit
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With JestBen McCormick
 
Moving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life StoryMoving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life StorySauce Labs
 
DjangoZoom lightning talk
DjangoZoom lightning talkDjangoZoom lightning talk
DjangoZoom lightning talknoderabbit
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumDev9Com
 
Progressive Enhancement using WSGI
Progressive Enhancement using WSGIProgressive Enhancement using WSGI
Progressive Enhancement using WSGIMatthew Wilkes
 
Practical Tips & Tricks for Selenium Test Automation
Practical Tips & Tricks for Selenium Test AutomationPractical Tips & Tricks for Selenium Test Automation
Practical Tips & Tricks for Selenium Test AutomationSauce Labs
 
Email Production at scale
Email Production at scaleEmail Production at scale
Email Production at scaledisplay block
 
Si fa presto a dire serverless
Si fa presto a dire serverlessSi fa presto a dire serverless
Si fa presto a dire serverlessAlessio Coser
 
How to create your own WordPress plugin
How to create your own WordPress pluginHow to create your own WordPress plugin
How to create your own WordPress pluginJohn Tighe
 
Build Fail-Proof Tests in Any Browser with Selenium
Build Fail-Proof Tests in Any Browser with SeleniumBuild Fail-Proof Tests in Any Browser with Selenium
Build Fail-Proof Tests in Any Browser with SeleniumTechWell
 

Tendances (20)

JUST EAT: Tools we use to enable our culture
JUST EAT: Tools we use to enable our cultureJUST EAT: Tools we use to enable our culture
JUST EAT: Tools we use to enable our culture
 
Intro to Netflix's Chaos Monkey
Intro to Netflix's Chaos MonkeyIntro to Netflix's Chaos Monkey
Intro to Netflix's Chaos Monkey
 
Selenium and Appium Training from Sauce Labs
Selenium and Appium Training from Sauce LabsSelenium and Appium Training from Sauce Labs
Selenium and Appium Training from Sauce Labs
 
Sauce Labs for Visual Studio Team Services & TFS
Sauce Labs for Visual Studio Team Services & TFSSauce Labs for Visual Studio Team Services & TFS
Sauce Labs for Visual Studio Team Services & TFS
 
Release the Monkeys ! Testing in the Wild at Netflix
Release the Monkeys !  Testing in the Wild at NetflixRelease the Monkeys !  Testing in the Wild at Netflix
Release the Monkeys ! Testing in the Wild at Netflix
 
Task runners + theming automating your workflow
Task runners + theming  automating your workflowTask runners + theming  automating your workflow
Task runners + theming automating your workflow
 
Intro to Electron - Creating Desktop Applications with HTML5
Intro to Electron - Creating Desktop Applications with HTML5Intro to Electron - Creating Desktop Applications with HTML5
Intro to Electron - Creating Desktop Applications with HTML5
 
Coding with jetpack
Coding with jetpackCoding with jetpack
Coding with jetpack
 
Installing and setting up eclipse java projects
Installing and setting up eclipse java projectsInstalling and setting up eclipse java projects
Installing and setting up eclipse java projects
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With Jest
 
Moving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life StoryMoving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life Story
 
presentation-chaos-monkey
presentation-chaos-monkeypresentation-chaos-monkey
presentation-chaos-monkey
 
DjangoZoom lightning talk
DjangoZoom lightning talkDjangoZoom lightning talk
DjangoZoom lightning talk
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and Selenium
 
Progressive Enhancement using WSGI
Progressive Enhancement using WSGIProgressive Enhancement using WSGI
Progressive Enhancement using WSGI
 
Practical Tips & Tricks for Selenium Test Automation
Practical Tips & Tricks for Selenium Test AutomationPractical Tips & Tricks for Selenium Test Automation
Practical Tips & Tricks for Selenium Test Automation
 
Email Production at scale
Email Production at scaleEmail Production at scale
Email Production at scale
 
Si fa presto a dire serverless
Si fa presto a dire serverlessSi fa presto a dire serverless
Si fa presto a dire serverless
 
How to create your own WordPress plugin
How to create your own WordPress pluginHow to create your own WordPress plugin
How to create your own WordPress plugin
 
Build Fail-Proof Tests in Any Browser with Selenium
Build Fail-Proof Tests in Any Browser with SeleniumBuild Fail-Proof Tests in Any Browser with Selenium
Build Fail-Proof Tests in Any Browser with Selenium
 

Similaire à Webdriver.io

Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Amazon Web Services
 
CodeIgniter for Startups, cicon2010
CodeIgniter for Startups, cicon2010CodeIgniter for Startups, cicon2010
CodeIgniter for Startups, cicon2010Joel Gascoigne
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle ManagementAmazon Web Services
 
Automated Acceptance Testing from Scratch
Automated Acceptance Testing from ScratchAutomated Acceptance Testing from Scratch
Automated Acceptance Testing from ScratchExcella
 
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...Docker, Inc.
 
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...Daniel Gallego Vico
 
10 tips for Cloud Native Security
10 tips for Cloud Native Security10 tips for Cloud Native Security
10 tips for Cloud Native SecurityKarthik Gaekwad
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
Development Processes and Tooling
Development Processes and ToolingDevelopment Processes and Tooling
Development Processes and ToolingBora Bilgin
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Lean IT Consulting
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Niels Frydenholm
 
Using Minikube for Node.js development
Using Minikube for Node.js developmentUsing Minikube for Node.js development
Using Minikube for Node.js developmentTroy Connor
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDocker, Inc.
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaGeorge Wilson
 
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)PROIDEA
 
Dev ops on aws deep dive on continuous delivery - Toronto
Dev ops on aws deep dive on continuous delivery - TorontoDev ops on aws deep dive on continuous delivery - Toronto
Dev ops on aws deep dive on continuous delivery - TorontoAmazon Web Services
 

Similaire à Webdriver.io (20)

R meetup 20161011v2
R meetup 20161011v2R meetup 20161011v2
R meetup 20161011v2
 
Automated Browser Testing
Automated Browser TestingAutomated Browser Testing
Automated Browser Testing
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
CodeIgniter for Startups, cicon2010
CodeIgniter for Startups, cicon2010CodeIgniter for Startups, cicon2010
CodeIgniter for Startups, cicon2010
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle Management
 
Automated Acceptance Testing from Scratch
Automated Acceptance Testing from ScratchAutomated Acceptance Testing from Scratch
Automated Acceptance Testing from Scratch
 
BBS Selenium & Docker
BBS Selenium & Docker BBS Selenium & Docker
BBS Selenium & Docker
 
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
 
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...
 
10 tips for Cloud Native Security
10 tips for Cloud Native Security10 tips for Cloud Native Security
10 tips for Cloud Native Security
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Development Processes and Tooling
Development Processes and ToolingDevelopment Processes and Tooling
Development Processes and Tooling
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...
 
Using Minikube for Node.js development
Using Minikube for Node.js developmentUsing Minikube for Node.js development
Using Minikube for Node.js development
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and Joomla
 
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
 
Dev ops on aws deep dive on continuous delivery - Toronto
Dev ops on aws deep dive on continuous delivery - TorontoDev ops on aws deep dive on continuous delivery - Toronto
Dev ops on aws deep dive on continuous delivery - Toronto
 

Dernier

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Dernier (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Webdriver.io

  • 1. End-to-end browser testing 
 with a manageable number of annoyances — Steven Noble, 2019
  • 2. About me • Creating software since Dick Smith added a Basic cartridge and cassette data storage to the Wizard • Working in the digital economy since 1994: journalism, PR, marketing, consulting, research, etc • React/Node software developer with GorillaStack: we’re like IFTTT for your enterprise cloud infrastructure
  • 3. End-to-end browser testing: 
 the theory • Confirm that your services and units work together as required • Test your app the way your users test it — through the user interface • Spend less time on manual testing
  • 4. End-to-end browser testing: 
 the reality …that’s all true, but… • It’s really slow • It’s hard to debug • It can be flakey …so here’s how to get those benefits with a manageable number of annoyances
  • 5. But first, your stack Headless 
 web 
 browser Chrome 
 only Chrome
 Firefox
 etc Browser automation 
 driver Chromedriver Chromedriver 
 Marionette (Firefox)
 etc Browser automation server DevTools
 protocol Selenium Browser
 testing
 framework Google
 Puppeteer Webdriver.io Nightwatch
 TestCafe
 etc
  • 6. It looks like this browser.url('/login');
 $('#login-form').waitForVisible(); $('#username').setValue(WDIO_USERNAME);
 $('#password').setValue(WDIO_PASSWORD);
 $('#login').click(); $('#dashboard').waitForVisible(); expect(browser.getUrl()).to.equal('/dashboard');
 expect($('h1')).getText().to.equal('Dashboard');
 expect($('#header').getText())
 .to.include(`Welcome ${WDIO_USERNAME}`);
  • 7. TIP: Employ software developers, not automation testers So you can quickly tell whether a failure is a bug in the app or a bug in the test So developers will write or maintain tests whenever they write or maintain features aka, be GorillaStack, not the ABC
  • 8. TIP: Employ software developers, not automation testers • So you can define semantic selectors: • Testing your own code: • button#reset-password • Testing someone else's code: • //div[@class="col-md-12"]/ form[@id="login"]/button[2]
  • 9. TIP: Employ software developers, not automation testers So you can change the behaviour of the app being tested: • Disable Google Analytics, Rollbar, Intercom etc • Use test keys for Google Recaptcha, Stripe, etc • Execute next steps immediately instead of sending them to a message queue • Load/unload database fixtures
  • 10. TIP: Lock down Google Chrome If you are just using the Google Chrome binary that you use for everyday browsing, then you are liable to find: • Test behaviour changes randomly after automatic Chrome version updates • Test behaviour differs on different machines that are running different versions of Chrome Instead, use a Docker container or similar that lets you lock your tests to a specific version of Chrome
  • 11. TIP: If you Dockerise Selenium, don’t treat the container as a black box • If you get weird Selenium errors in your tests, start by dropping down a level: • Visit http://localhost:4444/wd/hub/static/resource/ hub.html • Send commands to Selenium directly via its HTTP API • You’ll probably see errors related to a known issues with the official SeleniumHQ containers, with possible solutions in GitHub issues
  • 12. TIP: If you Dockerise Selenium, don’t treat the container as a black box • If not, drop down a second level: • docker exec -it <constainerID> 
 /bin/bash • Send commands directly to Selenium via its CLI • You’ll probably see errors related to a known issues with the official SeleniumHQ containers, with possible solutions in GitHub issues
  • 13. TIP: Create forgiving pipelines 
 in your CI For example, in Buildkite, we: • Run the WDIO step after all other steps, as they all provide useful feedback more quickly • Make the WDIO step mandatory when merging a feature branch in develop • Make the WDIO step optional in all other scenarios • Make good use of the retry attributes in pipeline.yml