Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit Testing a Firefox Addon

In working on a firefox addon, i've found the task of unit testing to be kinda janky and difficult to setup. Anyone have recommendations on how to setup unit tests for an addon? Any tools or additional addons found to be helpful?

I've found Mozmill [ https://addons.mozilla.org/en-US/firefox/addon/9018 ], which I think will be useful to an extent, but it's more of a high level tool and i'm looking for a tool or approach that works for more low level testing.

like image 408
jpcamara Avatar asked Dec 31 '09 03:12

jpcamara


2 Answers

How about UxU ( https://addons.mozilla.org/en-US/firefox/addon/6357 ) ?

like image 81
Dominik Avatar answered Oct 15 '22 13:10

Dominik


I used code-level unit testing with Mozmill. I "hooked" resource:// path of Mozmill by programmatically adding testing add-on (Urim) path to it in test initialization (setupModule function). As the result i can test any peace of code of my testing add-on like it is own code of Mozmill. Look here for an example. As i understand, this is you are looking for.

like image 45
Oleg Mazko Avatar answered Oct 15 '22 12:10

Oleg Mazko