"Test Driven Development SpeedRun"
In this talk we will introduce you to Test Driven Development and its main advantages. We will do so by guiding you through a practical exercise being solved with a TDD workflow. We will see how TDD favors better software design and flexibility (with the awesome side effect of test coverage).
18. Introduction: how do I TDD?
It works in 3 steps:
• Write a failing test
• Write just enough code to make it pass
19. Introduction: how do I TDD?
It works in 3 steps:
• Write a failing test
• Write just enough code to make it pass
• Refactor your mess
20. Introduction: how do I TDD?
It works in 3 steps:
• Write a failing test
• Write just enough code to make it pass
• Refactor your mess
Rinse and
Repeat!
24. TDD Hands on
The requirements:
• Print numbers in sequence
• If the number is divisible by 3, print “Fizz”
• If the number is divisible by 5, print “Buzz”
• If divisible by both, print “FizzBuzz”
38. Wrapping up: when NOT to use TDD?
• The application has little to no
business logic (CRUD?)
• You are building a prototype
• Quality is not important
39. Wrapping up: when to use TDD?
• The application has complicated
business logic
• You don’t know how your
implementation will look like
• Correctness is crucial
• The project is gonna be long lived
and frequently retouched