SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
Headless Browser Testing
with Ruby
by Justin Halsall (@juice10)
CTO of Betribes.com
Our process
Make user stories
write out all the different actions users can and
can’t do
Write out Acceptance tests
Using Rspec/Steak
Run the tests!
Doesn’t do much but its working!
Write out the first scenario
Do this before you actually create the feature
Run the tests!
And it fails! But we where expecting that...
Go ahead!
Create that
feature!
Yeah boi, its hammer
time!
Run it again and... no failures!
Yippy!
That wasn’t
too hard
Lets step it up
Write out the second scenario
Visit the page
Specify area with CSS expression
Click on the link
Make sure you end up where you expect
Run tests: Red, green, refactor
http://www.flickr.com/photos/tasuki/3503304405
Of course you can do more
eg. interacting with forms
Of course you can do more
eg. interacting with forms
Wow that was awesome!
Yeah I know right!
Whats the difference?
Its way faster!
http://www.flickr.com/photos/scallop_holden/2203771977
Headless Browser vs
Selenium
Speed speed speeeed! (our test suite
takes 30 minutes to complete on a fast
machine using a headless web browser)
Easier to set up the environment and
test edge cases.
Abstracted so easy to change out for
different browser in the future.
Tools
   Ruby http://ruby-lang.org
   Rspec http://rspec.info/
   Capybara https://github.com/jnicklas/capybara
   HtmlUnit http://htmlunit.sourceforge.net/
optio
    nal
   Akaphelos http://oinopa.com/akephalos/
optio
    nal
   Steak https://github.com/cavalle/steak
optio
    nal
   Ruby on Rails http://rubyonrails.com
optio
    nal
   Machinist https://github.com/notahat/machinist
Kthnx questions?
Me: Justin Halsall
Twitter: @juice10
E-mail: justin@betribes.com


Guess who’s looking for colleagues?

We are!                       .com

Contenu connexe

Tendances

10 things you should know before learning ruby or rails
10 things you should know before learning ruby or rails10 things you should know before learning ruby or rails
10 things you should know before learning ruby or railsRichardson Dackam
 
The wheel is spinning but the hamster is almost dead - Smartweb 2015
The wheel is spinning but the hamster is almost dead - Smartweb 2015The wheel is spinning but the hamster is almost dead - Smartweb 2015
The wheel is spinning but the hamster is almost dead - Smartweb 2015Christian Heilmann
 
How to create youtube videos fast to drive
How to create youtube videos fast to driveHow to create youtube videos fast to drive
How to create youtube videos fast to driveNatalie Ohayo
 
DevDay.lk - Bare Knuckle Web Development
DevDay.lk - Bare Knuckle Web DevelopmentDevDay.lk - Bare Knuckle Web Development
DevDay.lk - Bare Knuckle Web DevelopmentJohannes Brodwall
 
Mind the Gap - State of the Browser 2015
Mind the Gap - State of the Browser 2015Mind the Gap - State of the Browser 2015
Mind the Gap - State of the Browser 2015Christian Heilmann
 
Transform Your Business and Grow With Bots
Transform Your Business and Grow With BotsTransform Your Business and Grow With Bots
Transform Your Business and Grow With BotsVijai Mani
 
Baby steps in an agile world
Baby steps in an agile worldBaby steps in an agile world
Baby steps in an agile worldJesse Rodgers
 
TDC Floripa 2018 Dev Tests - weak specs
TDC Floripa 2018 Dev Tests - weak specsTDC Floripa 2018 Dev Tests - weak specs
TDC Floripa 2018 Dev Tests - weak specsJônatas Paganini
 

Tendances (9)

10 things you should know before learning ruby or rails
10 things you should know before learning ruby or rails10 things you should know before learning ruby or rails
10 things you should know before learning ruby or rails
 
Let’s sketch!! Paper prototype
Let’s sketch!! Paper prototypeLet’s sketch!! Paper prototype
Let’s sketch!! Paper prototype
 
The wheel is spinning but the hamster is almost dead - Smartweb 2015
The wheel is spinning but the hamster is almost dead - Smartweb 2015The wheel is spinning but the hamster is almost dead - Smartweb 2015
The wheel is spinning but the hamster is almost dead - Smartweb 2015
 
How to create youtube videos fast to drive
How to create youtube videos fast to driveHow to create youtube videos fast to drive
How to create youtube videos fast to drive
 
DevDay.lk - Bare Knuckle Web Development
DevDay.lk - Bare Knuckle Web DevelopmentDevDay.lk - Bare Knuckle Web Development
DevDay.lk - Bare Knuckle Web Development
 
Mind the Gap - State of the Browser 2015
Mind the Gap - State of the Browser 2015Mind the Gap - State of the Browser 2015
Mind the Gap - State of the Browser 2015
 
Transform Your Business and Grow With Bots
Transform Your Business and Grow With BotsTransform Your Business and Grow With Bots
Transform Your Business and Grow With Bots
 
Baby steps in an agile world
Baby steps in an agile worldBaby steps in an agile world
Baby steps in an agile world
 
TDC Floripa 2018 Dev Tests - weak specs
TDC Floripa 2018 Dev Tests - weak specsTDC Floripa 2018 Dev Tests - weak specs
TDC Floripa 2018 Dev Tests - weak specs
 

Similaire à Headless browser testing with ruby

Dmitry sharkov - Maturing Your Cucumber Suites
Dmitry sharkov   - Maturing Your Cucumber SuitesDmitry sharkov   - Maturing Your Cucumber Suites
Dmitry sharkov - Maturing Your Cucumber SuitesQA or the Highway
 
Cucumber Presentation Kiev Meet Up
Cucumber Presentation Kiev Meet UpCucumber Presentation Kiev Meet Up
Cucumber Presentation Kiev Meet Updimakovalenko
 
Selenium and Cucumber Selenium Conf 2011
Selenium and Cucumber Selenium Conf 2011Selenium and Cucumber Selenium Conf 2011
Selenium and Cucumber Selenium Conf 2011dimakovalenko
 
Graceful Failure with Selenium and Continuous Integration
Graceful Failure with Selenium and Continuous IntegrationGraceful Failure with Selenium and Continuous Integration
Graceful Failure with Selenium and Continuous IntegrationChris B. France
 
The road to professional web development
The road to professional web developmentThe road to professional web development
The road to professional web developmentChristian Heilmann
 
Using kanban and cfd to effectively manage agile testing
Using kanban and cfd to effectively manage agile testingUsing kanban and cfd to effectively manage agile testing
Using kanban and cfd to effectively manage agile testingYuval Yeret
 
Exploratory testing part 3
Exploratory testing part 3Exploratory testing part 3
Exploratory testing part 3Dawn Code
 
HTML5 and the future of the web (Dr. Seuss style)
HTML5 and the future of the web (Dr. Seuss style)HTML5 and the future of the web (Dr. Seuss style)
HTML5 and the future of the web (Dr. Seuss style)Christian Heilmann
 
Good Testers are Often Lucky
Good Testers are Often LuckyGood Testers are Often Lucky
Good Testers are Often LuckyTEST Huddle
 
Boost SharePoint User Adoption Through DIY Usability Testing [workshop] Share...
Boost SharePoint User Adoption Through DIY Usability Testing [workshop] Share...Boost SharePoint User Adoption Through DIY Usability Testing [workshop] Share...
Boost SharePoint User Adoption Through DIY Usability Testing [workshop] Share...Mark Tiderman
 
Mobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B ExperimentsMobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B Experimentslacyrhoades
 
SQL Phone Home: Teaching Your SQL Servers to Call for Help
SQL Phone Home: Teaching Your SQL Servers to Call for HelpSQL Phone Home: Teaching Your SQL Servers to Call for Help
SQL Phone Home: Teaching Your SQL Servers to Call for HelpMike Hillwig
 
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...John McCaffrey
 
Windy cityrails performance_tuning
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuningJohn McCaffrey
 
Sundries solutions ou_aitp_4_27_11
Sundries solutions ou_aitp_4_27_11Sundries solutions ou_aitp_4_27_11
Sundries solutions ou_aitp_4_27_11sundriessolutions
 
Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...
Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...
Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...WordCamp Sydney
 
Data Driven DevOps
Data Driven DevOpsData Driven DevOps
Data Driven DevOpsLeon Stigter
 
How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)Asier Barrenetxea
 
Happy Programming with CoffeeScript
Happy Programming with CoffeeScriptHappy Programming with CoffeeScript
Happy Programming with CoffeeScriptEddie Kao
 

Similaire à Headless browser testing with ruby (20)

Dmitry sharkov - Maturing Your Cucumber Suites
Dmitry sharkov   - Maturing Your Cucumber SuitesDmitry sharkov   - Maturing Your Cucumber Suites
Dmitry sharkov - Maturing Your Cucumber Suites
 
Cucumber Presentation Kiev Meet Up
Cucumber Presentation Kiev Meet UpCucumber Presentation Kiev Meet Up
Cucumber Presentation Kiev Meet Up
 
Selenium and Cucumber Selenium Conf 2011
Selenium and Cucumber Selenium Conf 2011Selenium and Cucumber Selenium Conf 2011
Selenium and Cucumber Selenium Conf 2011
 
Graceful Failure with Selenium and Continuous Integration
Graceful Failure with Selenium and Continuous IntegrationGraceful Failure with Selenium and Continuous Integration
Graceful Failure with Selenium and Continuous Integration
 
The road to professional web development
The road to professional web developmentThe road to professional web development
The road to professional web development
 
Using kanban and cfd to effectively manage agile testing
Using kanban and cfd to effectively manage agile testingUsing kanban and cfd to effectively manage agile testing
Using kanban and cfd to effectively manage agile testing
 
Exploratory testing part 3
Exploratory testing part 3Exploratory testing part 3
Exploratory testing part 3
 
HTML5 and the future of the web (Dr. Seuss style)
HTML5 and the future of the web (Dr. Seuss style)HTML5 and the future of the web (Dr. Seuss style)
HTML5 and the future of the web (Dr. Seuss style)
 
Good Testers are Often Lucky
Good Testers are Often LuckyGood Testers are Often Lucky
Good Testers are Often Lucky
 
YUI The Elephant In The Room
YUI The Elephant In The RoomYUI The Elephant In The Room
YUI The Elephant In The Room
 
Boost SharePoint User Adoption Through DIY Usability Testing [workshop] Share...
Boost SharePoint User Adoption Through DIY Usability Testing [workshop] Share...Boost SharePoint User Adoption Through DIY Usability Testing [workshop] Share...
Boost SharePoint User Adoption Through DIY Usability Testing [workshop] Share...
 
Mobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B ExperimentsMobile App Feature Configuration and A/B Experiments
Mobile App Feature Configuration and A/B Experiments
 
SQL Phone Home: Teaching Your SQL Servers to Call for Help
SQL Phone Home: Teaching Your SQL Servers to Call for HelpSQL Phone Home: Teaching Your SQL Servers to Call for Help
SQL Phone Home: Teaching Your SQL Servers to Call for Help
 
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
 
Windy cityrails performance_tuning
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuning
 
Sundries solutions ou_aitp_4_27_11
Sundries solutions ou_aitp_4_27_11Sundries solutions ou_aitp_4_27_11
Sundries solutions ou_aitp_4_27_11
 
Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...
Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...
Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...
 
Data Driven DevOps
Data Driven DevOpsData Driven DevOps
Data Driven DevOps
 
How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)
 
Happy Programming with CoffeeScript
Happy Programming with CoffeeScriptHappy Programming with CoffeeScript
Happy Programming with CoffeeScript
 

Plus de Justin Halsall

Principles, Backbone and Bottlenose
Principles, Backbone and BottlenosePrinciples, Backbone and Bottlenose
Principles, Backbone and BottlenoseJustin Halsall
 
Vote Amsterdam For EuRuKo 2012
Vote Amsterdam For EuRuKo 2012Vote Amsterdam For EuRuKo 2012
Vote Amsterdam For EuRuKo 2012Justin Halsall
 
DSLs for Front End Rails
DSLs for Front End RailsDSLs for Front End Rails
DSLs for Front End RailsJustin Halsall
 

Plus de Justin Halsall (6)

Principles, Backbone and Bottlenose
Principles, Backbone and BottlenosePrinciples, Backbone and Bottlenose
Principles, Backbone and Bottlenose
 
Vote Amsterdam For EuRuKo 2012
Vote Amsterdam For EuRuKo 2012Vote Amsterdam For EuRuKo 2012
Vote Amsterdam For EuRuKo 2012
 
HTML5 semantics
HTML5 semanticsHTML5 semantics
HTML5 semantics
 
HTML5 offline
HTML5 offlineHTML5 offline
HTML5 offline
 
DSLs for Front End Rails
DSLs for Front End RailsDSLs for Front End Rails
DSLs for Front End Rails
 
Front End on Rails
Front End on RailsFront End on Rails
Front End on Rails
 

Dernier

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Dernier (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Headless browser testing with ruby