63
the present and future of mobile automation Jonathan Lipps Director of Engineering Sauce Labs @AppiumDevs @jlipps @saucelabs Mobile Testing Meetup Seattle, WA April 22, 2016

the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

the present and future of mobile automation

Jonathan Lipps • Director of Engineering • Sauce Labs

@AppiumDevs • @jlipps • @saucelabs

Mobile Testing Meetup • Seattle, WAApril 22, 2016

Page 2: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Jonathan Lipps • Director of Ecosystem & Integrations • Sauce Labs

@AppiumDevs • @jlipps • @saucelabs

Director of Engineering

Project Lead &Architect

Page 3: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Mobile is here to stay. So how do we scale mobile quality?

Page 4: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Automated testing is the solution for a fast dev cycle that maintains high quality

Page 5: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

The Dev Cycle of Optimal Happiness[ ]

Page 6: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium is the cross-platform solution for native and hybrid mobile automation

Page 7: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace
Page 8: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium philosophy

Page 9: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium aims to make mobile CI/CD possible by solving the problem of mobile app UI/functional testing

Page 10: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

The appium philosophyTest the same app you submit to the marketplace Write your tests in any language, using any framework Use a standard automation specification and API Build a large and thriving open-source community effort

R1.

R2.

R3.

R4.

Page 11: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium takes the best mobile automation tech and gives it to you in a Selenium WebDriver interface

Page 12: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium lets you use the years of accumulated Selenium wisdom and best practices effectively for mobile

Page 13: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium works with any language and any test runner / test framework, even custom ones

Page 14: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium enables true cross-platform test-writing. One API for iOS, Android, and soon, Windows

Page 15: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium is perfect for scaling your test concurrency with cloud solutions like Sauce Labs

Page 16: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace
Page 17: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace
Page 18: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium present

Page 19: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Over 8,000 commits

3,300 stars2,000 forksOver 160 contributors

Over 2,100 pull requests Over 3,300 issues

Over 95 releases

Page 20: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Current Platform SupportiOS native, web, hybrid via Instruments + UIAutomation Android native via UiAutomator Android web, hybrid via UiAutomator + ChromeDriverAndroid native, hybrid via Selendroid (Instrumentation)

Page 21: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Current TeamAppium Core Team (5-10 people, Sauce Labs, FOODit, Opera, Bootstrap, Gamesys, etc…)Sometime contributorsIssue helpersAppium Discuss forum helpers

Page 22: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium future

Page 23: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Future Platform SupportContinued support for the current platforms, plus:iOS native via XCUITest Android native, web, hybrid via UiAutomator2 (Eventually, older platforms will be deprecated)Windows native desktop via WinAppDriver

Page 24: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

XCUITest (iOS)Apple’s Xcode 7+ UI test frameworkApple has not yet published documentationLot of reverse engineering by us / FacebookBeta is out!… still some unknowns

Page 25: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

UiAutomator 2 (Android)Successor to Google’s UiAutomatorBased on InstrumentationMore stable, less flakeyAPI additions like waits, better support for using gestures with elements

Page 26: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

WinAppDriver (Windows)For now, desktop-onlyMobile coming soonWorking with MicrosoftMJSONWP-based!

Page 27: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Future TeamAppium Core Team expands!Middle tier of trained contributors (anyone of you interested?)Issue triagers, not just helpersAppium Discuss forum helpers

Page 28: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium takes the best mobile automation tech and gives it to you in a Selenium WebDriver interface

Page 29: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium scale

Page 30: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Sauce Labs gives you browsers, mobile simulators, and real devices on-demand

Page 31: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace
Page 32: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace
Page 33: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium is perfect for scaling your test concurrency with cloud solutions like Sauce Labs

Page 34: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace
Page 35: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium best practicesWriting Robust Tests

Page 36: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

“Robust” - Not flakey / no race conditions - DRY programming style - Test logic distinct from UI structure - Good organization (follows software dev best practice)

Page 37: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Wait for conditions wisely

Page 38: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Wait for conditions wisely

Page 39: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Use page/view object model

Page 40: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Use page/view object model

Page 41: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Use page/view object model

Page 42: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Building your app model

Page 43: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Building your app model

Page 44: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium advanced topicsCross-Platform Tests

Page 45: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Cross-platform tests

Page 46: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Cross-platform tests - Always use accessibility ID strategy - Use a Page/View Object Model - Design apps for functional parity (not necessarily UI parity)

Page 47: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium advanced topicsGestures

Page 48: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

TouchAction API

Page 49: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

MultiAction API

Page 50: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium advanced topicsRunning Tests in Parallel

Page 51: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace
Page 52: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace
Page 53: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Run tests in parallel

Page 54: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Run tests in parallel - Both conceptual + technical requirements (no free lunch) - Eliminate test interdependencies - Suite-level ||ism vs. test-level ||ism - Pick a test runner with good support (e.g., Python’s nose)

Page 55: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium advanced topicsDebugging Test Failures and Errors

Page 56: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Kinds of Errors - App errors (=> test failures, yay!) - Test errors - Client library errors - Appium server errors - Automation backend errors

Page 57: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Determining the kind of error - Test output / exception messages - Appium logs - Logcat / IOS logs - Screenshot / videos - driver.getPageSource() at failure point

Page 58: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

appium advanced topicsSauce Labs Configuration

Page 59: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Test Configuration - set test names with {name: “xxx”} - put tests in a build with {build: “xxx”} - set pass/fail status

Page 60: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Sauce Temporary Storagecurl -u YOUR_USERNAME:YOUR_ACCESS_KEY \ -X POST \ -H "Content-Type: application/octet-stream" \ https://saucelabs.com/rest/v1/storage/YOUR_USERNAME/TestApp7.1.app.zip?overwrite=true \ --data-binary @apps/TestApp7.1.app.zip

https://docs.saucelabs.com/reference/rest-api/#temporary-storage

Page 61: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Sauce Connect - secure tunnel to your infrastructure - host your app without exposing it - host your stage website privately

Page 62: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Thanks!

http://appium.iohttps://github.com/appium/appium

@AppiumDevs • @jlipps • @saucelabs

Page 63: the present and future of mobile automationfiles.meetup.com/18979790/[Jonathan Lipps] Appium... · 2016-04-28 · The appium philosophy Test the same app you submit to the marketplace

Questions?

http://appium.iohttps://github.com/appium/appium

@AppiumDevs • @jlipps • @saucelabs