Skip to content. | Skip to navigation

Sections
Personal tools
What is this?
Hi, my name is Tom Lazar and I'm a Plone and Zope developer based in Berlin, Germany and this is my personal and professional (no big difference, really...) website.
 

piktipi-sprint

Jun 04, 2007

Log yer Testruns!

From the not-invented-here-department

Running tests is timeconsuming ("no shit, sherlock") and the only thing worse than waiting for them to finish is to wait for them more than once. That's why I've adopted the practice of logging all of my testruns by redirecting them to a log file. That way I can easily compare older test runs with those after making a code change (without having to repeat the first run after reverting that change).

Of course, these days there's not really much of what I do with Zope and Plone that witsch won't improve upon and in this case he came up with the following neat bash snippet that offers two advantages over a simple redirect: you still get the 'live' output of the testrun as it happens and it automatically names the log file after the current time. In fact, it behaves just as a normal test run, except with the added bonus of having a date-searchable archive of all your test runs...

./bin/instance test -s Products.PRODUCTNAME -v -v 2>&1 | tee tests-$( date +"%Y%m%d%H%M" ).log

Oh, and the -v -v parameters give you a nice little summary of all failing tests at the end of the run.

Happy testing!

Jun 03, 2007

Google Groups permalinks with Quicksilver

Quickly create permalinks to Newsgroup or Mailinglist posts using Quicksilver and Mail.app

Want to link to a newsgroup or mailing list post? Sure you can search for it in GMANE or Google Groups and then copy and paste the resulting URL. But here's a quicker way using Quicksilver courtesy of Florian Schulze a.k.a. "the guy currently sitting next to me at the PIKtipi sprint" (who also needs to get a blog of his own...)

First, make sure you have the "Websearch Module" installed:


Next, open this URL in Safari(!) and add it to your Bookmarks, giving it a name of, say, Google Groups MSGID Search.

Then, to search for the message reliably, copy its message id onto the clipboard by pressing Apple=Shift-U when viewing the message in Mail.app:



Now, simply invoke Quicksilver, type the keys necessary to invoke the bookmark you created (in my case typing GGR does the trick):


press tab twice, paste the id and hit return - voila... you will be taken to the page with the message: