SlideShare une entreprise Scribd logo
1  sur  45
Francois Reynoud

   Selenium Grid
Less Selenium, more unit testing

          (With Jasmine)
          Dima Kovalenko
            @dimacus
What do you use for “in
  browser” testing?
Selenium has some issues

           
Selenium Issues
• Reliability / Stability
Stability
Selenium Stability Last 2 months
Selenium Stability Last 12 months
Selenium Issues
• Reliability / Stability
• Speed
Build Time – 400 Selenium on 3
   machines 6 parallel cores
Typical Selenium Flow
Typical Selenium Flow
Typical Selenium Flow
Typical Selenium Flow
Source: GIS
Why so slow?
•   Browser speed
•   JS speed
•   Machine speed
•   External URLs
Selenium Issues
• Reliability / Stability
• Speed
• Internet Explorer / Browser Compatibility
Internet Explorer




                    Source: GIS
Don’t use Selenium to test
       JavaScript!
  Use it to test application flow
              instead.
http://pivotal.github.com/jasmine/
Jasmine
• Reliability / Stability
Jasmine
• Reliability / Stability
• Browser Compatibility
Jasmine
• Reliability / Stability
• Browser Compatibility
• Speed
Build Time (3,500+ tests)
Jasmine is a BDD tool

(Behavior Driven Development)
What is BDD
In software engineering, behavior-driven development (abbreviated BDD) is a
software development process based on test-driven development (TDD).[1][2]
Behavior-driven development combines the general techniques and principles
of TDD with ideas from domain-driven design and object-oriented analysis and
design to provide software developers and business analysts with shared tools
        and a shared process to collaborate on software development.

                             Source: Wikipedia
BDD In the Nutshell

Write tests that describe application
                flow.
What BDD looks like

“Purchase flow should accept VISA”
Jasmine Test Sample
It’s Just Functions!
• “describe” “context” “it”…
• Can use any JS code to make a test work
Jasmine Features
•   Mocks / Spies
•   Fixtures
•   Matchers
•   Setup / Teardown
•   Asynchronous Support and Callbacks
Mocks / Spies
•   Double any function
•   Monitors the calls the function
•   Monitors the arguments passed in
•   Can create a “bare” spy
•   Mock the Clock
Fixtures
• Adding elements to page on the fly
Matchers
•   expect()
•   toEqual()
•   not()
•   toBeFalsy()
•   toThrow()
•   Custom matchers
Setup / Teardown
• beforeEach()
• afterEach()
Asynch support
• Using spies to verify Callbacks
• runs()
• waitsFor()
What it is written in
• HTML
• JavaScript
• Ruby
  – Rake
  – ERB
  – Rspec
Workflow in Ruby
•   Rake
•   ERB (Generate HTML)
•   Selenium
•   Tests in Loaded JS
•   Rspec
Environments supported

•   Ruby
•   Rails
•   Spider Monkey
•   Node
•   Scala
•   Java
•   Django
•   .Net
•   Perl
•   HTML
Installation
• gem install jasmine
• jasmine init
Questions?

Contenu connexe

Tendances

[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
Applitools
 
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
camp_drupal_ua
 
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
camp_drupal_ua
 
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Applitools
 

Tendances (20)

TestingAR XX - Protractor e2e Test Framework - Introduction what we have lear...
TestingAR XX - Protractor e2e Test Framework - Introduction what we have lear...TestingAR XX - Protractor e2e Test Framework - Introduction what we have lear...
TestingAR XX - Protractor e2e Test Framework - Introduction what we have lear...
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
 
TGT#13 - UI Tests Automation Framework in Evolve EDM – Case Study - Mateusz R...
TGT#13 - UI Tests Automation Framework in Evolve EDM – Case Study - Mateusz R...TGT#13 - UI Tests Automation Framework in Evolve EDM – Case Study - Mateusz R...
TGT#13 - UI Tests Automation Framework in Evolve EDM – Case Study - Mateusz R...
 
Protractor for angularJS
Protractor for angularJSProtractor for angularJS
Protractor for angularJS
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScript
 
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
 
Selenium Tips & Tricks
Selenium Tips & TricksSelenium Tips & Tricks
Selenium Tips & Tricks
 
Selenium ui paradigm - DDD North 2
Selenium ui paradigm - DDD North 2Selenium ui paradigm - DDD North 2
Selenium ui paradigm - DDD North 2
 
What kind testing DUG Vancouver
What kind testing DUG VancouverWhat kind testing DUG Vancouver
What kind testing DUG Vancouver
 
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
 
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015
 
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
 
Angular js automation using protractor
Angular js automation using protractorAngular js automation using protractor
Angular js automation using protractor
 
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automation
 
Запускаем тесты в Continuous Integration - Сергей Пак (JetBrains)
Запускаем тесты в Continuous Integration - Сергей Пак (JetBrains)Запускаем тесты в Continuous Integration - Сергей Пак (JetBrains)
Запускаем тесты в Continuous Integration - Сергей Пак (JetBrains)
 
Selenium + Specflow
Selenium + SpecflowSelenium + Specflow
Selenium + Specflow
 
Continuous Testing Meets the Classroom at Code.org
Continuous Testing Meets the Classroom at Code.orgContinuous Testing Meets the Classroom at Code.org
Continuous Testing Meets the Classroom at Code.org
 
Team Build in TFS - Introduction
Team Build in TFS - IntroductionTeam Build in TFS - Introduction
Team Build in TFS - Introduction
 

En vedette (11)

Beyonce: Fandom Case Study By Jasmine Madkins
Beyonce: Fandom Case Study By Jasmine MadkinsBeyonce: Fandom Case Study By Jasmine Madkins
Beyonce: Fandom Case Study By Jasmine Madkins
 
автоматизация Flex приложений с помощью selenium rc
автоматизация Flex приложений с помощью selenium rcавтоматизация Flex приложений с помощью selenium rc
автоматизация Flex приложений с помощью selenium rc
 
Повышаем надёжность тестов через JavaScript
Повышаем надёжность тестов через JavaScriptПовышаем надёжность тестов через JavaScript
Повышаем надёжность тестов через JavaScript
 
Типичные ошибки начинающих писать тесты на WebDriver
Типичные ошибки начинающих писать тесты на WebDriverТипичные ошибки начинающих писать тесты на WebDriver
Типичные ошибки начинающих писать тесты на WebDriver
 
Tuberose
TuberoseTuberose
Tuberose
 
JASMINE
JASMINEJASMINE
JASMINE
 
Uses of plants & trees
Uses of plants & treesUses of plants & trees
Uses of plants & trees
 
10 Ways We Use Plants
10 Ways We Use Plants10 Ways We Use Plants
10 Ways We Use Plants
 
Jasmine
JasmineJasmine
Jasmine
 
99 Tamil Flowers
99 Tamil Flowers99 Tamil Flowers
99 Tamil Flowers
 
Jasmin Flower
Jasmin FlowerJasmin Flower
Jasmin Flower
 

Similaire à Jasmine presentation Selenium Camp 2013

How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
Dave Haeffner
 

Similaire à Jasmine presentation Selenium Camp 2013 (20)

33rd degree
33rd degree33rd degree
33rd degree
 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014
 
Automated ui-testing
Automated ui-testingAutomated ui-testing
Automated ui-testing
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
 
Quick start with AngularJS
Quick start with AngularJSQuick start with AngularJS
Quick start with AngularJS
 
Growing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI FrameworksGrowing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI Frameworks
 
MyHeritage - End 2 End testing Infra
MyHeritage - End 2 End testing InfraMyHeritage - End 2 End testing Infra
MyHeritage - End 2 End testing Infra
 
Groovy & Grails - From Scratch to Production
Groovy & Grails - From Scratch to Production Groovy & Grails - From Scratch to Production
Groovy & Grails - From Scratch to Production
 
Selenium for everyone
Selenium for everyoneSelenium for everyone
Selenium for everyone
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
Testing course content converted
Testing course content convertedTesting course content converted
Testing course content converted
 
Selenium Classroom Training
Selenium Classroom TrainingSelenium Classroom Training
Selenium Classroom Training
 
QA Challenge Accepted 4.0 - Cypress vs. Selenium
QA Challenge Accepted 4.0 - Cypress vs. SeleniumQA Challenge Accepted 4.0 - Cypress vs. Selenium
QA Challenge Accepted 4.0 - Cypress vs. Selenium
 
Ast in CI/CD by Ofer Maor
Ast in CI/CD by Ofer MaorAst in CI/CD by Ofer Maor
Ast in CI/CD by Ofer Maor
 
Web Automation Testing for developers?
Web Automation Testing for developers?Web Automation Testing for developers?
Web Automation Testing for developers?
 
we45 DEFCON Workshop - Building AppSec Automation with Python
we45 DEFCON Workshop - Building AppSec Automation with Pythonwe45 DEFCON Workshop - Building AppSec Automation with Python
we45 DEFCON Workshop - Building AppSec Automation with Python
 
MyHeritage - QA Automations in a Continuous Deployment environment
MyHeritage -  QA Automations in a Continuous Deployment environmentMyHeritage -  QA Automations in a Continuous Deployment environment
MyHeritage - QA Automations in a Continuous Deployment environment
 
Selenium Tips & Tricks - StarWest 2015
Selenium Tips & Tricks - StarWest 2015Selenium Tips & Tricks - StarWest 2015
Selenium Tips & Tricks - StarWest 2015
 
Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012
 
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
DSL, Page Object и WebDriver – путь к надежным функциональным тестамDSL, Page Object и WebDriver – путь к надежным функциональным тестам
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
 

Plus de dimakovalenko (8)

Scaling and Managing Selenium Grid
Scaling and Managing Selenium GridScaling and Managing Selenium Grid
Scaling and Managing Selenium Grid
 
Managing Large Selenium Grid
Managing Large Selenium Grid�Managing Large Selenium Grid�
Managing Large Selenium Grid
 
Selenium Conf 2013 Lightning Talk - Any-Branch
Selenium Conf 2013 Lightning Talk - Any-BranchSelenium Conf 2013 Lightning Talk - Any-Branch
Selenium Conf 2013 Lightning Talk - Any-Branch
 
Stabilizing SE Build - Selenium conf 2013
Stabilizing SE Build - Selenium conf 2013 Stabilizing SE Build - Selenium conf 2013
Stabilizing SE Build - Selenium conf 2013
 
Selenium camp v1
Selenium camp v1Selenium camp v1
Selenium camp v1
 
Cucumber Presentation Kiev Meet Up
Cucumber Presentation Kiev Meet UpCucumber Presentation Kiev Meet Up
Cucumber Presentation Kiev Meet Up
 
Evergreen build
Evergreen buildEvergreen build
Evergreen build
 
Selenium and Cucumber Selenium Conf 2011
Selenium and Cucumber Selenium Conf 2011Selenium and Cucumber Selenium Conf 2011
Selenium and Cucumber Selenium Conf 2011
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Dernier (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 

Jasmine presentation Selenium Camp 2013