BCS SPA2015

Software Practice Advancement Conference

SPA Conference session: Recycling tests in TDD

One-line description:A workshop introducing a new technique to add to your TDD toolbox.
 
Session format: Workshop 150 (75 possible) [read about the different session types]
 
Abstract:It's not always easy to know which test to write next in TDD and some problems make this harder than others. In this session I will introduce you to a small problem that I find often causes difficulty. We'll work through this in pairs and do a retrospective on why it was hard to TDD (or what you did if you found it easy).

Then I'll introduce you to a way that I've been practicing that I've been calling "test recycling". I'll ask you to try the problem again using this technique, and we'll do another retrospective to compare.

I hope to add a new technique to your TDD toolbox and learn new techniques from you.



Rationale:
TDD is hard to teach and hard to learn. This workshop aims to discover if by relaxing one of the implicit restrictions in the TDD mantra (write a failing test, get test to pass, refactor) this becomes easier.

It is my belief that test recycling leads to looser coupled tests, that more naturally specify behaviour rather than implementation details. I hope this session will give feedback on this belief.

"Recycling" - modifies the first step of the traditional TDD cycle from "Write a failing test" to "Write a failing test or modify an existing test". I have found that this helps in situations where people find the next step hard to identify.

Objectives:
Goals of the session.
� Get consensus about whether this is a useful technique
� Refine description and motivation of technique
� Identify other techniques during first retrospective (and write them up if appropriate)
 
Audience background:Programmers, testers - anyone that can do simple tasks in a development environment
 
Benefits of participating:Learn a new TDD technique, and possibly help in the discovery/dissemination of others.
 
Materials provided:None (except kata description)
 
Process:Hardly any slides.
Pair programming TDD exercise using attendees own laptops (any will do).
Either use their own dev environment, or Cyber-Dojo if WiFi sufficiently good.
 
Detailed timetable:Session content and organisation
00:00 - 00:20 Short introduction to recycling & kata
00:20 - 01:00 Pairs use traditional TDD and/or recycling to develop a solution to the kata
01:00 - 01:15 Retrospective
01:15 - 01:30 Demonstration of a recycled approach
01:30 - 02:00 Pairs redo kata using recycling
02:00 - 02:20 Retrospective & alternative approaches
02.15 - 02:30 Wrap up & write up

By limiting discussion and removing the second kata this session could be delivered in 75 minutes.
 
Outputs:� Get consensus about whether this is a useful technique
� Refine description and motivation of technique
� Identify other techniques during first retrospective

Write up all above & publish on my blog and SPA website (if appropriate)
 
History:Based on a blog post of mine that generated some interest. Proposed for other conferences, but no response yet.
 
Presenters
1. Seb Rose
Claysnow Limited
2. 3.