Testing with Jenkins, Selenium and      Continuous Deployment           Max Klymyshyn              oDesk PS           Twit...
The problemWe need to run our tests periodicallyTests execution take a lot of time, it’s not an option to run onintegrator...
The solutionJenkins as Continuous Integration toolSelenium Grid + Tests execution service with Amazon AWSinstances on-dema...
TOCJenkins configurationSelenium Grid and Amazon AWS architectureDeployment tool with Fabric, Gunicorn, Nginx (+ Celery,Red...
StackFlaskMongoSolrRedisCelery
JenkinsCoverageTests results trend (junit reports)JSLintPylint
Tests executionunit, integration, consistency tests with NoseLettuce for forms and overall site UXJavaScript tests with Rh...
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 nodesTests runner      IE9 / Win                  IE8 / Win                   IE7 / WinService         ...
Selenium tests during devDeveloper execute tests with specific browserIt’s not necessary to have browserIt’s possible to de...
Tests runner configuration [runner]api_key=XXXXXXXXXnose_args=-vnose_single_test_args=-vcselenium_host=http://s.sample.com/...
Browsers configuration    [internetexplorer-9]name=internetexplorerversion=9platform=WINDOWS[internetexplorer-7]name=intern...
Tests execution     # Execute selenium tests in all     browsersuitestrunner -c browsers.cfg -a# Execute synchronously in ...
Deployment tool FTWGet commit or branch      Create virtualenvAdd Solr core             install requirementsCreate mongo D...
The flow for developersThe problem:   QA engineer should check quality of each issue/branch   Developer should provide “liv...
Shortcuts for developersExecute shortcuts in working branch:doit deploydoit destroydoit restartdoit cleanup_build
SummaryEasy-to-demonstrate new changesEasy to QAAll team members informed about status
Questions?
Upcoming SlideShare
Loading in...5
×

Testing with Jenkins, Selenium and Continuous Deployment

16,034

Published on

My talk about testing at KharkivPy#4

Published in: Technology, Education
0 Comments
20 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
16,034
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
258
Comments
0
Likes
20
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Testing with Jenkins, Selenium and Continuous Deployment

    1. 1. Testing with Jenkins, Selenium and Continuous Deployment Max Klymyshyn oDesk PS Twitter: @maxmaxmaxmax Github: joymax
    2. 2. The problemWe need to run our tests periodicallyTests execution take a lot of time, it’s not an option to run onintegrator’s machine all the timeWe want to run our Selenium tests on separated branchesWe don’t have persistent Selenium Grid nodesBlah blah, the CI problem...
    3. 3. The solutionJenkins as Continuous Integration toolSelenium Grid + Tests execution service with Amazon AWSinstances on-demandDeployment tool which can deploy any version of the codewithin isolated environment
    4. 4. TOCJenkins configurationSelenium Grid and Amazon AWS architectureDeployment tool with Fabric, Gunicorn, Nginx (+ Celery,Redis and Solr)Shortcuts for developersA bit about libraries development
    5. 5. StackFlaskMongoSolrRedisCelery
    6. 6. JenkinsCoverageTests results trend (junit reports)JSLintPylint
    7. 7. Tests executionunit, integration, consistency tests with NoseLettuce for forms and overall site UXJavaScript tests with Rhino and Flask-JasmineSelenium UI tests
    8. 8. Selenium Tests Execute tests Start selenium node(s) with requested browser(s) Execute selenium tests Shutdown node
    9. 9. Selenium Tests and Jenkins Headless tests (pass) Deploy current commit Execute selenium tests Destroy deployed commit
    10. 10. on-demand selenium nodesTests runner IE9 / Win IE8 / Win IE7 / WinService FF / Win Chrome / Win FF / LinuxSelenium Grid 2 Chrome / Linux
    11. 11. Selenium tests during devDeveloper execute tests with specific browserIt’s not necessary to have browserIt’s possible to debug tests with IPDBIt’s possible to see what’s going on on remove node usingSelenium Node admin or making screenshots
    12. 12. Tests runner configuration [runner]api_key=XXXXXXXXXnose_args=-vnose_single_test_args=-vcselenium_host=http://s.sample.com/wd/hubrpc_host=http://rpc.s.sample.com
    13. 13. Browsers configuration [internetexplorer-9]name=internetexplorerversion=9platform=WINDOWS[internetexplorer-7]name=internetexplorerversion=7platform=WINDOWS
    14. 14. Tests execution # Execute selenium tests in all browsersuitestrunner -c browsers.cfg -a# Execute synchronously in IE9 (+IPDB)uitestrunner -c browsers.cfg -s -binternetexplorer-9# Execute one test$ uitestrunner -c browsers.cfg -b internetexplorer-9 -t
    15. 15. Deployment tool FTWGet commit or branch Create virtualenvAdd Solr core install requirementsCreate mongo DB gunicorn by templateGenerate local_settings celery by templatestart services nginx by template
    16. 16. The flow for developersThe problem: QA engineer should check quality of each issue/branch Developer should provide “live” url to its branchSolution: Deploy specific branch Provide URL to it to QA engineer
    17. 17. Shortcuts for developersExecute shortcuts in working branch:doit deploydoit destroydoit restartdoit cleanup_build
    18. 18. SummaryEasy-to-demonstrate new changesEasy to QAAll team members informed about status
    19. 19. Questions?
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×