More possibilities for testing MailNews

A few weeks ago, Joshua added a “fake” news server to the mailnews code base for use during xpcshell tests. This gives us the capability to test newsgroup communication at the protocol level which will help with checking for regressions, and replicating situations where we get communications wrong, or where the server doesn’t do what we expect.

As with all good code, the heart of the fake news server was written generically, and so in about day I wrote a fake SMTP server and initial test case (most of that time was learning about how the protocol worked).

Yesterday, this was committed, so now we have very basic coverage of the news and SMTP protocols within the mailnews basic testing.

I’m already looking at extending the SMTP protocol tests to include authentication tests, and over the next few weeks I hope that we can extend these to POP and IMAP.

If anyone wants to take this on, and help us improve our testing facilities and the mailnews code base, then please get involved, just contact me first so I can co-ordinate any efforts. All you’ll need is Thunderbird or SeaMonkey built from source with –enable-tests and some javascript knowledge.

Address Book Card Addition and Deletion Notifications now work properly (well almost)

In the address book there has been, for quite a while, various problems whilst managing addition and deletion of address book cards to and from Mailing Lists – things like cards not being removed from the display, duplicated cards displayed (but click onto a different address book and back again and it sorts itself out).

With thanks to Siva (from Spicebird), all these problems have now been fixed (with the exception of one remaining problem).

This is an excellent fix and should hopefully reduce at least some of the confusion for users have experienced whilst updating mailing lists, and ensure that we’ve got the right notifications being fired for extensions to pick up on.

The remaining issue we’ll probably take another look at once we’ve got some other back end work done. If you want to try it out then get the latest trunk nightly (at your own risk!) or wait for Shredder Alpha 2/SeaMonkey 2.0 Alpha 1.

Update: So the first time round, we didn’t quite fix everything as expected the duplicate address lists bug wasn’t actually fixed as I thought it had been, and we’d hang a crash when deleting cards/mailing lists (I’m still not sure how we missed those) however, these have now both been fixed in the latest nightlies, and we are currently investigating a fix for bug 434978 which will improve the situation further.