views:

109

answers:

3

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.

A: 

WebDriver or Selenium?

dmazzoni
Doesn't really satisfy the unit testing need. The tools mentioned and the one I mention in my question are at a higher level than what i'm looking for. I'm looking for approaches people use for code-level unit testing.
jpcamara
+3  A: 

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

Dominik
that looks exactly like what i'm looking for! thanks for your help!
jpcamara
+1  A: 

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.

Oleg Mazko