Roy Osherove TDD From Scratch

1,856 views

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,856
On SlideShare
0
From Embeds
0
Number of Embeds
177
Actions
Shares
0
Downloads
24
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Roy Osherove TDD From Scratch

  1. 1. @RoyOsherove
  2. 2. What I do (artOfUnitTesting.com) Courses on TDD, BDD in JS, Ruby, Java and C# TDD (EpiServer TDD, MVC TDD…) Courses for Team Leaders (5whys.com) Consulting & coaching through Bouvet Contact.osherove.com Team Agile - All rights
  3. 3. Unit = Unit Of Work Starts with a public entry point Returns a Value Changes System State Calls a 3rd party system RTFM
  4. 4. Unit Testing vs. TDD Writing the tests Vs. When to write them
  5. 5. TDD is NOT about testing It is about Driving development Plays a role in design and aesthetics Focus Productivity Incremental Delivery & early Feedback
  6. 6. I do not use TDD to test the wholesystem Create a skeleton of a working system Simple use cases, simplest inputs Drive development Rest is covered by Integration tests Acceptance Tests
  7. 7. I do not use TDD if I am working on a proof of concept One-off that is short lived, or easy to maintain and fix without tests Startup with min. viable product
  8. 8. I do use TDD if I am working on code that someone else might have to maintain at some point I know this code will leave in this application for more than a week
  9. 9. ArtOfUnitTesting.com
  10. 10. Song?
  11. 11. This is a test line
  12. 12. Looks like you’re doing fine
  13. 13. Time for a song of mine
  14. 14. Bad Test
  15. 15. All around me are familiar classesNo test passesNo test passes
  16. 16. And I swear they passed the day beforeThey passed beforeWhat are you crying for
  17. 17. And I find it kind of funnyI find it kind of sadIf we didn’t catch this earlyThen project would be dead
  18. 18. I think the test had saved usBut my manager disagreesThere are clients running circles It’s a very very
  19. 19. Bad testI’m stressedHe’s not impressed
  20. 20. There’s a testing framework I am usingIt was hard choosingAnd very confusing
  21. 21. And there are many mocking frameworks tochoose fromI tried them allAnd It’s killing my soul
  22. 22. And I find it kind of funnyI find it kind of sadThe tests that I’ve been writingAre the worst I’ve ever had
  23. 23. I find it hard to tell himAfraid that he will seeI am hiding from my dev lead It’s a very very
  24. 24. Bad testI’m stressedHe’s not impressedBAD TEST
  25. 25. Thank You roy@osherove.com Coaching, mentoring and training For team leaders, developers, architects and product owners

×