Skip to Content Skip to Search Go to Top Navigation Go to Side Menu


Archive for October, 2006


Doing a Demo? Don’t Rely on an API


Monday, October 30, 2006

And that’s why automated testing of the integration points are very important!

I’m currently involved in a huge project made of multiple components.
To each component corresponds a project team.
My direct upstream dependency is a web API.

In addition to our own unit tests and system tests, we’ve got a set of test scripts that monitor the features we are using. That includes:

  • validating the supplier API against their own XML Schemas (Relax-NG in our case) for the API calls used in our system
  • If both components use a common set of reference data, a test to check that the data set is the same in the API and in our component

There’s trouble only if the XML Schemas are not updated when changes are made to the API.

As the tests are run regularly we discover changes in supplier’s API quickly. If we don’t have time to make the change in our side (e.g: 5 minutes before a demo) we switch to another instance of the API with the old code (the supplier has a set of rolling instances that guarantees that the previous version of the API is always available on an instance). This is not really applicable with public APIs.

An additional step we have taken is to mock up the results of API calls into static XML. These are normally used for our internal system testing, but if the integration tests with the supplier fails and there isn’t a workable instance of their API, we can switch to the static XMLs (this situation happened once in our project).

This approach will also work with public APIs that output XML like Flickr’s API and Amazon REST service.

Doing a Demo? Don’t Rely on an API: “

Eurobuddy Matt was doing a presentation when there was an API change at GoogleMaps. He’s a quick fella, but I’ve been caught with my pants down.

(Via ONLamp.com.)

40


Sunday, October 29, 2006



40

Originally uploaded by Rija [Pomme::TAB].

A poster of the 40 photos of mine considered “interesting” photos according to Flickr’ s top secret interestingness algorithm.
My personal favourites are not all in there and there are some photos that I don’t like but have been found to be “interesting”.
That’s often true for other people’s photos too.
That’s why I don’t go often to the “Explore” pages of Flickr.

Most of the photos I’ve made a blog post of are from my contact list or from the flickr groups I belong to.
The groups I like to browse regularly include:
Flickr Soup To The Soul, Utata, The world through my eyes, my own West London group and all the London group out there, and so many more …

Sunsprays


Friday, October 27, 2006



Sunsprays

Originally uploaded by Ahmed Zahid.

It’s cold here in England, so let’s share a bit of tropical warmth with this gorgeous photo from one on my flickr contacts.
I particularly like how the sun rays reveals teh details of the leaves, keeping the leaves out of their reach in the dark.
Superb.

Selenium @ CIT


Thursday, October 26, 2006

The first time I was presented Selenium I had the wrong understanding of it.

Few months ago, a group of client side developers organized a talk in our department about testing javascript code. The focus was mainly on jsUnit, but it was also the first time I heard of Selenium. It was presented as an alternative to jsUnit to test client side javascript in a cross-browser way.
For that purpose Selenium acts as a browser plugin that allows one to record his actions on the browser on a particular site and play them back later.
You can also finetune the generated scripts.

In the same time I was starting to think about acceptance testing and automation testing.

Until the Continuous Integration and Testing conference in London, I didn’t realise there was a link between the two.

During that Open Space conference, there was a talk by a guy from Germany.
He was sharing his experience with Selenium for acceptance testing.
Obviously the product he was developing is a web application.
It means that most of features (or business value) are accessible from a web GUI.

This how it became really clear to me that Selenium can work in two way: in addition of the plugin mode for manual record/playback, there’s a driven mode that allow a programmatic control of Selenium. Now we are getting closer to automation :-)
Before going that way, I’ll dwell a bit more on the acceptance testing part of it.
The acceptance tests are the tests that prove the product owner/customer that the software is doing what he has specified. For a web applications, most of the business features are visible on a web interface. Even if for some reasons the business value is invisible (backend features of some sort) it’s often possible to make it exposed on a web interface:

  • On an earlier project one of the requirement was that the system should process data within a ceration amount of time. We build a small web application to expose the cycle duration on a web interface. We used Nagios to monitor this value but we could easily imagine that this information can also be captured for acceptance tests.
  • Let’s say that you’ve been asked to syndicate your data as RSS feeds. You can use Firefox as an RSS aggregator and test the feeds from there.
  • On another project the feature was to import a continuing feed of complex XML documents in a database. The team setup a smart logging and exposed import successes and failure on a web interface.

Now, we can go back to automation.
Selenium can be driven programmatically through a number of platform (java, python, ruby and perl). It uses a component called Selenium Remote Control which is a java server that run on the same platform where a web browser is available.

There’s also a platform dependent API that sensd command to the Remote control using the language of choice.

In perl you can use a CPAN module called Test::WWW::Selenium.

The whole thing becomes really interesting when you combine that approach with the use of FIT (Framework for Integration Testing, which is more than a framework actually), but that’s another story.

Ipod is Five


Tuesday, October 24, 2006

and Joy Of Tech has it in comic strips:

Snatch My Network If You Can


Monday, October 23, 2006

Within an interval of 3 days, The Register has reported two robberies targeted at high profile Telecom/Network companies. Oddity of our time or trend-setter?

snow flakes


Sunday, October 22, 2006


snow flakes

Originally uploaded by Karl’s.

the weather was awful here on Earth today, fortunately there are some natural wonders in the sky as you can see on this fantastic photo.

Torchwood


Saturday, October 21, 2006

Tomorrow starts the new BBC 3 sci-fi series Torchwood.

It’s a spin-off of Doctor Who centered around the character “Captain Jack” from the first new Doctor Who series.

If I understand the algorithm correctly the next Doctor Who spin-offs will be:

Dowchroot, Thoodcrow, Drootchow :-)

If they are going the way of Star-Trek, SG, I would like also to see more cross-over between series. That would be cool.

Even more cool, a cross-over between all BBC series:

  • Seeing a blue police box loudly appearing in the midst of Sherwood forest and a Doctor using its sonic screwdriver to help a slightly too young Robin Hood would be a delight
  • What treat it will be to watch captain Jack hunting aliens in Little Britain
  • Can you imagine the Daleks trashing the glomourous carpet of Hotel Babylon?

Ok, I’ll stop here (can I just suggest the cybermen to pay a visit to that guy in Extras :-D)

Booking Spleen


Saturday, October 21, 2006

I need to book an accommodation for my next holidays which are approaching at an unbelievable speed.

It’s on my To-do-list for a month now, I’ll do that this weekend.

In the meantime here’s a link to illustrate my state of mind in that matter:

http://www.geekculture.org/joyoftech/joyarchives/879.html

A Single Pixel Camera


Friday, October 20, 2006

Interesting concept …

A Single Pixel Camera: “BuzzSkyline writes ‘Scientists at Rice University have developed a one pixel camera. Instead of recording an image point by point, it records the brightness of the light reflected from an array of movable micromirrors. Each configuration of the mirrors encodes some information about the scene, which the pixel collects as a single number. The camera produces a picture by psuedorandomly switching the mirrors and measuring the result several thousand times. Unlike megapixel cameras that record millions of pieces of data and then compress the information to keep file sizes down, the single pixel camera compresses the data first and records only the compact information. The experimental version is slow and the image quality is rough, but the technique may lead to single-pixel cameras that use detectors that can collect images outside the visible range, multi-pixel cameras that get by with much smaller imaging arrays, or possibly even megapixel cameras that provide gigapixel resolution. The researchers described their research on October 11 at the Optical Society of America’s Frontiers in Optics meeting in Rochester, NY.’

(Via Slashdot.)