Problem: Iterations imply incremental developmentChange can result in a negative feedback loop - ENTROPY: The Agilist’s DilemmaWe have to address this. It’s not easy, until it becomes easy. At first, we’d rather not check the oil…
This is how we usually see our software. We point-click-type-point-click-type.Anything wrong with this?SlowDifficult to set upNumerous failures from one defect, & Failures do not identify the defectSoftware has to be DONE FIRST!
Codified by Kent Beck.From his XP practices.Led to automated unit-test frameworks and refactoring tools.Adapted by Agilists into two distinct practices.
Imagine if you could get past the UI and snoop around anywhere within the system? What would you do with your newfound freedom? Test what’s important. This is not unit-testing. Think of it as conceptual coverage. What if you didn’t know (or care) what section of CODE you’re testing, but what STORY (BUSINESS VALUE).Not “Test the database” but “Test that user data gets stored safely and accurately.”Not “test the 3rd party web service connection” but “Test that we interact correctly with our partners.”You don’t have to imagine. Such tools exist.
This is an example in Cucumber. <pause>Cucumber allows you to express acceptance tests (examples) in natural language. The team will have to eventually settle on some common syntax and terminology. Effectively, Cucumber helps the team build a Domain-Specific Language, particularly if they work to express the essence of the test, without excessive concern for technological limitations. You may be wondering “How in the world are we going to automate this?!” If so, I’m going to ask you to suspend your disbelief. Other training modules will cover the details of what we need to do to get this to work. Suffice it to say that it will be much easier than you may think.
NW story: Can’t do TDD, they haven’t even figured out unit tests yet!
TDD is easier.My personal goal is to show you Robbie’s point of view. Perhaps you’ll make it your own.
Does TDD Work?Microsoft and IBM…Also, “approximately 40% fewer defects” Laurie Williams for ACMdefect rate is considerably lowerfuture enhancements easierin a dynamic market. defects quickly detected
Story 15 years old, at least (Phoenix).Truck stuck.Fire dept and others arrive and try to figure out what to do.Anecdotally, a young man walks up and says “Why not deflate the tires?”Developers can think about a problem and come up with a possible solution.BUT…first specify the question (Jeopardy-style)
A habit…We still use when times are tough…Because we know there is a long-term benefit.Habit: 30-days, support-groupBenefits org, team, individualDiscipline prevents regret (debt).
SolutionFastRepeatable resultsBetter than…
Simple, emergent design.Kent Beck.
Weinberg’s “Are Your Lights On?” Golden ______OTIS2 data conversionOTIS2 “GUI” conversionDenali Internationalization
Roadblocks to AdoptionDevelopers skip refactoring, don’t spend the minute to look for and clean up a new bit of code duplication.Inexperienced coaches who confuse the developer-style TDD with the team ATDDManagers waffling over the use of TDD, which limits its effectiveness…and others.
One Analogy for the DesignThe suite of tests preserves all prior behavior while we address design, allowing for Emergent Designs
AnAnalogy for theProgrammer:Each test remains as an individual investment in the behavior and the quality of the design
Page 12<br />Cucumber/JBehave/…<br />Feature: Search courses <br />As Bart Bookworm, I get a free BookClub book for every three BookClub selections I buy in a month. Cheapest book wins.<br />Scenario: During a single shopping experience<br />Given I am Bart Bookworm<br />And I select “Hitchhiker’s Guide” for $11.95 from the BookClub<br />And I select “Star Wars” for $3.95 from the BookClub<br />And I select “Neutron Star” for $4.50 from the BookClub<br />And I select “Across Realtime” for $6.50 from the BookClub<br />When I view my shopping cart <br />Then the discount for “Star Wars” is $3.95 <br />