When planning a 2-week iteration in the past I have taken a user story:
- Story: Rename a file
And broken it into tasks which were then estimated in hours:
- Story: Rename a file
- Task: Create Rename command (2h)
- Task: Maintain a list of selected files (3h)
- Task: Hook up to F2 key (1h)
- Task: Add context menu option (1h)
I would then pick a task to work on, and track the time spent on working on it. I would then repeat the process with another task. At the end of the iteration I could look at the time spent on each task, compare it to the estimation and use this information to improve future estimations.
When working entirely driven by tests, the only work that is clearly defined ahead of time are the acceptance tests that kicks off development and, on a user story that covers a large amount of work, the scope of an acceptance test can be too broad to give a good estimation.
So I can take a guess at the tasks that will end up being completed (as before), but the time spent on them is far more difficult to track as the tests make you work in tiny vertical slices, often working on a bit of each task at the same time.
Are there any techniques I could employ to give more detailed estimations and accurately track time when performing TDD? I am using TargetProcess which encourages splitting of user stories into tasks as outlined above, so keeping things in that format would be helpful.