Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Selenium practical


Published on

Selenium in the life of day-to-day testing. Practical aspects.
Selenium Camp 2012, February. Kyiv

Published in: Technology
  • Be the first to comment

Selenium practical

  1. 1. Selenium in the life of day-to-day testing. Practical aspects. Ruslan Strazhnyk February 2012
  2. 2. About meRuslan Strazhnyk • Experience – more than 6 years in IT • Position: – QA Automation Engineer • Skills: – Python, Selenium, Jenkins – Jmeter, Cloud Services
  3. 3. Agenda• Part1 – Selenium Grid and Jenkins – xUnit frameworks – Issues with some browsers• Part2 – Selenium in the cloud. Integration with various cloud services – Build your own infrastructure in the cloud
  4. 4. Part 1Using selenium for functional testing in continuous integration.
  5. 5. How QA always like Well, maybe not always
  6. 6. Introduction. How do we QA?• What do we always have: – QA mess on the project – How to support all specifications – Team coordination?!• What do we want to achieve: – Results visibility – Better cooperation – Customer satisfaction
  7. 7. Customer satisfaction
  8. 8. Selenium Grid and Jenkins plugin.• What is Continuous Integration• Role of Selenium Grid in CI• Jenkins Selenium plugin• Other plugins that should help: – Test Report (xUnit) – Violations, TestCoverage – Rebuild – Extended choice plugin – Repository connectors
  9. 9. Custom Job
  10. 10. Using Jenkins
  11. 11. How can Jenkins serve you• What it helps and what it doesn’t• Create as many jobs as needed• CI for you project is not only test automation• Has a lot of really useful plugins and features• Let your all team work on it, not only you
  12. 12. Want to know more? Refer to book!
  13. 13. Selenium Grid
  14. 14. Jenkins Selenium Plugin Pros Cons• Almost as built-in. Easy to • Manual update to new install and track Selenium Server through• Console output workaround• All in one • No control
  15. 15. New Selenium Grid
  16. 16. Nodes tune-up• How to add multiple OS/ browser version support• Different run-scripts for every browser – Firefox profile template – Googlechrome driver – Iexplore security issues• Autostart tasks• VM environment
  17. 17. Tune-up
  18. 18. Configuration hintsjava -jar C:/Selenium/selenium-server-standalone-2.19.0.jar -role webdriver -hub -port 5555 -nodeTimeout 1200 - firefoxProfileTemplate "C:/selenium/firefox/ilki8ovl.selenium" -browser browserName=firefox,version=10,platform=WINDOWSjava -jar C:/Selenium/selenium-server-standalone-2.19.0.jar -role webdriver -"C:/selenium/chromedriver.exe" -hub -port 5559 -nodeTimeout 1200 -browser browserName=chrome,platform=WINDOWS
  19. 19. Browser support
  20. 20. Potential Browser problems• It all suck, no ONE FITS ALL solution – Better to do it one by one – Start with easier• Windows is Windows – Different CSS and XPATH – Slow performance• SSL support• Proxy support• Let you control the browser not browser control you
  21. 21. Universal Framework
  22. 22. Nosetests as a universal xUnit framework• Features – Unitestplugin support – Short commands – Junit result output• Plugins – Include third-party plugins – Testconfig
  23. 23. Result of in-house testing
  24. 24. Part 2Selenium in the cloud. Integration with BrowserMob, SauceLabs, ShiningPanda, AmazonEC2
  25. 25. How could cloud testing help your project. When to turn cloud.• When you need cloud services: – Everybody needs unless you’re not Facebook, Google, Cisco – Having own cluster base is expensive – You have a start-up and your team is remote – You want to quickly show results to customers, investors etc.
  26. 26. Cloud Providers
  27. 27. Semi-paid and semi-free services.• A lot of services grow up recently: – Saas services – Cloud hosting(Amazon, Rackspace)• You are the boss, you choose: – Strong tech skills and you want full control – Rackspace, Amazon EC2 – Less skills to admin – Sauce Labs, BrowserMob, others
  28. 28. Load Testing
  29. 29. Traditional Load Testing Pros Cons• Everything is configurable to • Takes weeks to build good yourself working test infrastructure• A lot of Free tools (Jmeter, • A lot of computer power is Grinder etc.) required to run really good load tests
  30. 30. Computing power
  31. 31. Load Testing with BrowserMob
  32. 32. Ready cloud services Pros Cons• Already includes all services you only start thinking of • Non-free use• Video capturing and good • Dependency on the service error parsing provider• Easy API
  33. 33. SauceOnDemand
  34. 34. Shining Panda
  35. 35. Is it Really Fast?
  36. 36. Do it yourself. Dedicated Cloud• When you need something done right, do it yourself• Traditional way of using cloud - PaaS• A lot of providers, most of them have good pricing: – Rackspace Cloud Servers – Amazon Web Services – Joyent – GoGrid – SkytapNetworks
  37. 37. DIY Instrument Kit
  38. 38. Do it yourself. Dedicated Cloud Pros Cons• Everything is configurable to • Takes a lot of time to build yourself good working test• You pay only for monthly infrastructure hosting • Harder support• You can switch to cloud • Needs smart Developers in from your local-built Test to design frameworks environment
  39. 39. Cloud servicesSelenium Jenkins CI Grid Ideal QA Environment Multiple xUnit browser/OS Framework support
  40. 40. Questions? Ideas? My contact