17
© 2012 Cambia Health Solutions. iPhone Webdriver in a CI Environment by James Eisenhauer

Hubbub health-i phone-test-automation

Embed Size (px)

Citation preview

Page 1: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions.

iPhone Webdriver in a CI Environment

by James Eisenhauer

Page 2: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions.

About Me

James ‘Jim’ Eisenhauer Chief Quality Scientist, Hubbub Health o Breaking the web for 17 years….most of the time on purpose o Over educated and certified o Scuba Diving, Traveling & Beer! (not necessarily in that order) o Tech Oregon QA Forum - Board Member o Agile Testing Open NW Conference – Board Member o Co-Founder Portland Selenium Meetup Group

@jameseisenhauer www.jameseisenhauer.com

Page 3: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions.

Hubbub

Health challenge platform deployed on Heroku

iPhone App & mobile web

Ruby on Rails web application & REST based API + +

Page 4: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions.

Hubbub Motion™

Players can automatically track their activity daily via Hubbub and their phones.

No data-entry

No synching

No charging

Just moving!

Hubbub Motion Kit: Activity Tracker and Base Station

1. Wear

3. Compare 2. Track

COMING SOON!

Page 5: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions

Buzzwords Galore!

A ton of info to cover and could possibly be 5-7 separate future sessions!

Setting up Selenium Grid/Server Installing iWebdriver app on the iPhone Simulator

Building a Selenium Framework in Ruby

Setting up Jenkins CI

Running Selenium Tests when your mobile website changes

Page 6: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions

Disclaimer!!

All work done on

Mileage may vary on other operating systems

Page 7: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions.

Selenium Grid/Server

Download here: http://seleniumhq.org/download/ Good Info here: http://code.google.com/p/selenium/wiki/Grid2 Start it Up!

View Grid Console: http://localhost:4444/grid/console

Page 8: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions.

iWebdriver

Buy a Mac Install Xcode Download the entire Selenium source tree Launch Xcode Open the iPhone Xcode project found in the Selenium source tree Choose build destination – iPhone simulator Build App Now iWebdriver is installed on your iPhone simulator Install on real iPhone? Pay $99 for Apple iOS Developer License Repeat above & choose your real iPhone as build destination

All the info is found here: http://code.google.com/p/selenium/wiki/IPhoneDriver

Page 9: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions.

iPhoneWebdriverSim

Find it on my github account: https://github.com/jameseisenhauer/iPhoneWebDriverSim

Page 10: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions.

iWebdriver-Hooked to the Grid

Page 11: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions.

Selenium Framework in Ruby

Learning Ruby as we go!!! Almost done!!

Features o Run from rake o Use bundler o Use Page Objects o Run from Jenkins and reported o Parallel running o Each rspec file is a browser session (for authentication) o Default browser - command line different browsers o Mobile run on emulator in CI o Screen shot on errors - shown in Jenkins o Easy change of selenium grid, sauce, etc.. o Easy change of it global test URL o Auto retry at least 2x See what I have so far at: https://github.com/jameseisenhauer/PDXSeiPhoneDemo

Page 13: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions.

Jenkins

Most of the time PERMGEN memory configuration needs increased. defaults write /Library/Preferences/org.jenkins-ci permGen 1024M

After install view: http://localhost:8080

Page 14: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions.

Continuous Integration

Page 16: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions.

One More Thing!

Sneak Preview Beta

Page 17: Hubbub health-i phone-test-automation

© 2012 Cambia Health Solutions.

Thank You!!!

@jameseisenhauer www.jameseisenhauer.com