Testing Philosphies

1,452 views

Published on

Rob Kaufman's slides from his SDRuby talk: Testing Philosophies

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

No Downloads
Views
Total views
1,452
On SlideShare
0
From Embeds
0
Number of Embeds
26
Actions
Shares
0
Downloads
29
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Testing Philosphies

  1. 1. Testing Philosophies by Rob Kaufman Notch8 notch8.com [email_address]
  2. 2. What are Testing Philosophies
  3. 3. A Glossary <ul><li>Unit Test – Testing the inputs and outputs of a method
  4. 4. Functional Test – Does a whole set of methods accomplish what they set out too
  5. 5. Integration Test – Do the software components work together as desired
  6. 6. Acceptance Test – Does the user see/get what they expect </li></ul>
  7. 7. The When
  8. 8. The What
  9. 9. Don't Test <ul><li>Testing is hard...and most developers aren’t very good at it!
  10. 10. You can’t test code that isn’t there
  11. 11. Tests are just as likely to contain bugs
  12. 12. Should focus on code reviews, writing good code and user level testing (acceptance tests) </li></ul>
  13. 13. Don't Test <ul><li>Hampton Catlin </li><ul><li>Apps include Wikipedia Mobile
  14. 14. Considered a great developer
  15. 15. Hates automated code testing </li></ul></ul>
  16. 16. Test Everything - TATFT <ul><li>Every line of code you have test coverage
  17. 17. Is really a whole school of philosophies
  18. 18. Often is thought to include some sort of CI tool, but doesn't have to </li></ul>
  19. 19. All About the Units <ul><li>Tests should be modular and small
  20. 20. Should test the interface (input and output) of a method and any side effects
  21. 21. Test should focus on a given part of an individual method
  22. 22. Tests should only rely on themselves and nothing else (1)
  23. 23. In classic rspec model, controller and view tests are all focused at unit levels </li></ul>
  24. 24. Unit Independence <ul><li>Keep each test completely independent of other tests
  25. 25. Use mocks and stubs </li></ul>
  26. 26. All about the Integration <ul><li>Only test the system as a whole
  27. 27. Similar to acceptance testing, but automated and programmatic
  28. 28. Cucumber, Fitness, etc are common tools for this </li></ul>
  29. 29. Russian Dolls Testing <ul><li>Test models at the unit level
  30. 30. Do functional testing at the controller level
  31. 31. Do integration testing at the view level
  32. 32. Is the default in Rails with Test::Unit </li></ul>
  33. 33. Unit Test + Integrate <ul><li>Test method inputs and outputs where its helpful, then test how the whole things works together
  34. 34. Merb Request specs
  35. 35. Request specs will become the default rSpec test for Rails 3 </li></ul>
  36. 36. Throw Down?
  37. 37. Discussion!

×