TESTING MOBILE WITH€¦ · 5/1/2014 Testing Mobile with Appium 2/24

Post on 14-Aug-2020

1 views 0 download

Transcript of TESTING MOBILE WITH€¦ · 5/1/2014 Testing Mobile with Appium 2/24

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 1/24

TESTING MOBILE WITHAPPIUM

Fil Maj, Mobile R&D, Sauce Labs@filmaj

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 2/24

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 3/24

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 4/24

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 5/24

TESTING, CONT.

WHO CARES?Biggest embarassment as a programmer: regressions

Be disciplined at your craft: write a test for each bug

Run your tests after each change. This will prevent regressions.

Over time you grow a set of tests for your application

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 6/24

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 7/24

CONTINUOUS INTEGRATION

CI automates the testing process. You get continuous feedbackas your codebase evolves - in real-time

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 8/24

TESTING DESKTOPWEBSITES

Established testing system is in place: Selenium.

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 9/24

TESTING MOBILE

Not so easy.

"Rent" time from a device testing serviceLittle to no automation (usually simulator based)Not much different from a monkey

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 10/24

SELENIUM CAN SAVE US

Open Source and Open Spec FTW

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 11/24

WHAT IS SELENIUM?Simply put: it is an HTTP APIDeveloped out of a need to test websitesNaturally this started on desktop

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 12/24

HOW DOES SELENIUM WORK?

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 13/24

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 14/24

SELENIUM TESTSScripts can be written in a variety of languages, as there are

many "client" libraries

JavaScript, Ruby, Java, C, you name it.

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 15/24

SELENIUM ON MOBILEAPPIUM

http://appium.io

http://github.com/appium/appium

npm install -g appium

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 16/24

WHAT IS APPIUM?An implementation of Selenium for mobile

Free and Open Source

Supports Android, iOS and FirefoxOS

Works with browsers, hybrid applications, and nativeapplications

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 17/24

ALL TYPES OF APPS!?That's right!

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 18/24

SELENIUM IS EVOLVING

The spec is being pushed to address new automation needs

Different types of apps, different types of interactions

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 19/24

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 20/24

APPIUM DEMOS

http://github.com/filmaj/appium-test

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 21/24

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 22/24

SELENIUM IS HARD

Lots of moving parts

Infrastructure is hard: Windows, Mac, Linux, and now mobile...

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 23/24

5/1/2014 Testing Mobile with Appium

http://filmaj.ca/presentations/phillyete-2014/?print-pdf#/ 24/24

SAUCE LABS TO THERESCUE!

Let us handle the infrastructure: over 300 OS/browser combos,more being added every week

You treat Sauce Labs like just another Selenium server endpoint