I have recently written some documentation about how to write automated tests for Firebug (possibly even for Firebug extensions) and also how to run an official Firebug test suite. Here is a quick summary and a few links.

Firebug Test Doc Home
Running Automated Test Suite
Test Examples
Test API

Running Automated Test Suite

Running the official test suite is as easy as installing Firebug and FBTest (Firebug) extension.

At some point (I hope in FB 1.6), the FBTest extension will be part of Firebug developer build (with an 'X' in the name) so, running tests should be even easier.

To execute all tests:

  1. Open Firebug Test Console. Pick menu Tools -> Firebug -> Open Test Console.
  2. Put http://getfirebug.com/tests/content/testlists/firebug1.5.html URL into the URL bar (should be there by default).
  3. Press Run All button on the toolbar.

There are some tests that require Firefox 3.6 so, the recommended configuration (to see all green) is:

  • Firefox 3.6
  • Firebug 1.5

Please let us know if you see failing tests.

In order to create additional source of information for Firebug contributors and extension developers, there is new API Reference documentation generated from Firebug source code.

The source code processing is made by js-doc-toolkit, which is an extensible doc generator for JavaScript, supporting its very specifics.

Comments are based on JavaDoc like syntax and using tags like e.g. @param (check out complete list of default tags). Firebug also defines its own specific tags like: @module, @panel, @domplate that help to match its specific architecture features.

Read more...