quasi-survey on writing mozmill tests for thunderbird

Andrew Sutherland asutherland at asutherland.org
Thu Mar 17 17:59:07 UTC 2011

On 03/17/2011 07:12 AM, Joshua Cranmer wrote:
>> - How hard is it to debug a test?
> IIRC, some exception failures weren't properly caught by mozmill, 
> which required lots of dump statements and try/catch blocks to 
> actually figure out what was going on.

I know it's probably fuzzy, but can you elaborate on this?  
Specifically, how long ago was this, and is it possible this is one of 
those "XPConnect eating exceptions" things (which we can mitigate 
slightly via preference; things can end up much more chatty, but it's 
likely worth it for the testing situation)?

> It would be swell if we [1] could integrate the fake servers into 
> mozmill.
> As a postlude background: my first and so far only experience with 
> writing mozmill tests is in trying to verify the correctness of the 
> news URI handling, as I discovered a few regressions in the 
> command-line URI handler for TB. (Actually, I'm not sure how things 
> manage to work right now, which really confuses me, but that's beside 
> the point). This means that a large portion of my work was spent 
> trying to figure out how to get the fakeserver stuff to truly work 
> with mozmill... which doesn't work so well, as you might imagine.

Was the fake-server code trying to spin its own nested event loop?  
While I think it would be preferable to have the fake-server running in 
its own dedicated thread (basically impossible with recent XPConnect 
changes) or own process, it seems like the mozmill test environment is 
roughly equivalent to the xpcshell environment, except that mozmill 
spins nested event loops all over the place and thus it's not safe for 
any other code to do the same unless the mozmill environment is prepared 
for it and able to transfer control to some other testing function (like 
we do for modal dialogs).


More information about the tb-planning mailing list