Home > Testing > Write a Test Before Fixing a Bug…

Write a Test Before Fixing a Bug…


 

It’s a shame that i just discovered this guy (Brendan Enrick). Brendan has a good blog post on testing with TDD.

Thanks Brendan.

I knew how to do it. And I want to share with all the good feeling I had when I did it.

The fact that you write a test first to confirm the bug, fix the bug, then run the test again to confirm that the bug is fixed, makes correcting bugs easy and fun! Wink

In my sense, this makes unit testing an Art! (notice the capital letter ‘A’…)

Also, If you happen to use Team Foundation Software, you can associate the test with the bug which also improves traceability.

Advertisements
Categories: Testing
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: