test driven development: un acercamiento práctico con junit y mockito
DESCRIPTION
TRANSCRIPT
Test Driven Development
Roberto Carrera Maldonado
Once upon a time…
Once upon a time …
And they lived happily ever after
Test Driven Development
Test Driven Development
Test Driven Development
Test Driven Development
How it works?
Write a test
Write code that passes that test
Refactor(Re/Design)
New Requirement
Q & A / Design
Let’s have some fun…
The important part…
Some considerations…
• Tests should be
– Isolated
– Not exhaustive but representative
– Easy and fast to run
Some considerations…
• Test features not methods• Test names describe what they do, not what
they test, so it is domain specific and not specific to the method/class name
Roberto Carrera Maldonado@rcarreram
Happy path… with a test
Cost of defect remediation
Cost of manage the change
Roberto Carrera Maldonado@rcarreram