TDD in Scrum
I am part of a team that started using scrum a while back and is now looking at moving development to be test driven. We have been having conversations about how TDD fits into the scrum framework and we haven't been able to find a good answer or best practice after searching. We run 2 week sprints with the usual mix of daily scrums, planning poker, sprint review and retrospective. We also use TFS to track our PBIs and soon test cases. Our main area of uncertainty revolves around when exactly should tests be designed and by who?
One theory is that it should be part of the sprint planning meetings and done as a group for all PBIs in the sprint. Some team members worry this might add too much time/overhead to this planning meeting and think instead we should do our regular planning meeting and establish clear acceptance criteria for each PBI and then throughout the sprint as a developer picks up tasks to work on he will create the test cases at that time.
If anyone has experience with this and could give me some pointers on best practices and what has worked well or hasn't worked well in their experience I would greatly appreciate it.
Hi there,
we started to use TDD approach three weeks earlier, unfortunately we didn't have a dedicated test role in development team so we make the developer with assistant from expert tester to act as team consultant. one of our goals to force developer to design the solution first and coded it later. so we tell every developer when he estimated effort for
item from backlog he must took in consideration the time of test design, solution design, coding, test running, and code refactoring. the estimation was hell in cell, it is very difficult to estimates all that activities, the test design and verifying it, took a lot of developer time. but the TDD approach make the developer coding in less time than before, because now he know all the expected scenarios from the item.
The Scrum guide says the following related to this topic:
"...enough work is planned during Sprint Planning for the Development Team to forecast what it believes it can do in the upcoming Sprint."
The team doesn't have to write all test cases up front during sprint planning in order to forecast what they can accomplish within the sprint. Having a general discussion about how to test each PBI would be beneficial during the sprint planning. I recommend that since your team is new to TDD that you have the scrum team work together during sprint planning to write the test cases for the first PBI. Based on that experience they'll be more comfortable to forcast what they can get done within the sprint and be able to work on an individual basis during the sprint to write the test cases for the remaining PBIs as they get to them.