QA/TDAI/Mozmill/Jetmill

From MozillaWiki
< QA‎ | TDAI‎ | Mozmill
Revision as of 20:44, 4 November 2009 by Harthur (talk | contribs) (→‎Running Jetmill)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 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.