TDD As If You Meant It

Keith Braithwaite (Zuhlke Engineering)

Worktorial

60 minutes

You Will Need: A laptop with a suitable Java or .NET IDE and a unit testing framework (e.g., JNunit, NUnit)

Process:

Part A

45 minutes: do a bit of programming. A simple problem will be presented. Attendees solve it working in pairs, with the navigator VERY strictly enforcing this micro-process:

1) write exactly ONE failing test

2) make the test from (1) pass by first writing implementation code IN THE TEST

3) create a new implementation method/function by:

3.1) doing extract method on implementation code created as per (2), or

3.2) moving implementation code as per (2) into an existing implementation method

4) only ever create new methods IN THE TEST CLASS

5) only ever create implementation classes to provide a destination for extracting a method created as per (4).

6) populate implementation classes by doing move method from a test class into them

7) refactor as required

8) go to (1)

Part B

15 minutes:

What happened there? Any interesting observations about the resulting design?

 

About The Presenter:

Keith Braithwaite is a Principle Consultant with Zuhlke Engineering, and leads their Center for Agile Practice in London. He provides Agile training, consultancy and mentoring to development teams in the wholesale finance and mobile telecoms industries.

Previously he was Head of Technology Solutions for the ASIA-PAC region of WDS Global, and co-authored the first published descriptions of successful distributed Agile based on his experience there. He is a frequent speaker at Agile conferences around the world.

 

 

© Jason Gorman 2008