Babak Esfandiari wrote:
Hi,

Any tips as to how to unit-test Firefox extensions? I know there are a few Javascript unit-testing frameworks around, but how would you use them in the context of a Firefox extension? And would you use any particular development environment for such a task?

I'm just starting to move to doing this for testing of some of my code with JSUnit.

http://www.mozdev.org/source/browse/annozilla/service/tests/testLocalServer.html?rev=1.1&content-type=text/x-cvsweb-markup

This is for an XPCOM component, so the testing is of the public interface. (The testLocalServer function should be split into separate functions though.)

How you test depends on what you're testing. You may need to refactor your Javascript functions for better testability.

Testing of XUL is much harder of course.

Matthew Wilson

_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to