Download - Roy Osherove TDD From Scratch
![Page 1: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/1.jpg)
TDD from scratch
@RoyOsherove
![Page 2: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/2.jpg)
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 reserved
![Page 3: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/3.jpg)
Unit = Unit Of Work
Starts with a public entry point
Returns a ValueChanges System StateCalls a 3rd party system
RTFM
![Page 4: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/4.jpg)
Unit Testing vs. TDD
Writing the testsVs.When to write them
![Page 5: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/5.jpg)
TDD is NOT about testing
It is aboutDriving developmentPlays a role in design and aestheticsFocusProductivityIncremental Delivery & early Feedback
![Page 6: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/6.jpg)
I do not use TDD to test the whole system
Create a skeleton of a working systemSimple use cases, simplest inputsDrive development
Rest is covered byIntegration testsAcceptance Tests
![Page 7: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/7.jpg)
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 testsStartup with min. viable product
![Page 8: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/8.jpg)
I do use TDD if
I am working on code that someone else might have to maintain at some pointI know this code will leave in this application for more than a week
![Page 9: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/9.jpg)
ArtOfUnitTesting.com
![Page 10: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/10.jpg)
Song?
![Page 11: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/11.jpg)
This is a test line
![Page 12: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/12.jpg)
Looks like you’re doing fine
![Page 13: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/13.jpg)
Time for a song of mine
![Page 14: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/14.jpg)
Bad Test
![Page 15: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/15.jpg)
All around me are familiar classesNo test passesNo test passes
![Page 16: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/16.jpg)
And I swear they passed the day beforeThey passed beforeWhat are you crying for
![Page 17: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/17.jpg)
And I find it kind of funnyI find it kind of sadIf we didn’t catch this earlyThen project would be dead
![Page 18: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/18.jpg)
I think the test had saved usBut my manager disagreesThere are clients running circles It’s a very very
![Page 19: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/19.jpg)
Bad testI’m stressedHe’s not impressed
![Page 20: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/20.jpg)
There’s a testing framework I am usingIt was hard choosing And very confusing
![Page 21: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/21.jpg)
And there are many mocking frameworks to choose fromI tried them allAnd It’s killing my soul
![Page 22: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/22.jpg)
And I find it kind of funnyI find it kind of sadThe tests that I’ve been writingAre the worst I’ve ever had
![Page 23: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/23.jpg)
I find it hard to tell himAfraid that he will seeI am hiding from my dev lead It’s a very very
![Page 24: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/24.jpg)
Bad testI’m stressedHe’s not impressed
BAD TEST
![Page 25: Roy Osherove TDD From Scratch](https://reader033.vdocument.in/reader033/viewer/2022061217/54b520954a7959b6098b4649/html5/thumbnails/25.jpg)
Thank You
Coaching, mentoring and trainingFor team leaders, developers, architects and product owners