Selenium in the life of day-to-day testing. Practical aspects.
Ruslan StrazhnykFebruary 2012
About me
Ruslan Strazhnyk • Experience – more than 6 years in IT• Position:– QA Automation Engineer
• Skills:– Python, Selenium, Jenkins– Jmeter, Cloud Services
www.maven.co
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
Part 1
Using selenium for functional testing in continuous integration.
How QA always like
Well, maybe not always
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
Customer satisfaction
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
Custom Job
Using Jenkins
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
Want to know more? Refer to book!
Selenium Grid
Jenkins Selenium Plugin
Pros
• Almost as built-in. Easy to install and track
• Console output• All in one
Cons
• Manual update to new Selenium Server through workaround
• No control
New Selenium Grid
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
Tune-up
Configuration hintsjava -jar C:/Selenium/selenium-server-standalone-2.19.0.jar -role webdriver -hub
http://192.168.1.33:4444/grid/register -port 5555 -nodeTimeout 1200 -firefoxProfileTemplate "C:/selenium/firefox/ilki8ovl.selenium" -browser browserName=firefox,version=10,platform=WINDOWS
java -jar C:/Selenium/selenium-server-standalone-2.19.0.jar -role webdriver -Dwebdriver.chrome.driver="C:/selenium/chromedriver.exe" -hub http://192.168.1.33:4444/grid/register -port 5559 -nodeTimeout 1200 -browser browserName=chrome,platform=WINDOWS
Browser support
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
Universal Framework
Nosetests as a universal xUnit framework
• Features– Unitest plugin support– Short commands– Junit result output
• Plugins– Include third-party plugins– Testconfig
Result of in-house testing
Part 2
Selenium in the cloud. Integration with BrowserMob, SauceLabs,
ShiningPanda, AmazonEC2
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.
Cloud Providers
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
Load Testing
Traditional Load Testing
Pros• Everything is configurable to
yourself• A lot of Free tools (Jmeter,
Grinder etc.)
Cons• Takes weeks to build good
working test infrastructure• A lot of computer power is
required to run really good load tests
Computing power
Load Testing with BrowserMob
Ready cloud services
Pros• Already includes all services
you only start thinking of• Video capturing and good
error parsing• Easy API
Cons
• Non-free use• Dependency on the service
provider
SauceOnDemand
Shining Panda
Is it Really Fast?
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– Skytap Networks
DIY Instrument Kit
Do it yourself. Dedicated Cloud
Pros• Everything is configurable to
yourself• You pay only for monthly
hosting• You can switch to cloud
from your local-built environment
Cons• Takes a lot of time to build
good working test infrastructure
• Harder support• Needs smart Developers in
Test to design frameworks
Questions? Ideas?
My contact info: ua.linkedin.com/in/ruslanstraznhyk
twitter.com/strazhnyk ruslanstrazhnyk
http://www.maven.co/join/TUHvWu8K