I’ve written a little command line tool for interacting with Gaia, which is the front-end for Firefox OS. The main reason for this is the Eideticker CI project needed a way to connect to a WiFi network before running the tests. In the past, we’ve allowed tools to accept test variables, which contain the necessary information for connecting to a network, but rather than add this into Eideticker, it’s easier to just take care of it in an earlier build step.
It’s recently landed in the official Gaia repository, and is included alongside gaiatest, which is the core for Gaia related Python tools (functional tests, endurance tests, b2gpopulate, b2gperf, etc). It can be installed using:
$ easy_install gaiatest
$ pip install gaiatest
Or by cloning the Gaia repository and running the following from tests/python/gaia-ui-tests:
$ python setup.py develop
Here’s an usage example, which would unlock the screen, set the brightness to 100%, connect to a network, and launch the Settings app:
$ gcli unlock $ gcli setsetting screen.brightness 1 $ gcli connectwifi MozillaGuest $ gcli launchapp Settings
For full usage details run
gcli --help and for help on a specific command use
gcli <command> --help.
I have also added hardware button simulation, could be used to troubleshoot remote devices by taking screenshots and copying them to the local machine.