• Like

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

TDD talk

  • 909 views
Uploaded on

Presentation made to CoastNerds November 2010 by Scott Wallace and Robert Dyball. Entitled "Test Driven Development - A Testing Journey", it describes the path we've started in agile development …

Presentation made to CoastNerds November 2010 by Scott Wallace and Robert Dyball. Entitled "Test Driven Development - A Testing Journey", it describes the path we've started in agile development through test last, test first, TDD, ATDD and on to BDD. (The principles in the presentation apply to any language.)

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
909
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
32
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. TDD
    A testing journey
  • 2. Who are we?
  • 3.
  • 4. Unit Tests
    A unit test is a piece of a code (usually a method) that invokes another piece of code and checks the correctness of some assumptions afterward.
    If the assumptions turn out to be wrong, the unit test has failed.
    A “unit” is a method or function.
    Roy Osherove – The Art of Unit Testing
  • 5. AAA
  • 6.
  • 7.
  • 8. Standards we use
    Taken from Roy Osherove – The Art of Unit Testing
  • 9. State Testing
    State-based testing (also called state verification) determines whether the exercised method worked correctly by examining the state of the system under test and its collaborators (dependencies) after the method is exercised.
    Roy Osherove – The Art of Unit Testing
  • 10. Interaction Testing
    ...testing how an object sends input to or receives input from other objects—how that object interacts with other objects.
    Roy Osherove – The Art of Unit Testing
  • 11.
  • 12. Test Doubles
    Dummies
    Stubs
    Mocks
    Fakes
  • 13. Read this:
    martinfowler.com/articles/mocksArentStubs.html
  • 14. Test Last
    Test-Last or Test-After Development: TAD, aka “POUT” Plain Old Unit Testing
    Step1: write the code
    Step 2: write the test
    Repeat from Step 1 until …
  • 15.
  • 16. Test First
    Step 1: write the test
    Step 2: write the code
    Repeat from Step 1 until …
  • 17.
  • 18. What is TDD?
    “Test Driven Development (TDD) is a design technique that drives the development process through testing.”
    Martin Fowler
  • 19. What is TDD?
    “One reasonable definition of good design is testability. It is hard to imagine a software system that is both testable and poorly designed. It is also hard to imagine a software system that is well designed but also untestable.”
    – Robert “Uncle Bob” Martin
    “There appears to be a synergy between testability (at the unit level) and good design. If you aim for testability and make some good choices, design gets better. If you aim for good design, your design becomes more testable. ”
    – Michael Feathers
  • 20. TDD is about requirements
    Are We There Yet?
  • 21. TDD in 3 Cards...
    From:
    http://blog.objectmentor.com/articles/2008/03/06/tdd-on-three-index-cards
  • 22.
  • 23.
  • 24.
  • 25. The TDD cycle
  • 26. Refactor?
    “Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its externalbehavior”
    http://www.refactoring.com/
  • 27. TDD benefits
    • Documentation
    • 28. Feedback cycle
    • 29. Ever expanding regression suite
    • 30. No fear of change
    • 31. Examples how to use the code
  • Some TDD stats
  • 32. How to start?“The hardest thing is to start”
    • Bug driven testsnote: code may not be testable
    • 33. Testing legacy code(or trying to)
    • 34. Start TDD with small projects
    • 35. Pair programming
    • 36. Katas /Dojos
  • TDD Process Smells
  • 37. What’s next?
  • 38. Remember This?
  • 39. BDD
    • Executable Acceptance Criteria
    • 40. Given, When, Then
    http://blog.robustsoftware.co.uk/2009/11/what-is-bdd-behaviour-driven-design.html
  • 41. Cucumber
    http://cukes.info/
  • 42. ATDD
    • Acceptance Test Driven Development
    • 43. Start with the acceptance test
  • ATDD
    • Acceptance Test Driven
    • 44. Different than BDD?
    • 45. Start with the acceptance test
    • 46. Examples,
  • ATDD
    • Acceptance Test Driven
    • 47. Different than BDD?
    • 48. Start with the acceptance test
    • 49. Examples,
  • 50. Tools?