Testing Mobile With Appium

Fil Maj, Mobile R&D, Sauce Labs


Fil Maj

  • Work at Sauce Labs
  • Work on Mobile Testing Infrastructure
  • Live in Vancouver, BC, Canada
  • Drink beer, watch hockey (go Flyers!)

Back After A Year!

PhillyETE 2013 was awesome!

Spoke about this same topic last year.

tl;dr: things are much better


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

Continuous Integration

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

Testing Desktop Websites

Established testing system is in place: Selenium.

Testing Mobile

Not so easy.

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

Selenium Can Save Us

Open Source and Open Spec FTW

What is Selenium?

  • Simply put: it is an HTTP API
  • Developed out of a need to test websites
  • Naturally this started on desktop

How Does Selenium Work?

Selenium Tests

Scripts can be written in a variety of languages, as there are many "client" libraries

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

Selenium On Mobile




npm install -g appium

What is Appium?

An implementation of Selenium for mobile

Free and Open Source

Supports Android, iOS and FirefoxOS

Works with browsers, hybrid applications, and native applications

All types of apps!?

That's right!

Selenium is evolving

The spec is being pushed to address new automation needs

Different types of apps, different types of interactions

Appium Demos


Selenium is Hard

Lots of moving parts

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

Sauce Labs to the rescue!

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

Sauce Labs Demo

Coming Soon: Real Device Cloud

We plan on providing a cloud of real devices accessible to users for test runs