mozilla
Your Search Results

    Running Tests

    Running Tests

    First, you'll need to set up the Python Marionette client.

    Second, you'll need to acquire the tests. If you already have a clone of a gecko repo on your machine, you can find the tests at testing/marionette/client/marionette/tests.  Or, you can download the tests from a tests.zip package; you can download the package from ftp.mozilla.org which corresponds to your OS.  If you are using a tests.zip package, extract it, and find the tests under marionette/tests/testing/marionette/client/marionette/tests.

    Third, you can launch the tests using one of the methods below.  You can replace the path to unit-tests.ini with the path to a particular test, if desired.  See the Marionette Python TestRunner for more options.

    For FirefoxOS

    With a device build

    Activate the virtualenv that you installed Marionette it (if you used one), make sure your device is connected via adb, then:

    adb forward tcp:2828 tcp:2828
    cd $GECKO_DIR/testing/marionette/client/marionette
    python runtests.py --address localhost:2828 --type=b2g tests/unit/unit-tests.ini

    With an emulator build

    Activate the virtualenv that you installed Marionette it (if you used one), make sure your device is connected via adb, then:

    cd $GECKO_DIR/testing/marionette/client/marionette
    python runtests.py --emulator arm --homedir $B2G_DIR --type=b2g tests/unit/unit-tests.ini

    $B2G_DIR is either the path to your B2G directory (if you've built your own emulator), or the path to a downloaded and extracted emulator package.

    With a b2g desktop build

    The only tests that are supported right now for b2g desktop build are gaia-ui-tests.  See that page for instructions.

    For Desktop Firefox

    With a downloaded desktop Firefox build and tests.zip

    Activate the virtualenv that you installed Marionette it (if you used one), then:

    cd /path/to/extracted/tests.zip/marionette/marionette
    python runtests.py --binary=/path/to/firefox-executable --type=browser tests/testing/marionette/client/marionette/tests/unit-tests.ini

    With a local build

    Activate the virtualenv that you installed Marionette it (if you used one), then:

    cd $GECKO_DIR/testing/marionette/client/marionette
    python runtests.py --binary=/path/to/firefox-executable --type=browser tests/unit-tests.ini

    You can also use mach to run all the tests:

    ./mach marionette-test

    Currently, you can't use command-line arguments with that and you need to make your own build.

    Document Tags and Contributors

    Contributors to this page: jgriffin, Sheppy, ato, fscholz, davehunt, mwargers, mdas, aw1231
    Last updated by: ato,