Mozmill

Overview

Mozmill is a test tool and framework for writing automated tests for Gecko based applications (Firefox, Thunderbird, Songbird, etc). It provides a command line client to help you write, run, and debug tests. Mozmill has an extensive API to help you write functional tests that simulate user interactions.

It's really important to note that there is no need to create a special "test enabled" build of the target application before using Mozmill; instead, any official build including releases and nightly builds will work out-of-the box. The installation of Mozmill need only be done once. After that, each build on the local system can be used to run the existing Mozmill tests immediately.

Mozmill tests are written in JavaScript and get executed in the scope of the application window, which enables them to have access to any part of the UI and also to all available XPCOM components. Using Mozmill's command line client also offers the ability to run tests which require a restart of the application.

Source code

Sample of test log

TEST-START | pass.js | testPass
TEST-PASS | pass.js | pass.js::testPass
TEST-START | skip.js | setupModule
WARNING | skip.js::setupModule | (SKIP) Skip test
TEST-START | fail.js | testFail
TEST-UNEXPECTED-FAIL | fail.js | fail.js::testFail
INFO Passed: 1
INFO Failed: 1
INFO Skipped: 1

Continue reading