selenium in the life of day-to-day testing. practical aspects

41
Selenium in the life of day-to-day testing. Practical aspects. Ruslan Strazhnyk February 2012

Upload: ruslan-strazhnyk

Post on 31-Dec-2015

27 views

Category:

Documents


8 download

DESCRIPTION

About usage Selenium toolkit in QA projects, integration.Another part of this presentation describes approaches how to use Selenium with Load-testing tools.

TRANSCRIPT

Page 1: Selenium in the life of day-to-day testing. Practical aspects

Selenium in the life of day-to-day testing. Practical aspects.

Ruslan StrazhnykFebruary 2012

Page 2: Selenium in the life of day-to-day testing. Practical aspects

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

Page 3: Selenium in the life of day-to-day testing. Practical aspects

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

Page 4: Selenium in the life of day-to-day testing. Practical aspects
Page 5: Selenium in the life of day-to-day testing. Practical aspects

Part 1

Using selenium for functional testing in continuous integration.

Page 6: Selenium in the life of day-to-day testing. Practical aspects

How QA always like

Well, maybe not always

Page 7: Selenium in the life of day-to-day testing. Practical aspects

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

Page 8: Selenium in the life of day-to-day testing. Practical aspects

Customer satisfaction

Page 9: Selenium in the life of day-to-day testing. Practical aspects

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

Page 10: Selenium in the life of day-to-day testing. Practical aspects

Custom Job

Page 11: Selenium in the life of day-to-day testing. Practical aspects

Using Jenkins

Page 12: Selenium in the life of day-to-day testing. Practical aspects

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

Page 13: Selenium in the life of day-to-day testing. Practical aspects

Want to know more? Refer to book!

Page 14: Selenium in the life of day-to-day testing. Practical aspects

Selenium Grid

Page 15: Selenium in the life of day-to-day testing. Practical aspects

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

Page 16: Selenium in the life of day-to-day testing. Practical aspects

New Selenium Grid

Page 17: Selenium in the life of day-to-day testing. Practical aspects

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

Page 18: Selenium in the life of day-to-day testing. Practical aspects

Tune-up

Page 19: Selenium in the life of day-to-day testing. Practical aspects

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

Page 20: Selenium in the life of day-to-day testing. Practical aspects

Browser support

Page 21: Selenium in the life of day-to-day testing. Practical aspects

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

Page 22: Selenium in the life of day-to-day testing. Practical aspects

Universal Framework

Page 23: Selenium in the life of day-to-day testing. Practical aspects

Nosetests as a universal xUnit framework

• Features– Unitest plugin support– Short commands– Junit result output

• Plugins– Include third-party plugins– Testconfig

Page 24: Selenium in the life of day-to-day testing. Practical aspects

Result of in-house testing

Page 25: Selenium in the life of day-to-day testing. Practical aspects

Part 2

Selenium in the cloud. Integration with BrowserMob, SauceLabs,

ShiningPanda, AmazonEC2

Page 26: Selenium in the life of day-to-day testing. Practical aspects

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.

Page 27: Selenium in the life of day-to-day testing. Practical aspects

Cloud Providers

Page 28: Selenium in the life of day-to-day testing. Practical aspects

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

Page 29: Selenium in the life of day-to-day testing. Practical aspects

Load Testing

Page 30: Selenium in the life of day-to-day testing. Practical aspects

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

Page 31: Selenium in the life of day-to-day testing. Practical aspects

Computing power

Page 32: Selenium in the life of day-to-day testing. Practical aspects

Load Testing with BrowserMob

Page 33: Selenium in the life of day-to-day testing. Practical aspects

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

Page 34: Selenium in the life of day-to-day testing. Practical aspects

SauceOnDemand

Page 35: Selenium in the life of day-to-day testing. Practical aspects

Shining Panda

Page 36: Selenium in the life of day-to-day testing. Practical aspects

Is it Really Fast?

Page 37: Selenium in the life of day-to-day testing. Practical aspects

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

Page 38: Selenium in the life of day-to-day testing. Practical aspects

DIY Instrument Kit

Page 39: Selenium in the life of day-to-day testing. Practical aspects

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

Page 40: Selenium in the life of day-to-day testing. Practical aspects
Page 41: Selenium in the life of day-to-day testing. Practical aspects

Questions? Ideas?

My contact info: ua.linkedin.com/in/ruslanstraznhyk

twitter.com/strazhnyk ruslanstrazhnyk

[email protected]

http://www.maven.co/join/TUHvWu8K