TestEngineering/Services/fxa gaia tips

From MozillaWiki
Jump to: navigation, search

As with many projects at Mozilla there are multiple ways to run things, each with their own advantages. QA and Automation Team generally test on Firefox OS using gaia-ui-test, a python based on device test command line tool. Many devs want a lower level test that runs on emulator and works with their current `make` build and test flow. Enter Marionette.js, which is a JavaScript test case that uses the selenium/webdriver wire protocol which injects JavaScript commands into gaia (the UI layer). We have two worlds but really looking for the best tools that fit everyone's workflows.

Marionette-js

src:

https://github.com/mozilla-b2g/marionette-js-client

run gaia test in an emulator locally:

clone and cd to:

~/dev_root/mozilla-b2g/gaia

create profile:

DEBUG=1 DESKTOP=0 make

build and test:

TEST_FILES="./apps/calendar/test/marionette/month_view_test.js" make test-integration-test

Other Tips

Gaia make env variables

DEVICE_DEBUG=1 NOFTU=1 make reset-gaia 

DEVICE_DEBUG is wonderful, somehow I never knew about it till yesterday:

  • enables devtools to connect automatically
  • disables lockscreen
  • enables debugging of certified apps

Adding NOFTU=1 lets you skip the FTU flow as well.