34
SELENIUM THE CURE FOR MERCURY POISONING MICHAEL PALOTAS – HEAD OF QUALITY ENGINEERING EUROPE OCTOBER 24 2012

SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

Embed Size (px)

Citation preview

Page 1: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

SELENIUM THE CURE FOR MERCURY POISONING

MICHAEL PALOTAS – HEAD OF QUALITY ENGINEERING EUROPE OCTOBER 24 2012

Page 2: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

EBAY INC. FACTS

•  Founded in 1995

•  Based in San Jose, California

•  28000 employees worldwide

•  >100 million active buyers and sellers worldwide

•  68 Billion USD transaction volume in 2011

•  2000 USD transaction volume every second

•  >100 million downloads of eBay Inc’s mobile apps

•  Mobile transaction volume will double in 2012 to 10 billion USD

•  1.7 million items listed via mobile apps every week

•  >10 Petabytes of data in Hadoop and Teradata clusters

•  2 billion page views every day

•  75 billion database calls every day

SELENIUM – THE CURE FOR MERCURY POISONING 2

•  Every 30 seconds, a woman’s handbag is purchased on eBay Mobile.

•  Every 2 minutes, a tablet is bought through eBay Mobile

•  Every week, more than 8,000 cars and 340,000 car parts are sold through eBay’s mobile apps.

•  7,493 tablets sold weekly from April – June; enough to cover the surface of 3 Olympic-sized pools.

Page 3: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

WHO AM I?

MICHAEL PALOTAS HEAD OF QUALITY ENGINEERING EUROPE [email protected] [email protected] +41 79 6690708 http://ch.linkedin.com/in/michaelpalotas http://www.xing.com/profile/Michael_Palotas

SELENIUM – THE CURE FOR MERCURY POISONING 3

Page 4: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

Selenium was so named because Huggins, dissatisfied with testing tools on the market, was seeking a name that would position the product as an alternative to Mercury Interactive QuickTest Professional commercial testing software. The name, Selenium, was selected because selenium mineral supplements serve as a cure for mercury poisoning, Huggins explained.

SELENIUM – THE CURE FOR MERCURY POISONING 4

http://news.techworld.com/applications/3272444/open-source-selenium-web-app-test-suite-to-support-iphone-and-android/

Page 5: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

SELENIUM VS. QTP JOB TRENDS

SELENIUM – THE CURE FOR MERCURY POISONING 5

Page 6: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

AUTOMATION IS GOOD…BUT

•  Tools help, but tools don’t test •  Manual testing is equally important •  Manual (exploratory) and automated testing complement each other

SELENIUM – THE CURE FOR MERCURY POISONING 6

Automation

Manual

Page 7: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

TEST AUTOMATION – WHY?

• NOT to replace people

• To save time and to reinvest that time into manual testing

• To get early and instant feedback

• Regression testing only • Safety net

SELENIUM – THE CURE FOR MERCURY POISONING 7

Page 8: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

SELENIUM

Page 9: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

WHAT IS SELENIUM?

Selenium automates browsers…that’s it

Selenium is becoming a W3C standard: http://www.w3.org/TR/webdriver

SELENIUM – THE CURE FOR MERCURY POISONING 9

Page 10: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

WHAT DO WE DO WITH SELENIUM?

End to End functional test automation

SELENIUM – THE CURE FOR MERCURY POISONING 10

Unit Tests

E2E Test

s

Manual Tests

Integration Tests

Selenium space

Page 11: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

A LITTLE SELENIUM HISTORY AT EBAY

SELENIUM – THE CURE FOR MERCURY POISONING 11

Home baked solution Selenium IDE

Selenium RC

Selenium GRID Selenium2 / Webdriver

Page 12: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

HIGH LEVEL INFRASTRUCTURE

SELENIUM – THE CURE FOR MERCURY POISONING 12

vCenter Server

Selenium GRID HUB

Web

Frontend ESX

ESX

API

DB

ESX

ESX

Test Type

TestNG

ESX

ESX

Page 13: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

SELENIUM GRID

SELENIUM – THE CURE FOR MERCURY POISONING 13

Sequential Execution

Execution time: 7000 minutes (~116 hours = ~5 days)

Test 1

Test 2

Test …

Test 4500

Execution Time

Test 3

-  4500 end-to-end regression test cases -  2-3 minutes execution time for each test

Parallel Execution

Execution time: 60 minutes by using 150 Virtual Machines / Browsers using the Selenium GRID

Test Test Test

Execution Time

Test

Test Test Test Test

Test Test Test Test

Par

alle

l Exe

cutio

n

Par

alle

l Exe

cutio

n

Page 14: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

TestNG

• Data Provider

• Dependency management

• Groups

• Listeners + Reports

SELENIUM – THE CURE FOR MERCURY POISONING 14

Page 15: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

PAGES AND FLOWS

SELENIUM – THE CURE FOR MERCURY POISONING 15

eCommerce shopping site like eBay

Checkout Page Success Page Shopping Cart

Page View Item

Page

View Orderlist

View Category

Update

Delete View Product

Search Item

View Category Review

Select Payment Provider

Order Summary

Page 16: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

HIGH LEVEL TEST ARCHITECTURE

SELENIUM – THE CURE FOR MERCURY POISONING 16

Browser

Flow Objects

Tests

WebDriver

Page Objects

Page 17: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

PAGE OBJECTS

• http://code.google.com/p/selenium/wiki/PageObjects

• Page objects model the pages and page interactions

• Reduce code duplication

• Reduce maintenance

• Easy international support

• Public methods represent the service of a page

• Can be a subsection of a page

• Don’t make assertions in page objects

SELENIUM – THE CURE FOR MERCURY POISONING 17

Page 18: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

PAGE OBJECT EXAMPLE

SELENIUM – THE CURE FOR MERCURY POISONING 18

Page 19: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

MOBILE TESTING

Page 20: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

EBAY’S MOBILE PRODUCTS

SELENIUM – THE CURE FOR MERCURY POISONING 20

Android Native App iOS Native App Mobile Web

Page 21: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

MOBILE TEST AUTOMATION REQUIREMENTS

• Use load balancer features of Selenium GRID for parallel execution

• Manage multiple applications / versions / languages

• Native app should not need to be modified

• Native app runtime inspection support

SELENIUM – THE CURE FOR MERCURY POISONING 21

Page 22: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

MOBILE WEB TEST AUTOMATION

• We use Selenium AndroidDriver and iPhoneDriver

• Tests are written in JAVA and are similar to web tests

• Tests are only executed on emulators

SELENIUM – THE CURE FOR MERCURY POISONING 22

Page 23: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

MOBILE WEB TEST CASE

SELENIUM – THE CURE FOR MERCURY POISONING 23

Test

s Fl

ow O

bjec

ts

Pag

e O

bjec

ts

Page 24: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

ANDROID APP AUTOMATION

• We created the open source project CALABASH-DRIVER

• CALABASH-DRIVER integrates Calabash-Android into Selenium GRID

• CALABASH-DRIVER offers a Webdriver-like Java API for writing tests

SELENIUM – THE CURE FOR MERCURY POISONING 24

Page 25: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

ANDROID APP TEST CASE

SELENIUM – THE CURE FOR MERCURY POISONING 25

Test

s Fl

ow O

bjec

ts

Dia

log

Obj

ects

Page 26: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

AUTOMATION OF IOS APPS

• We created the open source project iOS-Driver

• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID

• iOS-Driver offers a convenient Webdriver-like Java API for writing tests

SELENIUM – THE CURE FOR MERCURY POISONING 26

Page 27: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

iOS APP TEST CASE

SELENIUM – THE CURE FOR MERCURY POISONING 27

Test

s Fl

ow

Obj

ects

D

ialo

g O

bjec

ts

Page 28: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

ANDROID VIDEO

SELENIUM – THE CURE FOR MERCURY POISONING 28

Page 29: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

WEB – IOS – WINDOWS INTEGRATION

SELENIUM – THE CURE FOR MERCURY POISONING 29

Page 30: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

IDE INTEGRATION

SELENIUM – THE CURE FOR MERCURY POISONING 30

Page 31: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

SUMMARY

• Use of open source tools enables innovation from within the organization

• World wide recognition for our work

• Zero attrition in 4 years!

• Solutions are integrated into the Selenium Grid which enables us to scale

• Same concept for automation of Web, Win32, mobile web, native apps

• Extremely low maintenance due to use of page object pattern

• Fast rampup for engineers due to similar approach

SELENIUM – THE CURE FOR MERCURY POISONING 31

Page 32: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

CHECK IT OUT ON GITHUB

• https://github.com/freynaud/ios-driver

• http://calabash-driver.github.com

SELENIUM – THE CURE FOR MERCURY POISONING 32

Page 33: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

THANK YOU!

COMMENTS?

Page 34: SELENIUM - JUG · PDF file• iOS-Driver integrates Apple’s official tool “UI Automation” into Selenium GRID • iOS-Driver offers a convenient Webdriver-like Java API for writing

WE ARE HIRING!

http://ebaycareers.com/ Or contact me: [email protected]