MozMill is the framework that we're using to run interactive tests. Mozmill tests effectively run the entire application through unit tests.
Run this from objdir/
to run all the tests in the test suite.
make mozmill
For builds on Windows (created by mozilla/mach and implicitly build/pymake/make.py):
mozmake mozmill
Obsolete: In the past, the following command had been used for builds on Windows (created by mozilla/mach and implicitly build/pymake/make.py):
../build/pymake/make.py mozmill
For example to run all the folder-display tests, go to the objdir and run:
make SOLO_TEST=folder-display mozmill-one
For builds on Windows (created by mozilla/mach and implicitly build/pymake/make.py):
../build/pymake/make.py SOLO_TEST=folder-display mozmill-one
SOLO_TEST
may be a directory containing tests within mail/test/mozmill, or a specific test file.
make SOLO_TEST=folder-display/test-message-window.js mozmill-one
For builds on Windows (created by mozilla/mach and implicitly build/pymake/make.py):
../build/pymake/make.py SOLO_TEST=folder-display/test-message-window.js mozmill-one
For example to run "testBiweeklyRecurrence.js", go to the objdir and run:
make -C comm/calendar/test/mozmill SOLO_FILE=cal-recurrence/testBiweeklyRecurrence.js mozmill-one
See this page for how to run in package test style.
Linux runs have a lot of issues with focus related problems in more recents of gecko. Also, it can be annoying to lose your session to the tests. With the landing of bug 548172 if you have Xvnc installed and exposed via /usr/bin/vncserver and a password defined in ~/.vnc/passwd, we will use it to spin up a VNC session and run the mozmill tests in that session. On Fedora Core 12, this is provided by the tigervnc-server package.
There are two things you need to do / be aware of:
#!/bin/sh vncconfig -iconic & unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS OS=`uname -s` xsetroot -solid grey xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & xfwm4 &
You can connect to the vnc server to see what it is doing by invoking "vncviewer :99". (We always run mozmill tests on display 99, currently.) You will need to enter the password.
Draft
This page is not complete.
The Thunderbird mozmill tests and infrastructure are stored in http://mxr.mozilla.org/comm-central/source/mail/test/mozmill.
Each set of tests is stored in a sub-directory, the tests that are run on a full mozmill run are listed in http://mxr.mozilla.org/comm-central/source/mail/test/mozmill/mozmilltests.list.
MozMill has its own documentation that is useful to examine to get used to working with MozMill. However, Thunderbird has its own set of APIs/styles that it uses to interact with mozmill, and these are contained in the http://mxr.mozilla.org/comm-central/source/mail/test/mozmill/shared-modules/ directory. This code is shared across the different test sub-directories being included in the tests where required, documentation for these functions is contained within the code in doxygen format.
These files give examples of MozMill tests in Thunderbird and are considered relatively simple examples to get started with:
Need info on:
Obsolete since Gecko 9 (Firefox 9 / Thunderbird 9 / SeaMonkey 2.6)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Starting Thunderbird 9, MozMill no longer needs to be installed separately. It is included in the sources and will be installed into a virtual environment during the build process. So you can proceed with Running Mozmill Tests.
Thunderbird's MozMill test harness currently requires using MozMill 1.4.2b1; more recent versions will not work at this time. If you need to use a more recent version of mozmill for other software development, you will want to look into virtualenv.
You'll need MozillaBuild 1.4 or higher for this. Start a MozillaBuild prompt and use it to install MozMill 1.4.2b1:
easy_install http://pypi.rhaptos.org/mozrunner/mozrunner-2.5.2.tar.gz easy_install http://pypi.rhaptos.org/jsbridge/jsbridge-2.3.7b1.tar.gz easy_install http://pypi.rhaptos.org/mozmill/mozmill-1.4.2b1.tar.gz
You'll need root privileges for this.
sudo easy_install http://pypi.rhaptos.org/mozrunner/mozrunner-2.5.2.tar.gz sudo easy_install http://pypi.rhaptos.org/jsbridge/jsbridge-2.3.7b1.tar.gz sudo easy_install http://pypi.rhaptos.org/mozmill/mozmill-1.4.2b1.tar.gz
If you, for some reason, need a different version, see MozMill Development Install.