QaOps - NYC Selenium Users Meetup - 03/15/12

51
Christopher Hoey Senior IT Manager - Wireless Generation Started in QA Switched over to Operations Selenium abuser since 2006 Got to see the Selenium vs Webdriver Cage Fight live Dev + Ops = DevOps --> QA + Ops = QAOps NYC Metro Selenium Users Meetup March 15, 2012

description

NYC Metro Selenium Users Meetup 03/15/12 http://www.meetup.com/NYCSelenium/events/52638682/ Dev + Ops = DevOps --> QA + Ops = QaOps Chris Hoey, Senior IT Manager at Wireless Generation, will share some of the surprising ways Selenium has brought value to his company outside of the testing function. Chris began his career at Wireless Generation as a Lead QA engineer responsible for writing many of the Selenium tests. When he transitioned over to Operations, he decided to carry the tests over to see new life not previously thought of. This included periodically benchmarking applications from tests, helping customer care debug browser specific issues seen on their site and playing back the tests into a jmeter proxy to extend the tests into load testing scripts. It also spawned a new name (coined by Chris) to describe the joining of these two groups - QaOps.

Transcript of QaOps - NYC Selenium Users Meetup - 03/15/12

Page 1: QaOps - NYC Selenium Users Meetup - 03/15/12

Christopher Hoey

■ Senior IT Manager - Wireless Generation

■ Started in QA

■ Switched over to Operations

■ Selenium abuser since 2006

■ Got to see the Selenium vs Webdriver Cage Fight live

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 2: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Founded 12/14/06 Closed 07/16/09

Thanks!

Ashley WilsonLindsey BaronSauce LabsConductor

NYC Metro Selenium Users

Selenium Developers

Jmeter Developers

Page 3: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands

Numbers collected and updated before sharing slides

About 35 attended and participated in informal poll

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 4: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - primary job title

Quality Assurance ?12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 5: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - primary job title

Developer ? 10

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 6: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - primary job title

Operations ? 5

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 7: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - experience with Selenium

Have not used it?5

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 8: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - experience with Selenium

Tried Selenium IDE?

8Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 9: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - experience with Selenium

Mastered Selenium IDE?

1Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 10: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - experience with Selenium

Tried Selenium RC/Webdriver?

13Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 11: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - experience with Selenium

Mastered Selenium RC/Webdriver?

6Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 12: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - experience with Selenium

Selenium tied to CI build system?

10Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 13: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - experience with Selenium

Running a Selenium Grid?

7Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 14: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - use of Selenium

Functional Testing New Features?

9Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 15: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - use of Selenium

Regression Testing?

10Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 16: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - use of Selenium

Load/Stress Testing? really?

1Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 17: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - use of Selenium

Benchmarking Performance?

1Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 18: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - use of Selenium

Automating Data Entry?

1Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 19: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - use of Selenium

Monitoring for Operations?

1Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 20: QaOps - NYC Selenium Users Meetup - 03/15/12

Show of hands - use of Selenium

Something Strange?

2 Filling out forms to renew trial licenses when expired

Running build jobs for a build tool that does not have a cli

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 21: QaOps - NYC Selenium Users Meetup - 03/15/12

DisclaimersNot a talk about best practices

Forcing Selenium to do things not originally intended

A lot of talk about Selenium IDE QAOps term kind of meant as a joke but might have meaning? Times have changed, tools improved and storms have passed

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Dev + Ops = DevOps --> QA + Ops = QAOps

Page 22: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

About Wireless Generation

● Create tools that make teacher's jobs easier

● Primarily focused around assessment and reporting apps

● Mix of mature code/platforms and new development projects

● Experiencing rapid growth year over year

Page 23: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Faith in monitors pretty low Manual configuration management Serious bugs in third party tools Large increases in user traffic Lots of new projects to juggle while keeping existing work online Sysadmins manually checking site =(

Reuse anything that helps!

Going MacGyver in early days of Ops

Selenium to the rescue!

Page 24: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

● Use Selenium IDE so anyone in Operations with Firefox can use

● Suites are happy path smoke tests that are not brittle ● Focus on touching all moving parts of infrastructure

● All suites can run with any username

● All suites can run on any environment

● Sysadmins running Selenium tests -- still done manually =/

Suites of Smoke Tests for Operations

Page 25: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Suites for Operations

DEMO TIME

Removing brittleness from Selenium IDE tests against a site with difficult

locators

Page 26: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Suites for Operations - DEMO TIME

All we really want to know is if we threw any errors while loading pages that touch on all parts of our platform. Two simple regex searches for every page gets us the desired minimal coverage

Yes that looks way too simple but it did the job very well.

These tests started finding issues before our customers did.

Confidence increased dramatically!

Page 27: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Suites for Operations - DEMO TIME

https://zzz.yyy.net/wgen/tpri/LoadTpriClasseSummary.do?ppkDefaultVersionId=7&ppkPeriodId=20&ppkClassId=550987013&ppkCompetencyDisplayId=1&ppkInstId=33645685&ppkSchoolGroupId...

We know the starting URL pattern.

The rest of the URL is really dynamic and the page locators that happen to be available are not Selenium friendly. We could use XPath but that has proven to be really brittle for us. Solution - Store the html source and use storeEval with a regex to find the correct link every time

Page 28: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Automation - judges.py

■ Headless Selenium servers

■ Suites of tests for each production webapp using smoke tests

■ Run through suites serially in a never ending loop

■ Any failure in suites marks the status as failed for that server

■ Look at each servers total result time running the

suite based on thresholds

■ Running helps see what server is currently being tested

■ Results projected on wall in Ops area

Page 29: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

We have a fundamental problem

Sysadmins Customers

Page 30: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Solution - Any browser any platform

Bromine

Grid

Page 31: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Loadtesting Selenium vs JMeter

● Lots of start up overhead

● ~30 concurrent sessions before strange things happen

● Lots of requirements / coordination headless is a hack

● Loads quickly

● ~300 concurrent sessions before strange things happen

● Java and a jar, headless is easy

Page 32: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Loadtesting with JMeter

Queries to find interesting users

Scripts to replace variables for Selenium suites

Playback Selenium scripts through JMeter proxy

Selenium Scripts IN

JMeter Scripts OUT

Page 33: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Loadtesting with JMeter

DEMO TIME

Setting up jmeter as a proxy recorder for Selenium

playback

Page 34: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Loadtesting with JMeter - DEMO TIME

Start JMeter and create a new basic WorkBench

Page 35: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Loadtesting with JMeter - DEMO TIME

Add an HTTP Proxy Server: Edit -> Add -> Non-Test Elements -> HTTP Proxy Server

Page 36: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Loadtesting with JMeter - DEMO TIME

Set your port, any record filters of what to include or exclude and click start to fire up the proxy

Page 37: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Loadtesting with JMeter - DEMO TIME

Set Firefox network settings to use localhost and the port you configured JMeter proxy to use

Page 38: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Loadtesting with JMeter - DEMO TIME

Playback your tests using Selenium and watch as JMeter records the hits

Page 39: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Loadtesting with JMeter - DEMO TIME

Add a thread group by right clicking Test Plan -> Add -> Threads -> Thread Group

Page 40: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Loadtesting with JMeter - DEMO TIME

Name your thread group, pick how many threads you want, ramp up time and how many loops

Page 41: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Loadtesting with JMeter - DEMO TIME

Run your tests and set servers ablaze. Run -> Start

Page 42: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Finding hard bugs

Uh oh! Just throwing more memory at the problem will not solve this!

Page 43: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Finding hard bugs

Did we see this in the environments below Production? Not very noticeable unless looking hard for it.

Page 44: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Finding hard bugs

Ramping up JMeter threads of a specific user in an endless loop reproduces issue in every environment

Page 45: QaOps - NYC Selenium Users Meetup - 03/15/12

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Dashboard Setup?

Use Selenium to login and navigate to your various dashboards for TV's and sharing with teams.

Page 46: QaOps - NYC Selenium Users Meetup - 03/15/12

QAOps?

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Getting most of the focus these days. Certainly best of all worlds coming together. Takes a while to be a good practitioner based on tech debt | servers | timeboxes | complexity | culture

A lot of quick wins can be made here.

Selenium IDE makes it trivial for Ops to start running and developing tests

Page 47: QaOps - NYC Selenium Users Meetup - 03/15/12

Questions?

We are hiring!

http://www.wirelessgeneration.comDev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

Page 48: QaOps - NYC Selenium Users Meetup - 03/15/12

Picture Credits

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

http://www.russpainter.com/shop/images/clip.jpg

http://g-ecx.images-amazon.com/images/G/01/stores/sport-goods/1209-huntsman.jpg

http://uploads.neatorama.com/wp-content/uploads/2010/06/macgyver.jpg

http://www.agilegeoscience.com/storage/post-images/python-logo-small.png?__SQUARESPACE_CACHEVERSION=1316752792052

http://www.packagingsuppliesbymail.com/images/C/Duct%20Tape.jpg

Page 49: QaOps - NYC Selenium Users Meetup - 03/15/12

Picture Credits

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

http://upload.wikimedia.org/wikipedia/en/0/07/Jakarta_jmeter_logo.jpg

http://cdn.babble.com/momcrunch/files/2012/02/SauceLabs_Logo_Vert_150px.gif

http://www.pptbackground.net/plog-content/images/powerpoint/education-backgrounds/raising-hands-together-powerpoint-backgrounds.jpg

http://gigaom2.files.wordpress.com/2011/01/firefox-ie.png

http://seleniumhq.org/images/selenium-ide-logo.png

Page 50: QaOps - NYC Selenium Users Meetup - 03/15/12

Picture Credits

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

http://www.portlandmercury.com/imager/dr-strangelove/b/original/3791589/80b9/mwbw-drstrangelove.jpg

http://stylreesta.files.wordpress.com/2011/07/caution_big.png

http://3.bp.blogspot.com/_t5Xqp0AYeg4/S74FdH-SO-I/AAAAAAAAAOU/OlMrI9m8VIE/s320/smileyface1.jpg

http://en.wikipedia.org/wiki/File:Devops.png

http://blogs.babycenter.com/wp-content/uploads/2008/02/crying-face.jpg

Page 51: QaOps - NYC Selenium Users Meetup - 03/15/12

Picture Credits

Dev + Ops = DevOps --> QA + Ops = QAOpsNYC Metro Selenium Users Meetup March 15, 2012

http://seleniumhq.org/images/selenium-grid-logo.png

http://www.studiosysadmins.com/site_media/attachments.gallery/2009/05/12/ServerRoomFireWeb.jpg

http://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Tux.png/220px-Tux.png

http://blogs.splunk.com/wp-content/uploads/2010/02/Picture-65.png

http://www.wisedatasecurity.com/imagenes/ie-8.jpg