Required Slide. SESSION CODE: DPR302. Behavior Driven Development in the Real World. David Starr Pluralsight Instructor ALM Consultant Visual Studio ALM MVP. email@example.com Blog: ElegantCode.com @ elegantcoder. In This Session. Conversations About Software
This isn’t what I thought
we agreed on.
As a <application role>
I want <some feature or behavior>
So that <I get some benefit>
Given <some initial context>
When <this happens>
Then <this should be the result>
Desirements are things we wish the software did.
But it doesn’t. Yet.
Story: Remove Item From Shopping Cart
As aCustomer with Products in my Cart I wantto remove an ItemSo I canchange my mind about buying it
Scenario: Multiple Items in CartGiven a Cart with multiple Items in itWhen 1 Item is removedThen the other Items are still in the Cart
And the Cart Item Count is correct
And the Cart Subtotal reflects the remaining Items
UI Element Behavior
Expressing requirements such that they are also tests
Because Microsoft Word documents can’t prove software works
var cart = new ShoppingCart("TEST");
= () =>
Complete an evaluation on CommNet and enter to win!
You can also register at the North America 2011 kiosk located at registrationJoin us in Atlanta next year
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.