Jenkins User Conference San Francisco Oct 2 nd

  • Slides: 24
Download presentation
Jenkins User Conference San Francisco, Oct 2 nd 2011 Extreme Testing with Jenkins and

Jenkins User Conference San Francisco, Oct 2 nd 2011 Extreme Testing with Jenkins and Selenium Jason Huggins (@hugs) CTO, Cofounder - Sauce Labs Inc Creator - Selenium Saucelabs. com

Jenkins User Conference Selenium’s #1, baby! San Francisco, Oct 2 nd 2011

Jenkins User Conference Selenium’s #1, baby! San Francisco, Oct 2 nd 2011

Jenkins User Conference 2 Extreme Stories In the cloud In the garage San Francisco,

Jenkins User Conference 2 Extreme Stories In the cloud In the garage San Francisco, Oct 2 nd 2011

Jenkins User Conference San Francisco, Oct 2 nd 2011 Mantra: • Parallelizability (p 15

Jenkins User Conference San Francisco, Oct 2 nd 2011 Mantra: • Parallelizability (p 15 y) leads to fast software builds. • Fast builds lead to happy developers. • Happy developers lead to happy customers.

Jenkins User Conference • Q: Want happy customers? • A: Use parallel-ready testing tools!

Jenkins User Conference • Q: Want happy customers? • A: Use parallel-ready testing tools! San Francisco, Oct 2 nd 2011

Jenkins User Conference San Francisco, Oct 2 nd 2011 Story #1 - Massive testing

Jenkins User Conference San Francisco, Oct 2 nd 2011 Story #1 - Massive testing (in the cloud)

Jenkins User Conference A large domestic airline San Francisco, Oct 2 nd 2011

Jenkins User Conference A large domestic airline San Francisco, Oct 2 nd 2011

Jenkins User Conference San Francisco, Oct 2 nd 2011 • Build and test entire

Jenkins User Conference San Francisco, Oct 2 nd 2011 • Build and test entire site in 20 minutes. • (10 min build, 10 min Selenium testing) • Massive parallelism

Jenkins User Conference Parallelism x 2! San Francisco, Oct 2 nd 2011

Jenkins User Conference Parallelism x 2! San Francisco, Oct 2 nd 2011

Jenkins User Conference San Francisco, Oct 2 nd 2011 Jenkins • • • 1

Jenkins User Conference San Francisco, Oct 2 nd 2011 Jenkins • • • 1 Jenkins master 10 physical slaves 10 Virtual IPs per slave 100 potential total nodes Each Jenkins executor on client side could generate ~30 threads at Sauce for cloud testing • 100 x 30 -> 3000 potential parallel threads of test execution. * * Current use about 30 -300 cloud browsers running tests at any give time throughout the entire day.

Jenkins User Conference San Francisco, Oct 2 nd 2011 JBehave • Every story is

Jenkins User Conference San Francisco, Oct 2 nd 2011 JBehave • Every story is written with JBehave • JBehave can parallelize each story. • JBehave -> regex -> groovy page objects-> java -> Selenium 2 • Each story compiles to an end-to-end full stack + Selenium test run.

Jenkins User Conference All that. . . multiplied • Smoke suite • Regression suite

Jenkins User Conference All that. . . multiplied • Smoke suite • Regression suite • Team-specific feature testing • plus • Component tests • Java. Script unit tests (jasmine) San Francisco, Oct 2 nd 2011

Jenkins User Conference San Francisco, Oct 2 nd 2011 Process • Trunk-based development (aka

Jenkins User Conference San Francisco, Oct 2 nd 2011 Process • Trunk-based development (aka "Don't break the build!") • Branch per release • At any given moment, 2 lines (release branch + trunk) are in use. • Fixes go to trunk first, then branch • Feature toggles (aka "Feature flags") • Every j. Behave test suite stands up its own app stack for testing. (Amdahl's Law)

Jenkins User Conference San Francisco, Oct 2 nd 2011 Next. . . • Improve

Jenkins User Conference San Francisco, Oct 2 nd 2011 Next. . . • Improve reliability, then go for scale and speed

Jenkins User Conference San Francisco, Oct 2 nd 2011 More info about JBehave •

Jenkins User Conference San Francisco, Oct 2 nd 2011 More info about JBehave • https: //github. com/paul-hammant/jbehavewebdriver-tutorial

Jenkins User Conference San Francisco, Oct 2 nd 2011 Story #2 – Mobile Testing

Jenkins User Conference San Francisco, Oct 2 nd 2011 Story #2 – Mobile Testing (with Robots!)

Jenkins User Conference Bitbeambot (http: //bitbeam. org) San Francisco, Oct 2 nd 2011

Jenkins User Conference Bitbeambot (http: //bitbeam. org) San Francisco, Oct 2 nd 2011

Jenkins User Conference Video Demo (click to start) San Francisco, Oct 2 nd 2011

Jenkins User Conference Video Demo (click to start) San Francisco, Oct 2 nd 2011

Jenkins User Conference San Francisco, Oct 2 nd 2011 Bitbeam. Bot – What? •

Jenkins User Conference San Francisco, Oct 2 nd 2011 Bitbeam. Bot – What? • A computer-controlled (CNC) robot for testing applications on mobile devices • Open Source components: – Electronics: Arduino – Mechanics: Bitbeam • • Lego Technic compatible building toy Made from Basswood Designed with 3 D tool Open. SCAD Lasercut at Tech. Shop San Francisco – Software: Python, Selenium

Jenkins User Conference San Francisco, Oct 2 nd 2011 Bitbeam. Bot - Why? •

Jenkins User Conference San Francisco, Oct 2 nd 2011 Bitbeam. Bot - Why? • Selenium is a software-based robot. • Selenium’s mission is to mimic and automate how users interact with an application. • For mobile, this means handling real devices. • Bitbeam. Bot is an experiment to take Selenium out of the screen and into the real world.

Jenkins User Conference The “Clicker” (1 st prototype) San Francisco, Oct 2 nd 2011

Jenkins User Conference The “Clicker” (1 st prototype) San Francisco, Oct 2 nd 2011

Jenkins User Conference San Francisco, Oct 2 nd 2011

Jenkins User Conference San Francisco, Oct 2 nd 2011

Jenkins User Conference San Francisco, Oct 2 nd 2011 Links: • JBehave: https: //github.

Jenkins User Conference San Francisco, Oct 2 nd 2011 Links: • JBehave: https: //github. com/paul-hammant/jbehave-webdriver-tutorial • Selenium: http: //seleniumhq. org • Bitbeam: http: //bitbeam. org https: //github. com/hugs/bitbeam • Sauce Labs: http: //saucelabs. com • Me (Jason Huggins): http: //twitter. com/hugs

Jenkins User Conference Thank You To Our Sponsors Platinum Sponsor Gold Sponsor Silver Sponsor

Jenkins User Conference Thank You To Our Sponsors Platinum Sponsor Gold Sponsor Silver Sponsor Bronze Sponsors San Francisco, Oct 2 nd 2011