3. @alexhoffman617
• TDD rules as defined by Rob Martin (author of the Agile
Manifesto)
• You are not allowed to write any production code unless it
is to make a failing unit test pass.
• You are not allowed to write any more of a unit test than is
sufficient to fail
• You are not allowed to write any more production code
than is sufficient to pass the one failing unit test.
8. @alexhoffman617
• Code follows requirements
• Helps developers think about code on a more granular level
• Makes code more readable
• Prevents unnecessary code or complications
12. @alexhoffman617
• Test Driven Development is using Red-Green refactor
• By writing tests before coding, you’ll test your requirements
• Will improve how you think about coding and testing,
readability, and your chance of catching edge cases
• Promotes world peace
Who thinks they do TDD on a regular bases
Rob Martin Agile Manifesto 3 rules
Red Green Refactoring
Now who thinks they do tdd on a regular basis
About Me:
JavaScript Specialty Lead at Excella
JavaScript and Angular Enthusiast
Certified Scrum Master and Developer
Angular DC Organizer
Enjoys sports, good food, and losing at bar trivia
Red Green Refactor Example
Writing Tests to Code
Why TDD
Real World Example
Lets Be Practical
Not everyone will be in a situation to TDD all the time
Pressure from your supervisor, client, etc.
Lack of buy in from your team
Do it when you can
Even partial use can help you think about testing
Identify scenarios where you may really benefit
Complex code
Lots of expected edge cases