JUnit Just Wants To Be Your Friend

Tags:

Mar. 14th 2008 in Development, Work

This is why you’re not allowed to have alcohol in the workplace.

Co-Worker (who does not believe in unit tests): Okay. I just checked my changes in.

Me: There’s a bug in your code.

Co-Worker: How do you know? I just checked it in!

Me: It broke my unit tests. It looks like you’re not setting the flibbergibbet value correctly.

Co-Worker: What? How can you tell?

Me: JUnit showed me the difference.

Co-Worker: Oh. I guess I’ll fix it now. I would have found it eventually…

For what it’s worth, we’re handling Electronic Data Interchange documents – things that look like a page or so of line noise at a time. The bug was that one character wasn’t getting written to the output. My co-worker tests his code with the toString() and visual grep method. I’m not sure he would have ever caught the bug on his own. I keep trying to explain that unit tests are a Good Thing

Bookmark and Share

No Comments Yet

You can be the first to comment!

Sorry, comments for this entry are closed at this time.

Get a Trackback link

blog comments powered by Disqus
SEO Powered by Platinum SEO from Techblissonline