SlideShare a Scribd company logo
2
Most read
8
Most read
9
Most read
Testing with Jenkins, Selenium and
      Continuous Deployment
           Max Klymyshyn
              oDesk PS

           Twitter: @maxmaxmaxmax
                  Github: joymax
The problem
We need to run our tests periodically
Tests execution take a lot of time, it’s not an option to run on
integrator’s machine all the time
We want to run our Selenium tests on separated branches
We don’t have persistent Selenium Grid nodes
Blah blah, the CI problem...
The solution

Jenkins as Continuous Integration tool
Selenium Grid + Tests execution service with Amazon AWS
instances on-demand
Deployment tool which can deploy any version of the code
within isolated environment
TOC
Jenkins configuration
Selenium Grid and Amazon AWS architecture
Deployment tool with Fabric, Gunicorn, Nginx (+ Celery,
Redis and Solr)
Shortcuts for developers
A bit about libraries development
Stack
Flask
Mongo
Solr
Redis
Celery
Jenkins

Coverage
Tests results trend (junit reports)
JSLint
Pylint
Tests execution

unit, integration, consistency tests with Nose
Lettuce for forms and overall site UX
JavaScript tests with Rhino and Flask-Jasmine
Selenium UI tests
Selenium Tests
 Execute tests

 Start selenium node(s) with
 requested browser(s)

 Execute selenium tests

 Shutdown node
Selenium Tests and Jenkins
 Headless tests (pass)


 Deploy current commit

 Execute selenium tests

 Destroy deployed commit
on-demand selenium nodes
Tests runner      IE9 / Win

                  IE8 / Win

                   IE7 / Win
Service            FF / Win

                    Chrome / Win

                     FF / Linux
Selenium Grid 2      Chrome / Linux
Selenium tests during dev

Developer execute tests with specific browser
It’s not necessary to have browser
It’s possible to debug tests with IPDB
It’s possible to see what’s going on on remove node using
Selenium Node admin or making screenshots
Tests runner configuration

 [runner]
api_key=XXXXXXXXX
nose_args=-v
nose_single_test_args=-vc
selenium_host=http://s.sample.com/wd/hub
rpc_host=http://rpc.s.sample.com
Browsers configuration
    [internetexplorer-9]
name=internetexplorer
version=9
platform=WINDOWS

[internetexplorer-7]
name=internetexplorer
version=7
platform=WINDOWS
Tests execution
     # Execute selenium tests in all
     browsers
uitestrunner -c browsers.cfg -a

# Execute synchronously in IE9 (+IPDB)
uitestrunner -c browsers.cfg -s -b
internetexplorer-9

# Execute one test
$ uitestrunner -c browsers.cfg 
-b internetexplorer-9 -t
Deployment tool FTW
Get commit or branch      Create virtualenv


Add Solr core             install requirements

Create mongo DB           gunicorn by template

Generate local_settings   celery by template

start services            nginx by template
The flow for developers
The problem:
   QA engineer should check quality of each issue/branch
   Developer should provide “live” url to its branch
Solution:
   Deploy specific branch
   Provide URL to it to QA engineer
Shortcuts for developers

Execute shortcuts in working branch:
doit deploy
doit destroy
doit restart
doit cleanup_build
Summary

Easy-to-demonstrate new changes
Easy to QA
All team members informed about status
Questions?

More Related Content

PPTX
Automation Testing by Selenium Web Driver
PDF
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
PPTX
Test automation proposal
PPTX
An overview of selenium webdriver
PPT
QSpiders - Automation using Selenium
PPTX
Selenium IDE
PPTX
Katalon Studio Presentation.pptx
PPTX
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Automation Testing by Selenium Web Driver
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
Test automation proposal
An overview of selenium webdriver
QSpiders - Automation using Selenium
Selenium IDE
Katalon Studio Presentation.pptx
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...

What's hot (20)

PPTX
Introduction to selenium
PPTX
Selenium test automation
ODP
Selenium ppt
DOCX
Katalon studio vs selenium comparision
PPTX
TestNG Framework
PPTX
Data driven Automation Framework with Selenium
PPTX
android sqlite
PPTX
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
PDF
Selenium
PPT
Selenium Concepts
PPT
Selenium Presentation at Engineering Colleges
PDF
Selenium Maven With Eclipse | Edureka
PPTX
Kubernetes Selenium Grid
PPTX
Test automation using selenium
PPTX
Automated testing using Selenium & NUnit
PPTX
ReactJS presentation.pptx
PPTX
Selenium WebDriver
PDF
Handle Exceptions in Selenium Webdriver | Edureka
PPTX
Selenium
DOCX
Selenium Testing Project report
Introduction to selenium
Selenium test automation
Selenium ppt
Katalon studio vs selenium comparision
TestNG Framework
Data driven Automation Framework with Selenium
android sqlite
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Selenium
Selenium Concepts
Selenium Presentation at Engineering Colleges
Selenium Maven With Eclipse | Edureka
Kubernetes Selenium Grid
Test automation using selenium
Automated testing using Selenium & NUnit
ReactJS presentation.pptx
Selenium WebDriver
Handle Exceptions in Selenium Webdriver | Edureka
Selenium
Selenium Testing Project report
Ad

Viewers also liked (20)

PDF
Jenkins & Selenium
PPTX
Smarter ways to do selenium automation @ work, Selenium, automation
PPTX
Genymotion with Jenkins
PPTX
Using Selenium and Cucumber to test a Healthcare Information System
PPTX
Wix automation
PDF
Metrics to guide: agile fluency, continuous delivery and product teams
PPTX
MyHeritage - End 2 End testing Infra
PDF
Continous UI testing with Espresso and Jenkins
PDF
RightScale Webinar: Continuous Integration and Delivery in the Cloud - How Ri...
PPTX
Mobile WebDriver Selendroid
PDF
Writing multi-language documentation using Sphinx
PDF
Continuous Integration Testing in Django
PPT
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
PPTX
Build mobile application that is easy to automate
PPTX
Sphinx + robot framework = documentation as result of functional testing
PDF
The road to continuous deployment (PHPCon Poland 2016)
PDF
Jenkins automation
PPTX
Agile scrum roles
PDF
Yale Jenkins Show and Tell
PDF
Automation Testing using Selenium
Jenkins & Selenium
Smarter ways to do selenium automation @ work, Selenium, automation
Genymotion with Jenkins
Using Selenium and Cucumber to test a Healthcare Information System
Wix automation
Metrics to guide: agile fluency, continuous delivery and product teams
MyHeritage - End 2 End testing Infra
Continous UI testing with Espresso and Jenkins
RightScale Webinar: Continuous Integration and Delivery in the Cloud - How Ri...
Mobile WebDriver Selendroid
Writing multi-language documentation using Sphinx
Continuous Integration Testing in Django
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
Build mobile application that is easy to automate
Sphinx + robot framework = documentation as result of functional testing
The road to continuous deployment (PHPCon Poland 2016)
Jenkins automation
Agile scrum roles
Yale Jenkins Show and Tell
Automation Testing using Selenium
Ad

Similar to Testing with Jenkins, Selenium and Continuous Deployment (20)

PPT
Selenium2 and Jenkins: Almost pain-free UI Testing
PPTX
Jenkins presentation
PPTX
Kubernetes your tests! automation with docker on google cloud platform
PPTX
PDF
QA Fest 2017. Иван Крутов. Selenoid: запускаем Selenium тесты в Docker контей...
PDF
Selenoid: browsers in containers
PPTX
Docker–Grid (A On demand and Scalable dockerized selenium grid architecture)
DOC
PPTX
Jenkins days workshop pipelines - Eric Long
PPTX
Automated Testing using JavaScript
ODP
Automated UI testing with Selenium
ODP
Mastering selenium for automated acceptance tests
PPT
Selenium (1)
PDF
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
PPTX
Selenium – testing tool jack
PDF
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
DOCX
Best Selenium Online Training
PPTX
Automated testing with Drupal
PPSX
Selenium - Introduction
PPTX
Selenium - Introduction
Selenium2 and Jenkins: Almost pain-free UI Testing
Jenkins presentation
Kubernetes your tests! automation with docker on google cloud platform
QA Fest 2017. Иван Крутов. Selenoid: запускаем Selenium тесты в Docker контей...
Selenoid: browsers in containers
Docker–Grid (A On demand and Scalable dockerized selenium grid architecture)
Jenkins days workshop pipelines - Eric Long
Automated Testing using JavaScript
Automated UI testing with Selenium
Mastering selenium for automated acceptance tests
Selenium (1)
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Selenium – testing tool jack
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Best Selenium Online Training
Automated testing with Drupal
Selenium - Introduction
Selenium - Introduction

More from Max Klymyshyn (20)

PDF
Papers We Love Kyiv, July 2018: A Conflict-Free Replicated JSON Datatype
PDF
KharkivJS 2017: Коллаборативные системы и CRDT
PDF
OdessaJS 2017: Groupware Systems for fun and profit
PDF
PyCon Ukraine 2017: Operational Transformation
PDF
Communicating Sequential Processes (CSP) in JavaScript
PDF
PiterPy 2016: Parallelization, Aggregation and Validation of API in Python
PDF
Fighting async JavaScript (CSP)
PDF
React.js: Ускоряем UX/UI
PDF
KharkovPy #12: I/O in Python apps and smart logging (russian)
PDF
5 мифов о производительности баз данных и Python
PDF
Изоформные приложения на React.js
PDF
Изоморфный JavaScript (iForum 2015)
PDF
Трансдюсеры, CSP каналы, неизменяемые структуры данных в JavaScript
PDF
PiterPy 2015 - Трансдюсеры и Python
PDF
Robust web apps with React.js
PDF
LvivJS 2014 - Win-win c React.js
PDF
Инновации и JavaScript
PDF
Odessapy2013 - Graph databases and Python
PDF
Angular.js - JS Camp UKraine 2013
PPT
Зачем читать чужой код?
Papers We Love Kyiv, July 2018: A Conflict-Free Replicated JSON Datatype
KharkivJS 2017: Коллаборативные системы и CRDT
OdessaJS 2017: Groupware Systems for fun and profit
PyCon Ukraine 2017: Operational Transformation
Communicating Sequential Processes (CSP) in JavaScript
PiterPy 2016: Parallelization, Aggregation and Validation of API in Python
Fighting async JavaScript (CSP)
React.js: Ускоряем UX/UI
KharkovPy #12: I/O in Python apps and smart logging (russian)
5 мифов о производительности баз данных и Python
Изоформные приложения на React.js
Изоморфный JavaScript (iForum 2015)
Трансдюсеры, CSP каналы, неизменяемые структуры данных в JavaScript
PiterPy 2015 - Трансдюсеры и Python
Robust web apps with React.js
LvivJS 2014 - Win-win c React.js
Инновации и JavaScript
Odessapy2013 - Graph databases and Python
Angular.js - JS Camp UKraine 2013
Зачем читать чужой код?

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Modernizing your data center with Dell and AMD
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
KodekX | Application Modernization Development
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation theory and applications.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Electronic commerce courselecture one. Pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Approach and Philosophy of On baking technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Modernizing your data center with Dell and AMD
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
The AUB Centre for AI in Media Proposal.docx
KodekX | Application Modernization Development
NewMind AI Monthly Chronicles - July 2025
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation theory and applications.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Digital-Transformation-Roadmap-for-Companies.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Reach Out and Touch Someone: Haptics and Empathic Computing
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
CIFDAQ's Market Insight: SEC Turns Pro Crypto

Testing with Jenkins, Selenium and Continuous Deployment

  • 1. Testing with Jenkins, Selenium and Continuous Deployment Max Klymyshyn oDesk PS Twitter: @maxmaxmaxmax Github: joymax
  • 2. The problem We need to run our tests periodically Tests execution take a lot of time, it’s not an option to run on integrator’s machine all the time We want to run our Selenium tests on separated branches We don’t have persistent Selenium Grid nodes Blah blah, the CI problem...
  • 3. The solution Jenkins as Continuous Integration tool Selenium Grid + Tests execution service with Amazon AWS instances on-demand Deployment tool which can deploy any version of the code within isolated environment
  • 4. TOC Jenkins configuration Selenium Grid and Amazon AWS architecture Deployment tool with Fabric, Gunicorn, Nginx (+ Celery, Redis and Solr) Shortcuts for developers A bit about libraries development
  • 6. Jenkins Coverage Tests results trend (junit reports) JSLint Pylint
  • 7. Tests execution unit, integration, consistency tests with Nose Lettuce for forms and overall site UX JavaScript tests with Rhino and Flask-Jasmine Selenium UI tests
  • 8. Selenium Tests Execute tests Start selenium node(s) with requested browser(s) Execute selenium tests Shutdown node
  • 9. Selenium Tests and Jenkins Headless tests (pass) Deploy current commit Execute selenium tests Destroy deployed commit
  • 10. on-demand selenium nodes Tests runner IE9 / Win IE8 / Win IE7 / Win Service FF / Win Chrome / Win FF / Linux Selenium Grid 2 Chrome / Linux
  • 11. Selenium tests during dev Developer execute tests with specific browser It’s not necessary to have browser It’s possible to debug tests with IPDB It’s possible to see what’s going on on remove node using Selenium Node admin or making screenshots
  • 12. Tests runner configuration [runner] api_key=XXXXXXXXX nose_args=-v nose_single_test_args=-vc selenium_host=http://s.sample.com/wd/hub rpc_host=http://rpc.s.sample.com
  • 13. Browsers configuration [internetexplorer-9] name=internetexplorer version=9 platform=WINDOWS [internetexplorer-7] name=internetexplorer version=7 platform=WINDOWS
  • 14. Tests execution # Execute selenium tests in all browsers uitestrunner -c browsers.cfg -a # Execute synchronously in IE9 (+IPDB) uitestrunner -c browsers.cfg -s -b internetexplorer-9 # Execute one test $ uitestrunner -c browsers.cfg -b internetexplorer-9 -t
  • 15. Deployment tool FTW Get commit or branch Create virtualenv Add Solr core install requirements Create mongo DB gunicorn by template Generate local_settings celery by template start services nginx by template
  • 16. The flow for developers The problem: QA engineer should check quality of each issue/branch Developer should provide “live” url to its branch Solution: Deploy specific branch Provide URL to it to QA engineer
  • 17. Shortcuts for developers Execute shortcuts in working branch: doit deploy doit destroy doit restart doit cleanup_build
  • 18. Summary Easy-to-demonstrate new changes Easy to QA All team members informed about status

Editor's Notes