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.

Like this presentation? Why not share!

TDD talk

on

  • 1,163 views

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.)

Statistics

Views

Total Views
1,163
Views on SlideShare
1,163
Embed Views
0

Actions

Likes
0
Downloads
31
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    TDD talk TDD talk Presentation Transcript

    • TDD
      A testing journey
    • Who are we?
    • 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
    • AAA
    • Standards we use
      Taken from Roy Osherove – The Art of Unit Testing
    • 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
    • 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
    • Test Doubles
      Dummies
      Stubs
      Mocks
      Fakes
    • Read this:
      martinfowler.com/articles/mocksArentStubs.html
    • 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 …
    • Test First
      Step 1: write the test
      Step 2: write the code
      Repeat from Step 1 until …
    • What is TDD?
      “Test Driven Development (TDD) is a design technique that drives the development process through testing.”
      Martin Fowler
    • 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
    • TDD is about requirements
      Are We There Yet?
    • TDD in 3 Cards...
      From:
      http://blog.objectmentor.com/articles/2008/03/06/tdd-on-three-index-cards
    • The TDD cycle
    • 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/
    • TDD benefits
      • Documentation
      • Feedback cycle
      • Ever expanding regression suite
      • No fear of change
      • Examples how to use the code
    • Some TDD stats
    • How to start?“The hardest thing is to start”
      • Bug driven testsnote: code may not be testable
      • Testing legacy code(or trying to)
      • Start TDD with small projects
      • Pair programming
      • Katas /Dojos
    • TDD Process Smells
    • What’s next?
    • Remember This?
    • BDD
      • Executable Acceptance Criteria
      • Given, When, Then
      http://blog.robustsoftware.co.uk/2009/11/what-is-bdd-behaviour-driven-design.html
    • Cucumber
      http://cukes.info/
    • ATDD
      • Acceptance Test Driven Development
      • Start with the acceptance test
    • ATDD
      • Acceptance Test Driven
      • Different than BDD?
      • Start with the acceptance test
      • Examples,
    • ATDD
      • Acceptance Test Driven
      • Different than BDD?
      • Start with the acceptance test
      • Examples,
    • Tools?