You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
janodvarko edited this page Nov 11, 2014
·
7 revisions
Learn how to write unit tests for Firebug code base.
Running Firebug Test Suite
The first thing you want to usually do before implementing a new test is setup your test environment and run the existing test suite to make sure all is up and running.
Make sure you have an updated copy of Firefox Nightly installed.
Make sure you have npm & jpm installed. Read instructions.
Install Firebug's dependencies by running npm install in the source directory (created in step 1).
Run tests using jpm test -b nightly -v in the source directory.
Travis
Firebug repository is integrated with Travis. You can see the build status here.
Addon-httpd
Firebug uses addon-httpd module (see devDependency in package.json) as HTTP server for tests (see MDN).
JPM Tips & Tricks
In order to run only specific tests use --filter=FILENAME[:TESTNAME]. This only run tests whose filenames match FILENAME and optionally match TESTNAME, both regexps. For example: if you specify --filter data, then jpm will only run tests in those modules whose name contain the string "data".
Use --do-not-quit to avoid closing the browser window after test finishes. This is especially useful when you want to check the browser console for errors (and you need time).