QA/TDAI/Mozmill/Jetmill: Difference between revisions

From MozillaWiki
< QA‎ | TDAI‎ | Mozmill
Jump to navigation Jump to search
(Created page with '=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 Jetpac…')
 
 
(9 intermediate revisions by the same user not shown)
Line 2: Line 2:
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.
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==
=Getting Jetmill=
* Get the [https://developer.mozilla.org/en/Mozmill#The_Command_Line_Client Mozmill command line client]
* Get the [https://developer.mozilla.org/en/Mozmill#The_Command_Line_Client Mozmill command line client]


* Get [Jetmill http://jetmill.googlecode.com/files/jetmill.zip], and unzip into the directory of your choosing
* Get [http://jetmill.googlecode.com/files/jetmill.zip Jetmill], and unzip into the directory of your choosing


=Running Jetmill=
=Running Jetmill=


From the jetmill directory you can run jetmill using the command: <tt>python jetmill.py</tt>.
From the jetmill directory you can run jetmill using the command: <tt>python jetmill.py</tt>. The special command-line arguments for jetmill are:


The special command-line arguments for jetmill are:
* <tt>-e, --jetpack-path</tt>. This is the path to the jetpack extension itself, by default, jetmill will install the extension labelled jetpack.xpi in the jetmill directory.
*<tt>-j, --jetpacks</tt>. 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 [http://quality.mozilla.org/documents-home/code-docs/mozmill-test-creation/run-mozmill-tests command line arguments for Mozmill]
 
So to run one particular test in Firefox with a jetpack installed, your command line might look like this:<pre>python jetmill.py -j menuJetpack.js -t tests/testMenu.js</pre>
 
=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 [https://addons.mozilla.org/en-US/firefox/addon/9018 Mozmill IDE], a Firefox add-on for this. See the [http://quality.mozilla.org/documents-home/code-docs/mozmill-test-creation/writing-tests Mozmill Test Writing Guide]. In addition, you can use the [https://wiki.mozilla.org/QA/TDAI/Mozmill/JetpackAPI Jetpack Shared Module] in your tests, to install/uninstall jetpacks from your tests.

Latest revision as of 20:44, 4 November 2009

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.