Saturday, April 08, 2006

Tests !


checking in tests :-)

Finally got tests for all parts of the application now. I was not testing the controllers directly as info from the client was being sent to the server using JSON objects and I was not sure how I was going to test this. Just got this working B-)

Must say its much much better when you can implement a feature completely using tests before you even hit the UI. And as a 'side effect' you have the tests which will tell you when you break something by mistake.

Till Rajesh pointed out, I was building the application UI downwards. For example, saving of a route, I got the UI aspects (the markers, the Lightbox) working first and then put in the code for the actual saving on the server.

... a small change in thought ...

and this has changed our approach to building the application backend upwards.

Wanted to introduce the concept of a Road into the app. I wanted the ability to save info on the 'road' between two markers. So started from the server side. Got tests which checked for how Road objects were saved and brought up and their relationships (unit tests). Then started on what information the server would expect from users when they save a road and wrote tests around the saving of roads with that information (functional tests). Still no UI. But the feature is in place. Now just need to write up the UI and the whole thing plugs into place.

Beautiful

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home