Test Driven Development
Aim loosely
@pedromsantos
Fail to succeed
Red, Green, Refactor
The TDD mantra
Laws
• You are not allowed to write any production code
unless it is to make a failing unit test pass.
• You are not allow...
Benefits
• Debugging
• Courage
• Documentation
• Design
• Professionalism
Qualities of a Good Unit Test
• Atomic
• Isolated
• Repeatable
• Revealing
• Easy to Setup
• Fast
Inside a test
• Arrange – all necessary preconditions and
inputs
• Act – on the object or method under test
• Assert – tha...
Strategies
• Use Obvious Implementation
• Fake it
• Triangulate
Practice
• Code Kata
• Community
• London Software Craftsmanship Community
Demo
SoCraTes UK 2014
International Software Craftsmanship gathering
12th – 15th June, Farncombe Estate
!
http://socratesuk.org/
References
• http://www.amazon.com/exec/obidos/ASIN/
0321146530/ambysoftinc
References
• https://leanpub.com/socra
References
• http://www.meetup.com/london-software-
craftsmanship/
• http://codingdojo.org/cgi-bin/index.pl?
KataCatalogue...
Thank you!
@pedromsantos
Upcoming SlideShare
Loading in …5
×

Intro TDD Portuguese developers meetup London 16/04/2014

284 views

Published on

Published in: Software, Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
284
On SlideShare
0
From Embeds
0
Number of Embeds
17
Actions
Shares
0
Downloads
6
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Intro TDD Portuguese developers meetup London 16/04/2014

  1. 1. Test Driven Development Aim loosely @pedromsantos
  2. 2. Fail to succeed
  3. 3. Red, Green, Refactor The TDD mantra
  4. 4. Laws • You are not allowed to write any production code unless it is to make a failing unit test pass. • You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures. • You are not allowed to write any more production code than is sufficient to pass the one failing unit test.
  5. 5. Benefits • Debugging • Courage • Documentation • Design • Professionalism
  6. 6. Qualities of a Good Unit Test • Atomic • Isolated • Repeatable • Revealing • Easy to Setup • Fast
  7. 7. Inside a test • Arrange – all necessary preconditions and inputs • Act – on the object or method under test • Assert – that the expected results have occurred • Assert First?
  8. 8. Strategies • Use Obvious Implementation • Fake it • Triangulate
  9. 9. Practice • Code Kata • Community • London Software Craftsmanship Community
  10. 10. Demo
  11. 11. SoCraTes UK 2014 International Software Craftsmanship gathering 12th – 15th June, Farncombe Estate ! http://socratesuk.org/
  12. 12. References • http://www.amazon.com/exec/obidos/ASIN/ 0321146530/ambysoftinc
  13. 13. References • https://leanpub.com/socra
  14. 14. References • http://www.meetup.com/london-software- craftsmanship/ • http://codingdojo.org/cgi-bin/index.pl? KataCatalogue • http://cyber-dojo.org/ • http://programmer.97things.oreilly.com/wiki/ index.php/The_Three_Laws_of_Test- Driven_Development
  15. 15. Thank you! @pedromsantos

×