SlideShare a Scribd company logo
@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
Unit = Unit Of Work
 Starts with a public entry point

 Returns a Value
 Changes System State
 Calls a 3rd party system
                                    RTFM
Unit Testing vs. TDD
 Writing the tests
 Vs.
 When to write them
TDD is NOT about testing
 It is about
 Driving development
 Plays a role in design and aesthetics
 Focus
 Productivity
 Incremental Delivery & early Feedback
I do not use TDD to test the whole
system
 Create a skeleton of a working system
 Simple use cases, simplest inputs
 Drive development

 Rest is covered by
 Integration tests
 Acceptance 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 tests
 Startup with min. viable product
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
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 classes
No test passes
No test passes
And I swear they passed the day before
They passed before
What are you crying for
And I find it kind of funny
I find it kind of sad
If we didn’t catch this early
Then project would be dead
I think the test had saved us
But my manager disagrees
There are clients running circles
 It’s a very very
Bad test
I’m stressed
He’s not impressed
There’s a testing framework I am using
It was hard choosing
And very confusing
And there are many mocking frameworks to
choose from
I tried them all
And It’s killing my soul
And I find it kind of funny
I find it kind of sad
The tests that I’ve been writing
Are the worst I’ve ever had
I find it hard to tell him
Afraid that he will see
I am hiding from my dev lead
 It’s a very very
Bad test
I’m stressed
He’s not impressed


BAD TEST
Thank You

 roy@osherove.com


 Coaching, mentoring and training
 For team leaders, developers, architects and
 product owners

More Related Content

PPTX
Roy Osherove on Unit Testing Good Practices and Horrible Mistakes
PDF
Unit Testing Done Right
PPTX
The problem with tdd
PPTX
Understanding Unit Testing
PPTX
Unit Testing
PPTX
Best practices unit testing
PPTX
Unit Testing Concepts and Best Practices
PPTX
Software Quality via Unit Testing
Roy Osherove on Unit Testing Good Practices and Horrible Mistakes
Unit Testing Done Right
The problem with tdd
Understanding Unit Testing
Unit Testing
Best practices unit testing
Unit Testing Concepts and Best Practices
Software Quality via Unit Testing

What's hot (20)

PPTX
Working with Legacy Code
PPT
Getting Unstuck: Working with Legacy Code and Data
PPTX
Automation test
PDF
Adding Unit Test To Legacy Code
PPTX
An Introduction to Unit Testing
PDF
Unit Testing 101
PPTX
Unit testing - the hard parts
PDF
Unit testing (workshop)
PDF
TDD - survival guide
PDF
Clean Unit Test Patterns
PDF
Unit Testing Fundamentals
PPTX
An Introduction to unit testing
PPTX
A Brief Introduction to Test-Driven Development
PDF
Unit Test + Functional Programming = Love
PDF
Is this how you hate unit testing?
PPT
Unit Testing
PPTX
Unit testing
PPTX
Unit Testing And Mocking
PPT
Unit testing
PPTX
Clean code - Getting your R&D on board
Working with Legacy Code
Getting Unstuck: Working with Legacy Code and Data
Automation test
Adding Unit Test To Legacy Code
An Introduction to Unit Testing
Unit Testing 101
Unit testing - the hard parts
Unit testing (workshop)
TDD - survival guide
Clean Unit Test Patterns
Unit Testing Fundamentals
An Introduction to unit testing
A Brief Introduction to Test-Driven Development
Unit Test + Functional Programming = Love
Is this how you hate unit testing?
Unit Testing
Unit testing
Unit Testing And Mocking
Unit testing
Clean code - Getting your R&D on board
Ad

Viewers also liked (20)

PDF
Test Driven Development (TDD)
PPTX
A second look at Unit Testing with Roy Osherove at Microsoft Swit
PPTX
Vim - for newbies, by Roy Osherove
PPTX
Organizational influence-hacks-45min
PPTX
Team leadership in the age of Agile - Roy Osherove
PPTX
Little productivity tools every developer should use
PPT
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
PDF
Garbage collected teardown
PDF
xUnit Test Patterns Chapter 20
PPTX
Negative Testing
PPTX
Unit Testing, TDD and ATDD
PPTX
A Second Look at Unit Testing by Roy Osherove
PDF
Property based Testing - generative data & executable domain rules
PPTX
NUnit Features Presentation
PPT
TDD And Refactoring
PPT
Scrum and Test-driven development
PDF
Agile Test Driven Development
PDF
Better Bullshit Driven Development [SeleniumCamp 2017]
PPTX
TDD - Agile
PDF
Unit testing best practices
Test Driven Development (TDD)
A second look at Unit Testing with Roy Osherove at Microsoft Swit
Vim - for newbies, by Roy Osherove
Organizational influence-hacks-45min
Team leadership in the age of Agile - Roy Osherove
Little productivity tools every developer should use
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
Garbage collected teardown
xUnit Test Patterns Chapter 20
Negative Testing
Unit Testing, TDD and ATDD
A Second Look at Unit Testing by Roy Osherove
Property based Testing - generative data & executable domain rules
NUnit Features Presentation
TDD And Refactoring
Scrum and Test-driven development
Agile Test Driven Development
Better Bullshit Driven Development [SeleniumCamp 2017]
TDD - Agile
Unit testing best practices
Ad

Similar to Roy Osherove TDD From Scratch (20)

PPT
The ten commandments of TDD
PDF
Pairing w developers_stpconpics
PPT
Unit Testing, TDD and the Walking Skeleton
PPTX
Lập trình hướng kiểm thử - Test Driven development
PPT
An insight to test driven development and unit testing
PPTX
TDD with RSpec
PPTX
TDD & Refactoring
PPTX
Unit Testing and TDD 2017
PDF
Pragmatic Not Dogmatic TDD Agile2012 by Joseph Yoder and Rebecca Wirfs-Brock
PDF
Pragmatic notdogmatictdd agile2012
PPTX
Real Life Unit Testing
PDF
How Do We Teach TDD Keith Ray
PPT
Automated Unit Testing and TDD
PPTX
TDD - Test Driven Development
PPTX
From Gatekeeper to Partner by Kelsey Shannahan
PDF
Testing and TDD - KoJUG
PPTX
Intro to TDD
PDF
Project Management in 3 Slides
PDF
Unit testing, principles
PPS
Test driven development using Junit and MockIto
The ten commandments of TDD
Pairing w developers_stpconpics
Unit Testing, TDD and the Walking Skeleton
Lập trình hướng kiểm thử - Test Driven development
An insight to test driven development and unit testing
TDD with RSpec
TDD & Refactoring
Unit Testing and TDD 2017
Pragmatic Not Dogmatic TDD Agile2012 by Joseph Yoder and Rebecca Wirfs-Brock
Pragmatic notdogmatictdd agile2012
Real Life Unit Testing
How Do We Teach TDD Keith Ray
Automated Unit Testing and TDD
TDD - Test Driven Development
From Gatekeeper to Partner by Kelsey Shannahan
Testing and TDD - KoJUG
Intro to TDD
Project Management in 3 Slides
Unit testing, principles
Test driven development using Junit and MockIto

Roy Osherove TDD From Scratch

  • 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. Unit = Unit Of Work Starts with a public entry point Returns a Value Changes System State Calls a 3rd party system RTFM
  • 4. Unit Testing vs. TDD Writing the tests Vs. When to write them
  • 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. I do not use TDD to test the whole system Create a skeleton of a working system Simple use cases, simplest inputs Drive development Rest is covered by Integration tests Acceptance Tests
  • 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. 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
  • 10. Song?
  • 11. This is a test line
  • 12. Looks like you’re doing fine
  • 13. Time for a song of mine
  • 15. All around me are familiar classes No test passes No test passes
  • 16. And I swear they passed the day before They passed before What are you crying for
  • 17. And I find it kind of funny I find it kind of sad If we didn’t catch this early Then project would be dead
  • 18. I think the test had saved us But my manager disagrees There are clients running circles It’s a very very
  • 20. There’s a testing framework I am using It was hard choosing And very confusing
  • 21. And there are many mocking frameworks to choose from I tried them all And It’s killing my soul
  • 22. And I find it kind of funny I find it kind of sad The tests that I’ve been writing Are the worst I’ve ever had
  • 23. I find it hard to tell him Afraid that he will see I am hiding from my dev lead It’s a very very
  • 24. Bad test I’m stressed He’s not impressed BAD TEST
  • 25. Thank You roy@osherove.com Coaching, mentoring and training For team leaders, developers, architects and product owners