Deferring Postfix delivery

Sometimes it's handy to have your gateway email server accept all messages but not deliver them out. I sometimes need this when testing that a big mail out to clients isn't going to have embarrassing consequences.

If you're using Postfix this is easy; use the defer_transports setting. To hold all mail use

defer_transports = smtp

in main.cf.

To trigger delivery use sendmail -q. Very useful.

posted: Wed, 06 Sep 2006 11:17 | permalink | comments

Selenium at London 2.0

I went to the regular London 2.0 meetup last night. Great people, interesting conversations and a little too much beer.

One of the Selenium developers, Jason Huggins demoed Selenium and Selenium-IDE on a Macbook notebook running the Parallels virtual machine software. He had several virtual machines running different platforms including Ubuntu Linux, Windows XP and Mac OS X with different browsers on each. Testing was triggered by checking in code to the SVN repository of Buildix virtual machine also running on the laptop.

When a check-in occurs the code is automagically tested on the browsers running on each of the browsers running on the different platforms in each virtual machine. The beauty of selenium is that the tests run inside the browser so your interface is tested just as it is used. All your JavaScript runs and works as for the end user. I loved the fact that all the browser sessions are captured to a Flash movie so that if a test fails you can watch the footage of the steps leading up to the failure.

The crux Jason's demo was that you could have a complete multiplatform web application test system running on a bottom level Macbook laptop (with extra RAM). The machine appeared to run very quickly despite the 5 or 6 VMs that were running. Jason mentioned that if you don't care about Mac browser testing (Safari) then you could set up a similar system using VMWare or Xen on Linux or Windows.

Selenium-IDE also looks seriously cool. It's a Firefox plugin that provides a complete environment for developing test cases. It can record your steps as you use a web interface and output to a variety of test script formats including a HTML stype sequential output, Python and Ruby. If using Python or Ruby scripts you can use all the features of the language such as conditions and loops. Selenium-IDE is going to make developing effective complete web tests so much easier (and fun!).

We need to start looking at this where I work. Our current web interface tests use Twill which works ok but has many shortcomings. Creating test cases is tedious, the JavaScript parts of the UI aren't tested at all and there's no testing of cross-browser support. Our UI is using more and more JavaScript so something like Selenium is going to become vital. I'm looking forward to using it.

Tags:
posted: Wed, 06 Sep 2006 09:47 | permalink | comments