48
Powered by People in Slippers! BDD Explained Through Real World Examples Todd Brunia - @BruniaTodd Cecil G. Williams - @cecilgwilliams

BDD Explained Through Real World Examples

Embed Size (px)

Citation preview

Page 1: BDD Explained Through Real World Examples

Powered by People in Slippers!

BDD Explained Through Real World Examples Todd Brunia - @BruniaTodd

Cecil G. Williams - @cecilgwilliams

Page 2: BDD Explained Through Real World Examples

Powered by People in Slippers!

HELLO my name is

Cecil HELLO

my name is

Todd

Page 3: BDD Explained Through Real World Examples

Powered by People in Slippers!

✔ AND

Page 4: BDD Explained Through Real World Examples

Powered by People in Slippers!

Customer Team

Page 5: BDD Explained Through Real World Examples

Powered by People in Slippers!

http://blog.bughuntress.com/automated-testing/automated-testing-with-behavior-driven-testing

Page 6: BDD Explained Through Real World Examples

Powered by People in Slippers!

Page 7: BDD Explained Through Real World Examples

Powered by People in Slippers!

Page 8: BDD Explained Through Real World Examples

Powered by People in Slippers!

Page 9: BDD Explained Through Real World Examples

Powered by People in Slippers!

Page 10: BDD Explained Through Real World Examples

Powered by People in Slippers!

Page 11: BDD Explained Through Real World Examples

Powered by People in Slippers!

®

© Copyright Zuffa LLC

Page 12: BDD Explained Through Real World Examples

Powered by People in Slippers!

HELLO

BA BA HELLO

BA QA HELLO

BA Dev

Page 13: BDD Explained Through Real World Examples

Powered by People in Slippers!

Julie Lucas - Principal Interaction Designer, Building Performance Analysis, Autodesk, Inc. http://autodesk.typepad.com/bpa/2013/04/know-your-user-designing-with-personas.html

Page 14: BDD Explained Through Real World Examples

Powered by People in Slippers!

Specifications Glue Code Production Code Personas

HELLO

BA BA HELLO

BA QA HELLO

BA Dev

Page 15: BDD Explained Through Real World Examples

Powered by People in Slippers!

Page 16: BDD Explained Through Real World Examples

Powered by People in Slippers!

Dr. Mitchell

Specifications Glue Code Production Code Personas

Page 17: BDD Explained Through Real World Examples

Powered by People in Slippers!

Specifications

Page 18: BDD Explained Through Real World Examples

Powered by People in Slippers!

Glue Code

Page 19: BDD Explained Through Real World Examples

Powered by People in Slippers!

Glue Code

Page 20: BDD Explained Through Real World Examples

Powered by People in Slippers!

Page 21: BDD Explained Through Real World Examples

Powered by People in Slippers!

Ursula Underwriter

Lenny Lender

Specifications Glue Code Production Code Personas

Page 22: BDD Explained Through Real World Examples

Powered by People in Slippers!

Specifications

Page 23: BDD Explained Through Real World Examples

Powered by People in Slippers!

Specifications

Page 24: BDD Explained Through Real World Examples

Powered by People in Slippers!

Specifications

Page 25: BDD Explained Through Real World Examples

Powered by People in Slippers!

Specifications

Page 26: BDD Explained Through Real World Examples

Powered by People in Slippers!

Page 27: BDD Explained Through Real World Examples

Powered by People in Slippers!

Page 28: BDD Explained Through Real World Examples

Powered by People in Slippers!

Admin User

Specifications Glue Code Production Code Personas

Page 29: BDD Explained Through Real World Examples

Powered by People in Slippers!

Feature: Login As an Admin I want to be able to log in and out of ARMs So that I can access my ARMs account securely Scenario: Login as admin Given the user admin exists And the user is on the login page When admin authenticates with valid login information Then admin should see his user information in the badge on the home page Scenario: Log out as admin Given admin is logged in at the home page When admin clicks log out on the home page Then the user should be on the login page

Specifications

Page 30: BDD Explained Through Real World Examples

Powered by People in Slippers!

Glue Code

Page 31: BDD Explained Through Real World Examples

Powered by People in Slippers!

Glue Code

Page 32: BDD Explained Through Real World Examples

Powered by People in Slippers!

Programmer

Specifications Glue Code Production Code Personas

Page 33: BDD Explained Through Real World Examples

Powered by People in Slippers!

Specifications

Page 34: BDD Explained Through Real World Examples

Powered by People in Slippers!

Specifications

Page 35: BDD Explained Through Real World Examples

Powered by People in Slippers!

Glue Code

Page 36: BDD Explained Through Real World Examples

Powered by People in Slippers!

Page 37: BDD Explained Through Real World Examples

Powered by People in Slippers!

Page 38: BDD Explained Through Real World Examples

Powered by People in Slippers!

Technician

Specifications Glue Code Production Code Personas

Page 39: BDD Explained Through Real World Examples

Powered by People in Slippers!

<Button  DockPanel.Dock="Top"  Content="CALIBRATE  SPAN"    Command="{Binding  CalibrationViewModel.CalibrationCommand}"    HorizontalAlignment="Center"  Focusable="False"  Margin="5"      Padding="15,2">  

Page 40: BDD Explained Through Real World Examples

Powered by People in Slippers!

Feature: CalibrateTheInstrument As a Technician, I want to calibrate the instrument So that the instrument will operate properly

Scenario: Instrument Calibration Given Technician starts the application And Technician views the instrument configuration When Technician invokes an instrument calibration Then Technician should see the calibration status message "Calibration in progress . . ." And Technician is unable to invoke a calibration again When Technician waits 15 seconds Then Technician should see the calibration status message "Instrument Calibrated"

Specifications

Page 41: BDD Explained Through Real World Examples

Powered by People in Slippers!

using  AcceptanceTests.Personas;  using  TechTalk.SpecFlow;      namespace  AcceptanceTests  {  

 public  class  CalibrateTheInstrument    {  

         private  Technician  _technician  =  Technician.GetTechnicianInstance();                [When(@"Technician  invokes  an  instrument  calibration")]            public  void  WhenTechnicianInvokesAnInstrumentCalibration()            {                    _technician.InvokeInstrumentCalibration();            }      namespace  AcceptanceTests.Personas  {      public  class  Technician  

 {    CalibrationViewModel  _calibrationViewModel;  

           public  bool  InvokeInstrumentCalibration()            {                          _calibrationViewModel.CalibrationCommand.Execute(null);                    return  true;            }    

Glue Code

Page 42: BDD Explained Through Real World Examples

Powered by People in Slippers!

Page 43: BDD Explained Through Real World Examples

Powered by People in Slippers!

Technical User

(Ruby)

Specifications Glue Code Production Code Personas

Page 44: BDD Explained Through Real World Examples

Powered by People in Slippers!

Specifications

Page 45: BDD Explained Through Real World Examples

Powered by People in Slippers!

Specifications

Page 46: BDD Explained Through Real World Examples

Powered by People in Slippers!

Glue Code

(Ruby)

Page 47: BDD Explained Through Real World Examples

Powered by People in Slippers!

Page 48: BDD Explained Through Real World Examples

Powered by People in Slippers!

@BruniaTodd @cecilgwilliams

www.sourceallies.com blogs.sourceallies.com