Presentation is loading. Please wait.

Presentation is loading. Please wait.

Nathaniel Neitzke Lighthouse1, LLC

Similar presentations


Presentation on theme: "Nathaniel Neitzke Lighthouse1, LLC"— Presentation transcript:

1 Nathaniel Neitzke Lighthouse1, LLC nightski@gmail.com

2 Test driven development Where did it come from? What is it?

3 Why automated tests?  To verify correctness?

4 Confidence  Ability to change

5 Isolation  Debugging is hard, time consuming

6 Design  BDUF  Goldplating

7 Documentation  What does this code do?

8 Testability  Send quality code to QA

9 So what’s wrong with tdd?  Focus on tests so it must be testing right?  Sapir-Whorf

10 The problem with “unit”  What is a unit?  Unit test -> class

11 Programmers think…  I’m not going to write all those tests  It’s really simple code, it doesn’t need to be tested  Testing is a waste of time  I’ve done this all a million times (loops, data retrieval, functionality, etc…)

12 Manager’s think…  We test after the code is done  That’s what we have a testing person for  We can’t spend that time now

13 Behavior driven development  TDD done very well  Not about tests  Think differently  Dan North/Aslak Hellesøy 2004

14 Specifications  Executable specifications around the behavior of your system

15 User stories  Conversation between customer and developer  Drive our executable specifications  Role, feature, benefit As a [role] I want [feature] so that [benefit]

16 Scenarios  Detail acceptance criteria for a particular user story  Context – Action – Observation Given [Context] When [Action] Then [Observation]

17 Format Title (one line describing the story) Narrative: As a [role] I want [feature] So that [benefit] Acceptance Criteria: (presented as Scenarios) Scenario 1: Given [context] And [some more context]… When [event] Then [outcome] And [another outcome]…. Scenario 2: ….

18 rspec & cucumber  Frameworks/Tools

19 DEMO

20 .NET Frameworks  NBehave, .NETSpec  Machine.Specifications

21 Other Tools  TextMate/e  Autotest  Heckle  Rake  RCov

22 Resources  Dan North http://dannorth.net/introducing-bdd http://dannorth.net/whats-in-a-story  RSpec http://rspec.info/  Cucumber http://cukes.info/  IronRuby http://www.ironruby.net/  Beyond Test Driven Development Video http://video.google.com/videoplay?docid=8135690990081 075324 http://video.google.com/videoplay?docid=8135690990081 075324  The RSpec Book: BDD with RSpec, Cucumber, etc.. http://www.pragprog.com/titles/achbd/the-rspec-book

23 Questions?


Download ppt "Nathaniel Neitzke Lighthouse1, LLC"

Similar presentations


Ads by Google