Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Let's test! @ codemotion 23/03/2013


Published on

Scrivere codice pulito che funzioni.Pur sembrando un'apparente contraddizione che si cela nelle difficoltà della programmazione,lo sviluppo guidato dai test risponde a questa sfida con un paradosso:scrivere test prima dell'implementazione. Lo sviluppo software guidato dai test è una pratica Agile che elimina le paure nella scrittura di codice e porta gli sviluppatori ad incrementare drasticamente la qualità delle loro applicazioni. Durante il talk verrà mostrato come l'approccio alla pratica cambi il proprio modo di programmare,rendendolo più divertente,affidabile e proficuo.

Published in: Technology
  • Be the first to comment

Let's test! @ codemotion 23/03/2013

  1. 1. Andrea GiulianoDavid FunaroLet’s test! #code10 #letstest
  2. 2. Let’s test!“Come ho fatto fino ad ora a lavorare senza test?” “Non tornerei mai più indietro!”
  3. 3. Let’s test! write code features I manually test allmy code’s functionalities
  4. 4. Let’s test!How (most) developers write code today
  5. 5. Let’s test! my starting project
  6. 6. Let’s test! CHANGESinternal external
  7. 7. Let’s test! be honest...
  8. 8. Let’s test!Contents... I’m looking forward to waste my code
  9. 9. Let’s test!Contents... What happens when something goes wrong
  10. 10. Let’s test!Contents...Where can I putmy hands in?
  11. 11. Let’s test!Contents... I’ve got the solution! one more patch
  12. 12. Let’s test! I madeContents... some mistakes NO FEEDBACK
  13. 13. Let’s test! ? ? ?? ? ? ?I’m hopeless
  14. 14. Let’s test!Contents... I want to be proud of my code
  15. 15. Let’s test!Contents... Automatic Test
  16. 16. Let’s test!
  17. 17. Let’s test! Why automatic tests? progressive input growth tests as documentation easier to alter code no fear feedback understand HOW code works easy to run confidence in your codedon’t waste your timeworking software over comprehensive documentation
  18. 18. Let’s test!How many kinds of test exists? Unit Functional Integration more...
  19. 19. Let’s test!we want short feedback!
  20. 20. Let’s test! 1 stress = # tests
  21. 21. Let’s test!Ok, let’s try!I want to write a test for my code
  22. 22. Let’s test! Sounds good...Contents... ...but one day
  23. 23. Let’s test!Contents... How can I test this? coupling dependencies
  24. 24. Let’s test! I don’t now so I DON’T test
  25. 25. Let’s test!Clean code that works cit. Ron Jeffries predictable way to develop learn all of the lessons that the code has to teach you improve the lives of the users of your software let your teammates count on you, and you on them feel good to write code
  26. 26. Let’s test!How do we get to clean code that works? Many forces drive us away from clean code and even from clean code that works
  27. 27. Let’s test!Test Driven DevelopmentTest-driven development is less and more writing testfirst...but TDD is about designTest-driven development is a way of managing fearduring programming
  28. 28. Let’s test!our tasks feature #1 feature #2 feature #3 Red: write a little test that doesn’t work Green: make the test work quickly Refactor: eliminate all the duplication created in merely getting the test to work
  29. 29. Let’s test! write a test
  30. 30. Let’s test!it fails! write a test
  31. 31. Let’s test!it fails! write a test make it works
  32. 32. Let’s test!it fails! write a test awesome make it works it’s green!
  33. 33. Let’s test!it fails! write a test awesome make it works it’s green! do refactor
  34. 34. Let’s test!it fails! write a test awesome make it works it’s green! do refactor
  35. 35. Let’s test! what are the benefits?improve quality of your code behaviours’ verification coverage functionality test as documentation collaborative working long term maintainability very short time feedback about bugs QA from reactive to proactive
  36. 36. Let’s test!ok, it’s cool but my resources are limited I want to be cheap I want to be fast I want to be good
  37. 37. Let’s test! What about legacy code?Test new functionalitiesTest old functionalities starting from bugs
  38. 38. Let’s test!DEMO
  39. 39. Let’s test! Thanks! Questions?Andrea Giuliano David Funaro@bit_shark