Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Testing: It's a Horrible Idea

Testing: It's a Horrible Idea

The ruby community likes tests. And that's a good thing. But sometimes rubyists go a bit too far with this. Can there be too much testing? Is that considered harmful?

This presentation goes over the problems of "too much testing", and those of a natural consequence of having too many tests: irrelevant/bad tests. It then moves onwards to a few things I've picked up during the last few years that have helped me in keeping my test suites under control.

E2eac01661fd490189a527b41c81a91c?s=128

Nicolás Sanguinetti

November 09, 2011
Tweet

More Decks by Nicolás Sanguinetti

Other Decks in Programming

Transcript

  1. Testing It’s a Horrible Idea

  2. Nicolas Sanguinetti @godfoca github.com/foca

  3. Nicolas Sanguinetti @godfoca github.com/foca

  4. TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST

    TEST TEST TEST TEST TEST TES TES TEST TEST TE EST
  5. TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST

    TEST TEST TEST TEST TEST TES TES TEST TEST TE EST Quickly Find Regressions
  6. TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST

    TEST TEST TEST TEST TEST TES TES TEST TEST TE EST Repeatable Test Process
  7. TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST

    TEST TEST TEST TEST TEST TES TES TEST TEST TE EST Better OOP Design
  8. TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST

    TEST TEST TEST TEST TEST TES TES TEST TEST TE EST Documentation
  9. TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST

    TEST TEST TEST TEST TEST TES TES TEST TEST TE EST Software Without Errors
  10. TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST

    TEST TEST TEST TEST TEST TES TES TEST TEST TE EST Peace of Mind for You
  11. This is True

  12. Tests are GOOD

  13. But if you Abuse them,

  14. http://www.flickr.com/photos/katiesnape/5165365743 They Will Harm You.

  15. http://xkcd.com/303/ Time to Run http://www.flickr.com/photos/darrentunnicliff/4469318003

  16. http://xkcd.com/303/ Time to Run

  17. http://en.wikipedia.org/wiki/File:Oiled_bird_3.jpg Maintenance http://en.wikipedia.org/wiki/File:Deepwater_Horizon_offshore_drilling_unit_on_fire_2010.jpg

  18. http://en.wikipedia.org/wiki/File:Oiled_bird_3.jpg Maintenance

  19. Difficult to Understand http://www.flickr.com/photos/mscolly/145052885

  20. False Sense of Security http://www.flickr.com/photos/glowbird/4927122391

  21. We Need Solutions

  22. Less Tests

  23. Simpler Tests

  24. Faster Tests

  25. Sometimes it isn’t worth it https://twitter.com/jamesgolick/status/119911430387544064

  26. Golden Rule of Testing

  27. Listen to your Tests

  28. Now forget everything I just said

  29. Thanks @godfoca

  30. Questions? jobs@cuboxsa.com

  31. Resources http://confreaks.net/videos/641-gogaruco2011-fast-rails-tests Fast Rails Tests – Corey Haines http://confreaks.net/videos/659-rubyconf2011-why-you-don-t-get-mock-objects Why

    Don’t You Get Mock Objects – Gregory Moeck http://blog.rubybestpractices.com/posts/gregory/050-issues-18-testing-dogma.html Dirty Little Secrets About Testing – Gregory Brown http://speakerrate.com/talks/8891-testing-it-s-a-horrible-idea Please rate this talk on SpeakerRate! Thanks! http://speakerdeck.com/u/foca/p/testing-its-a-horrible-idea These Slides :)