Jetmill
Jetmill is a command-line wrapper for Mozmill, a UI Automation framework for Mozilla Applications. It lets you specify command line arguments that aid in testing Jetpacks.
Getting Jetmill
- Get the Mozmill command line client
- Get Jetmill, and unzip into the directory of your choosing
Running Jetmill
From the jetmill directory you can run jetmill using the command: python jetmill.py. The special command-line arguments for jetmill are:
- -e, --jetpack-path. This is the path to the jetpack extension itself, by default, jetmill will install the extension labelled jetpack.xpi in the jetmill directory.
- -j, --jetpacks. A Comma-separated list of jetpack features (jetpacks) to install before running the tests, each item can be a url to the jetpack source file or the absolute or relative path (from the jetmill script directory) to the js file in the file system.
You can also use the command line arguments for Mozmill
So to run one particular test in Firefox with a jetpack installed, your command line might look like this:
python jetmill.py -j menuJetpack.js -t tests/testMenu.js
Writing Mozmill Tests
You can write tests for your jetpack just like you would write other Mozmill tests for Firefox itself, it's useful to get the Mozmill IDE, a Firefox add-on for this. See the Mozmill Test Writing Guide. In addition, you can use the Jetpack Shared Module in your tests, to install/uninstall jetpacks from your tests.