Developing using 3rd Party REST Servers

I have found it  imperative to create a suite of integration/functional tests for each 3rd party REST site you use in your app. (Facebook, Flickr, Bebo, etc) These should ideally represent the set of API functions that your app is using for each API. You should create test users and data for the sites. Then, when you app goes wonky, you should fire off these tests BEFORE you begin wasting your time looking for a bug in your code.

Ideally, the 3rd party sites would provide status pages that continually hit their own API’s and show the problems to us and them. Put some RSS feeds on that page, and you have a nice alert system. But none of them bother to provide that.

Ultimately, I want to add these tests into a continuous build system, like Hudson, so that I can get alerted within a short timespan when one of the services I depend on goes down. In addition, I’m thinking this should trigger an automatic update to my web app. Probably a warning on my site and support forums  that states that features using site XYZ are not behaving properly as of XPM on a given date.  Even better (though more risky?), if the failure shutdown functionality depending on that failed REST server until it passed my integration tests again. This would also show a message to  users and also alert the developers.

At a bare minimum though, setup your own tests, and be ready to run them at a moments notice. It will save you a lot of grief and wasted debugging.

This entry was posted in Tips. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *