Skip to content

Test Driven Development (1 day)

Traditional, non-agile development approaches separate development into distinct analysis, design and coding phases. The underlying assumption is that the cost of change increases rapidly over time, so it is important to make design decisions as early as possible. Unfortunately, subsequent experience with the problem domain and the implementation technology often shows us that our design decisions weren’t optimal, and would have been better if we had made them later.

Agile development approaches implement practices that keep the cost of change low and help us defer design decisions. Test Driven Development is one of these practices, based on two simple rules:

  • Write new code only if you first have a failing automated test
  • Eliminate duplication

This one day course focuses on three areas:

  • The development of a simple application using pure test-driven development
  • Demonstration of more complex testing patterns, including Mock Object and Self Shunt
  • Discussion and demonstration of difficult testing issues, including the testing of database, GUI and web applications.

During the day we will look at these concerns:

  • The balance between emergent and upfront design
  • The relationship between modelling and test driven development
  • Common patterns of test driven development
  • Improving testability using dependency injection
  • The differences between state and interaction testing
  • The importance of test coverage

There are also ample opportunities for attendees to get hands-on experience with test driven development using open source Java development tools.

This course has been successfully presented to a number of customers in Australia, including Suncorp-Metway, IBS and Opcom. It is offered as a public course by Software Education, and was also part of the public schedule of Software Engineering Australia, Queensland (now part of Object Training).

The slides for Test Driven Development are available under a Creative Commons license.