Testing Antipatterns

Accepted Session
Short Form
Scheduled: Wednesday, June 22, 2011 from 3:45 – 4:30pm in B202/03


Tests are great - except when they aren't. Learn how to avoid writing tests that are more trouble than they're worth.


Often when you work on legacy code (aka code) you find that it’s not tested as well as you’d like. Usually this is because there aren’t enough tests written, but perhaps worse is to find there’s a lot of tests – that don’t really test anything. Writing tests is difficult and time consuming, so you hope for some return on your investment, but you might find your tests hinder refactoring without catching bugs. There are some concrete antipatterns you can watch for to prevent this type of testing from happening. Examples will mostly be in Ruby and expand on what’s already been documented a bit in the Puppet Testing Wiki.

Speaking experience


  • Robinson 005


    I’ve been working with Ruby and Perl to build web apps, configuration management software (currently with Puppet Labs) and script my life since I graduated college with a degree in Applied Computational Mathematical Sciences (ACMS) with a focus on discrete math and algorithms (the title wrapped 3 lines on the diploma and really just meant I couldn’t pick just one nerdy major).

    I’m particularly interested in writing easy to read and understand code after being forced to read the horrific code others have produced and left me to maintain. I think good testing practices go a long way to helping here.

    In my non-nerd time I enjoy hiking, rock climbing, traveling, meditating and recently playing with my baby daughter.