August 10, 2006

An ode to tests

Whenever I take over a software project the first questions I ask are all around tests. What tests are there? Are they automated? Do they run on every checkin? What do they cover?

Tests make software development faster. By fixing the behavior of the system, they allow you to change the system. They define the contract between the software and the outside world and allow you to make changes to the system without breaking your contract.

Automated tests are the key to adaptive software development and a requirement for any software shop.

Contract driven communication

Pete, Manoj, Alex and I went for coffee today. It was just after we had spent a couple hours testing the new version of Salesforce.com that we are getting ready to deploy. One of the topics that Pete has been talking about lately is contract driven services, should they be client driven or server driven?

He had a key insight today which is: although our service is server contract driven, our query languages (SOQL/SOSL) force/allow clients to declare what data and fields the client is interested in. "SELECT * FROM account" is illegal, but "SELECT id,name FROM account" is legal.

So clients must declare what data they are interested in. The server defines the total space of data but the client can protect itself from additive changes to the data objects by directly requesting the objects and fields.

So we have a very flexible client driven, server declared contract system.