-- we’ll get to it later We need to get this feature out NOW -- let’s fix that in the next release #TODO Not sending local changes to be merged upstream • • • • “If the debt grows large enough, eventually the company will spend more on servicing its debt than it invests in increasing the value of its other assets.” Steve McConnell
Architecture Architecture Construction Construction System Test System Test Post-release Post-release 0 20 40 60 0 0 20 20 40 40 60 60 Phase of Development Phase of Development Cost (times) Cost (times) Cost to Fix a Defect Steve McConnell, Code Complete
later Over time, you’ll forget what it the function did Writing tests first leads to more-easily testable code Tests can be used as specifications Immediate feedback -- “Am I done yet?” • • • • •
that the TDD teams produced code that was 60 to 90 percent better in terms of defect density than non-TDD teams. They also discovered that TDD teams took longer to complete their projects—15 to 35 percent longer. http://research.microsoft.com/en-us/news/features/nagappan-100609.aspx
to the right page? Was the user successfully authenticated? Was the correct object stored in the response template? Was the appropriate message displayed to the user in the view? • • • • •
that stakeholders can read/write. • "BDD is a second-generation, outside-in, pull-based, multiple-stakeholder, multiple-scale, high-automation, agile methodology. It describes a cycle of interactions with well-defined outputs, resulting in the delivery of working, tested software that matters." Dan North aka: Test what the user/stakeholder sees and how they interact with the application. •