Testing Firefox OS apps

Marionette

- By Bebe

What do we have?


Browser-driven phone

All apps (dialer, camera, etc.) are HTML5 & JS

What do we need?


Supports the existing frameworks

Supports the future frameworks

Has full control of the device

Easy to use

How can we use it?


  • Drive user actions, in chrome or content
  • Remotely execute any JS in chrome or content
  • Coordinate actions across multiple devices


How does it work?


SERVER


Server starts within Gecko


Check pref on Gecko startup


Listens on port for client commands


Server uses the MessageManager to talk to chrome/content.

How does it work?


CLIENT


Marionette is based on the WebDriver protocol


Can run selenium tests by using selenium proxy!


Server/Client communicate using WebDriver-based JSON packets


We officially support a Python based client and test runner

How can you use it?

B2G Emulator (qemu), B2G Desktop, and device testing (unagi, panda, desktop)



  • Test webAPIs like SMS/Call functions
  • Drive mochitests/reftests/etc on B2G
  • Running gaia smoketest automation
  • Maybe your next test!



Drive Firefox desktop



  • Run test that access content and chrome at the same time

How much work is involved?


It's easy you just need imagination


Demo

Questions?


More info - Marionette

More info - Build your own FirefoxOS (aka B2G) emulator or phone image!

Use a proxy - Selenium proxy to talk to Marionette (under development)

FYI, if you just want to play around, I recommend pulling down Desktop FirefoxOS. It has marionette built-in, and emulates the phone resolution/environment on your desktop!