Search For Knowledge

Google

Monday, July 23, 2007

Xtreem Programming or Xtreem Testing

At STAREast 2007, James Bach told a story of a project he once worked on. The project’s methodology was somewhat traditional, in the sense that developers wrote code and testers then performed inspective testing of the application. James found numerous bugs, reporting them back. This seemed to cause the programmer some frustration. James told of the programmer complaining… “why don’t you just tell me what tests you’re going to do and I’ll make sure that the code passes them before I give it to you?”

I liked the story… I now use it to explain something to the teams I work with.

After telling the story, I ask “What if we could tell the developer what tests we’re going to do in advance”?

This is exactly the opportunity presented in the development element of extreme programming where implementation is driven by Acceptance Tests. The key difference is that the process of ‘telling the programmer what tests the code needs to pass’ is a collaborative activity. The Acceptance Tests are arrived at in collaboration between tester, programmer and the customer.

This way, when we get the code, we know that all ‘reasonable’ tests that we can think of are accounted for in advance and (ideally) automated.

Because we are human and time is limited, there will always be tests that we simply can’t be expected to think of in advance. This is where Exploratory Testing comes in handy. By interacting with the application we realise what previously unaccounted for behaviours have been enabled by our development efforts.

Sometimes the outcome of these behaviours is highly undesirable… i.e. bugs. I simply think of these bugs as ‘gaps in our collective thinking’… gaps that we identify as additional tests that reveal a new User Story - that we implement soon after in a subsequent iteration. If it is urgent enough, ‘the team’ (programmers, testers etc) and ‘the customer’ may decide to implement it immediately, instead of work we’ve already planned in the current iteration. With short 1-2 week iterations, it’s gotta be pretty darn urgent before that happens.

No comments: