UnitTest.XUL, aka UxU (pronounced as "wu-zu"), is an xUnit testing framework for developers of Firefox/Thunderbird addons and XULRunner applications.
- How to write testcases for UxU?
- Testing Greasemonkey scripts by UxU
- Helper methods for testcases
- How to write testcases with mocks?
- How to control UxU from remote?
- Command line options
- UxU 1.0.2 (2014.3.7)
- Works on Firefox 24, Thunderbird 24, and Nightly 31.0a1.
- Give response objects to callback functions defined in imported GM scripts correctly.
- Fix "out of memory" error on
- Assertion failure of
isInstanceOf()reports meaningful message (it was unexpectedly dropped).
TypeOf('array')style definition (for cross-compartment scripts).
- Works with stack trace with column numbers.
- Stabilize self tests around the logger module.
- Normalize serialized result of empty elements.
- Add "UnitTest.XUL Test Runner" item to the list of "Developer" on Australis.
- Add "UnitTest.XUL" menu to the "Tools" menu in the application menu of Thunderbird.
- UxU 1.0.1 (2012.8.7)
dependingAddons) option for test cases. Now you can specify required addons for the test case as an array of ID strings.
- Inherit installed addons to the temporary profile, when the test case has both specified profile and
- UxU 1.0.0 (2012.7.24)
- Support Firefox 10 ~ 16
- Drop support for Firefox under 9
- Add assertions: assert.same() and assert.notSame()
- Check strict equality (===)
- Extend Greasemonkey helper methods
- Support GM_listValues()
- Support GM_deleteValue()
- Add an option "ignoreLastResult" to the TestCase class
- If the option is true, the last result of a test in the test caseis not regarded while checking if the test should be run or not
- Allow users to limit the number of test cases running concurrently from the configuration dialog
- Initialize file fields in the configuration dialog correctly
- Support Firefox 10 ~ 16
- Test Runner
- Now tests results can be filtered by the type of the each test
- Now stack traces are resizable
- Now lines correspond to internal functions in stack traces are displayed in a pale color
- Command Line
- Now tests can be aborted by sending a SIGINT signal
- Add a
- Forces all tests to run regardless of the priority of the each test
- Add a
- Limits the number of test cases running concurrently
UxU is an testing framework for Mozilla addons, based on MozLab. Features:
- You can write testcases in xUnit format.
- Multiple testcases are available. When you specify a folder, UxU collects all testcases from the folder recursively and runs them.
- Many useful features, "yield" which like a "sleep" and number of helper methods, are available for automated test around GUI and deferred page-load. UxU is useful not only for unit testing but for functional testing.
- UxU can test Greasemonkey scripts.
- UxU can run testcases written for MozUnit. UxU's Test Runner GUI is compatible to MozUnit, so you can test your addons by XUL just now.
How to start
Test Runner GUI: "Tools" -> "UnitTest.XUL" -> "Test Runner"
UxU Server, to control UxU from other processes: turn on the checkbox "Server" bottom left of the Test Runner window. You can connect to UxU Server as "localhost:4444" by telnet or other programs. See also How to control UxU from remote?
See How to write testcases for UxU? to study writing rules of testcases.