Shallow Depth of Test                 Test at the appropriate level and                    achieve a testing pyramid	  www...
Male 29y 100K wantsIP 5K and Life 500K                  Quote                  System	         IP $25       Life $15
Male 62y 100K wantsIP 5K and Life 500K                    Quote                    System	         IP $25       Life error
Can sell life cover to people between 18 and 60.Can sell IP cover to people between 18 and 65         Life        IP      ...
InternetQuoteSystem	  
JavaScript	                   WebServer    ReverseProxies      Authentication                       JSON Services	        ...
Error  Handler	                       Validations	        Pricer	                              JSON                       ...
Error  Handler	                       Validations	        Pricer	                              JSON                       ...
Error  Handler	                       Validations	        Pricer	                              JSON                       ...
h#p://blogs.agilefaqs.com/	  
h#p://jamescrisp.org	  
h#p://clipboarded.blogspot.com	  
h#p://wa9rmelon.com	  
www.fabiopereira.me	  
BDD at the Unit Level	  
Use builders and Fixtures	      h#p://en.wikipedia.org/wiki/Builder_pa#ern	  
Error  Handler	                       Validations	        Pricer	                              JSON                       ...
Shallow Depth of Test	  
MyTest	         Stimulate                 Operate	   Mock/Stub	                   Simulate
MyTest	         Stimulate                 Operate	   Mock/Stub	                   Simulate
Simulate	  
Simulate Http	     Easy to Stub	         And… Mock	  
Wiring
You can test Spring Config	  
IN MEMORY DB (HSQL)
High level and Test Journeys at the UI Level	  
High level and Test Journeys at the UI Level	  
h#p://blog.carbonfive.com/2011/11/07/modern-­‐cucumber-­‐and-­‐rails-­‐no-­‐more-­‐training-­‐wheels/	  
www.fabiopereira.me	  
Questions	   Answers	  Comments	                   www.fabiopereira.me	  
Thanks	  Referencesh#p://apcj.blogspot.com/2005_04_01_archive.html	  h#p://wa9rmelon.com	  h#p://jamescrisp.org	  h#p://cl...
Shallow Depth of Test - Test at the appropriate level
Shallow Depth of Test - Test at the appropriate level
Shallow Depth of Test - Test at the appropriate level
Upcoming SlideShare
Loading in …5
×

Shallow Depth of Test - Test at the appropriate level

1,568 views
1,396 views

Published on

Presentation given at ThoughtWorks XConf2011.

Published in: Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,568
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
19
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Shallow Depth of Test - Test at the appropriate level

  1. 1. Shallow Depth of Test Test at the appropriate level and achieve a testing pyramid  www.fabiopereira.me  
  2. 2. Male 29y 100K wantsIP 5K and Life 500K Quote System   IP $25 Life $15
  3. 3. Male 62y 100K wantsIP 5K and Life 500K Quote System   IP $25 Life error
  4. 4. Can sell life cover to people between 18 and 60.Can sell IP cover to people between 18 and 65 Life IP 18 J 17 L 18 J 17 L Quote 60 J 60 J 61 L 61 J System   65 J 66 L
  5. 5. InternetQuoteSystem  
  6. 6. JavaScript   WebServer ReverseProxies Authentication JSON Services   Controller  Repository   Domain Model  
  7. 7. Error Handler   Validations   Pricer   JSON Quote Mandatory Controller   Validator   Pricing   Validator   Price BusRule Domain Calculator   Validator   Model      Cover1 Cover2 BR1 BR2 BRN … … Repository   PRICING DATA
  8. 8. Error Handler   Validations   Pricer   JSON Quote Mandatory Controller   Validator   Pricing   Validator   Price BusRule Domain Calculator   Validator   Model      Cover1 Cover2 BR1 BR2 BRN … … Repository   PRICING DATA
  9. 9. Error Handler   Validations   Pricer   JSON Quote Mandatory Controller   Validator   Pricing   Validator   Price BusRule Domain Calculator   Validator   Model      Cover1 Cover2 BR1 BR2 BRN … … Repository   PRICING DATA
  10. 10. h#p://blogs.agilefaqs.com/  
  11. 11. h#p://jamescrisp.org  
  12. 12. h#p://clipboarded.blogspot.com  
  13. 13. h#p://wa9rmelon.com  
  14. 14. www.fabiopereira.me  
  15. 15. BDD at the Unit Level  
  16. 16. Use builders and Fixtures   h#p://en.wikipedia.org/wiki/Builder_pa#ern  
  17. 17. Error Handler   Validations   Pricer   JSON Quote Mandatory Controller   Validator   Pricing   Validator   Price BusRule Domain Calculator   Validator   Model      Cover1 Cover2 BR1 BR2 BRN … … Repository   PRICING DATA
  18. 18. Shallow Depth of Test  
  19. 19. MyTest   Stimulate Operate   Mock/Stub   Simulate
  20. 20. MyTest   Stimulate Operate   Mock/Stub   Simulate
  21. 21. Simulate  
  22. 22. Simulate Http   Easy to Stub   And… Mock  
  23. 23. Wiring
  24. 24. You can test Spring Config  
  25. 25. IN MEMORY DB (HSQL)
  26. 26. High level and Test Journeys at the UI Level  
  27. 27. High level and Test Journeys at the UI Level  
  28. 28. h#p://blog.carbonfive.com/2011/11/07/modern-­‐cucumber-­‐and-­‐rails-­‐no-­‐more-­‐training-­‐wheels/  
  29. 29. www.fabiopereira.me  
  30. 30. Questions   Answers  Comments   www.fabiopereira.me  
  31. 31. Thanks  Referencesh#p://apcj.blogspot.com/2005_04_01_archive.html  h#p://wa9rmelon.com  h#p://jamescrisp.org  h#p://clipboarded.blogspot.com  h#p://anton.kovalyov.net/2011/02/20/why-­‐i-­‐forked-­‐jslint-­‐to-­‐jshint/  h#p://en.wikipedia.org/wiki/Builder_pa#ern  h#p://jawr.java.net/  h#p://pivotal.github.com/jasmine/  h#p://code.google.com/p/js-­‐test-­‐driver/  h#p://blogs.agilefaqs.com/  Images   www.fabiopereira.me  h#p://www.flickr.com/photos/nburrows  h#p://www.luxury-­‐insider.com/uploads/news/2010/06/korean-­‐air-­‐first-­‐class-­‐award-­‐1.jpg  h#p://one7.files.wordpress.com/2010/06/browsers.jpg  h#p://www.luxury-­‐insider.com/uploads/news/2010/06/korean-­‐air-­‐first-­‐class-­‐award-­‐1.jpg  h#p://www.digital-­‐photography-­‐student.com/wp-­‐content/uploads/2009/01/DOF-­‐Shallow-­‐Deep.png  h#p://www.flickr.com/photos/bullgod/2604300680/  

×