roy osherove tdd from scratch
DESCRIPTION
TRANSCRIPT
TDD from scratch
@RoyOsherove
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
Unit = Unit Of Work
Starts with a public entry point
Returns a ValueChanges System StateCalls a 3rd party system
RTFM
Unit Testing vs. TDD
Writing the testsVs.When to write them
TDD is NOT about testing
It is aboutDriving developmentPlays a role in design and aestheticsFocusProductivityIncremental Delivery & early Feedback
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
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
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
ArtOfUnitTesting.com
Song?
This is a test line
Looks like you’re doing fine
Time for a song of mine
Bad Test
All around me are familiar classesNo test passesNo test passes
And I swear they passed the day beforeThey passed beforeWhat are you crying for
And I find it kind of funnyI find it kind of sadIf we didn’t catch this earlyThen project would be dead
I think the test had saved usBut my manager disagreesThere are clients running circles It’s a very very
Bad testI’m stressedHe’s not impressed
There’s a testing framework I am usingIt was hard choosing And very confusing
And there are many mocking frameworks to choose fromI tried them allAnd It’s killing my soul
And I find it kind of funnyI find it kind of sadThe tests that I’ve been writingAre the worst I’ve ever had
I find it hard to tell himAfraid that he will seeI am hiding from my dev lead It’s a very very
Bad testI’m stressedHe’s not impressed
BAD TEST
Thank You
Coaching, mentoring and trainingFor team leaders, developers, architects and product owners