Buggy unit test

I came yesterday to the (terrible) conclusion that one of my unit tests was buggy .
My question is now : should we unit test our unit tests….

3 responses to “Buggy unit test

  1. Your tested code should help to test your unit tests.
    You can do mutating tests.
    See MSDN Magazine of this month.
    Unfortunately there is no tool for doing that automatically (yet ;-)).

  2. If you write your test before you write your code, you will see if it works (it should fail)
    But the intention of a Unit test is not to see it works. It is to see it keeps working the way it worked before.
    You can never have everything tested. So your test only prove the code has the same quality as before. What worked before still works. Nothing more.

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s