Pro Yearly is on sale from $80 to $50! »

Intro To TDD

Fd80f9c58b06270d42356dd77a32defa?s=47 Jim Holmes
February 12, 2020

Intro To TDD

A short session introducing Test Driven Development presented at Evergreen State University in Olympia, Washington.

Fd80f9c58b06270d42356dd77a32defa?s=128

Jim Holmes

February 12, 2020
Tweet

Transcript

  1. Intro to Test Driven Development

  2. Jim Holmes Executive Consultant, Guidepost Systems LLC Jim@GuidepostSystems.com GitHub: JimHolmes

    Xbox: FrazzledDad Blogs: http://GuidepostSystems.com http://FrazzledDad.com Coding for Non-Coders: Lesson 1—Course Introduction Who am I?
  3. Slides: https://speakerdeck.com/ jimholmes/intro-to-tdd

  4. How do you know your stuff works?

  5. How do you know you built the right thing?

  6. How do you keep your stuff working?

  7. Goals for today: Talk about building test cases Spend some

    writing tests and code
  8. Level Set: What are all y’all working with? (testing, specs,

    etc.)
  9. Why writing tests matters

  10. Correctness

  11. Maintainability

  12. Why writing tests first matters

  13. Stay lean

  14. Focus on value

  15. Red Refactor Green

  16. Think Refactor Green Red

  17. The problem

  18. Customer wants a payroll system

  19. Today’s work: Figure payroll for hourly workers

  20. Let’s write some specs!

  21. Hours Worked Hourly Rate Wages Should Be 0 10 0

    1 10 10 40 10 400 41 10 415 60 10 700 61 10 Error. Requires supervisor review (Business rule!) -1 10 Error. Do not process 1 -1 Error. Do not process 10 Max Value (500) 10 * max value. 10 Max Value + 1 Error. Requires supervisor review (Business rule!) 10 1 10
  22. Let’s write some tests!