Main Contents

Unit Testing to Avoid Demo Bugs

software development

In a demo today another example of why we really need more unit testing instilled cropped up. One of our senior developers was giving a demo after the first Sprint on a project on an overhead projector. Someone piped up that he should try adding a document to multiple categories. So he agrees OK, selects two categories and then presto it just adds it to the first one. (He did do a good job of preparing running through the expected scenarios, but not including adding a document to more than one category.) Apparently this worked only a few hours before the demo, but after making a fix for a Hibernate issue this functionality broke. I pointed out that if there was a unit test for this, preferably written before the implementing code he would have known a lot more quickly about the bug. He essentially agreed, but he’s still not sold all that much on unit testing.

Ed Gibbs @ August 31, 2005

2 Comments

  1. Dwayne A. Davis September 1, 2005 @ 9:55 am

    I love unit tests, but we don’t get the same level of adoption (without mandating it) that I’d like to see.

    That being said, there are definitely times when unit tests are more work than they are worth, and there is a fine line between enough and too much. Test driven development is definitely good, and should have caught the error above.

Leave a comment


Feed