Archive for April, 2006

Canadian software developers

Saturday, April 22nd, 2006

Mark Skapinker, in this post:

And remember, productivity here is high because its too cold to go outside anyway……

Unit Tests for Extensions

Wednesday, April 19th, 2006

Back in January, Matt @ AllPeers sent me a pointer to his unit test harness, foxunit. I finally got around to playing with it the other day, and I wrote a small set of simple unit tests for the sample extension. I even created a screenshot of the run results.

I liked how easy it was to create, edit, and run the tests – hitting refresh reloaded the test files from disk, which is a big win. I also liked looking at the failure output in the main browser window.

I ended up putting my setup code in the common section, because it didn’t work when I put it in the setup section. Matt has a note that setup and teardown don’t work right, and I guess that is what I was tripping over.

I copied some of the code from jssh’s debug helper file, mostly so that I could run the tests in both jssh and foxunit.

Changes I’d like to see:

  • use files, or a hierarchy of files, instead of xml, to hold the javascript code. If I were to write lengthy test code, I’d probably cut and paste it between the xml files and a code editor in js mode. Having the js code in a separate file would eliminate this step.

  • copy the assert function names used by xUnit test harnesses. If we are going to have a number of test harnesses available, I’d like tests to be as portable between them as possible.

  • unattended run mode – a command-line switch that would read in a set of tests, run them, write the results to a file, then exit. Perfect for adding to a tinderbox test section, or other CI setup.

I’m going to crosspost this to mozilla.dev.quality – please feel free to continue the discussion in that forum.

Firefox 1.5.0.2 out the door

Friday, April 14th, 2006

I’ve spent the past two weeks with my time evenly split between being heads-down with this release and dealing with some sort of bad bug that gave everyone in the family a bit of a fever.

Next week, I plan on diving in to a bunch of projects, mostly centered on developer testing tools. One of the cooler projects, in my opinion, is writing tests for the sample extension Eric Shepherd is creating for MDC.

LazyWeb question – How do I get a list of all the installed extensions? One of the first tests will be to verify that the extension is installed . . .