Unit Testing Denial Pattern #1: Pretending the test is no longer valid

My blog has moved. You can view this post at the following address: http://www.osherove.com/blog/2008/4/30/unit-testing-denial-pattern-1-pretending-the-test-is-no-long.html
Published Wednesday, April 30, 2008 4:21 PM by RoyOsherove

Comments

Wednesday, April 30, 2008 5:23 PM by Jeremy D. Miller

# re: Unit Testing Denial Pattern #1: Pretending the test is no longer valid

Anti-pattern #2:  The unit test is written so poorly that you have no idea if it's important anymore or not.

Solution:  Get in the wayback machine and whack yourself upside the head as you write that unit test in the first place.

Wednesday, April 30, 2008 8:13 PM by RoyOsherove

# re: Unit Testing Denial Pattern #1: Pretending the test is no longer valid

An obscure test would have made it easy to disclaim as "invalid", but this test was so simple and understandable, it was an outright self-lie that I wanted to be believe it to be invalid.

Had it not been readable, the path taken could have been different - for the worse.

So, one other solution: make sure your test is *not* obscure so that the truth hits you in the face when you see it - the test is indeed valid.

Thursday, May 01, 2008 6:26 AM by ploeh blog

# Unit Testing Anti-Pattern #2: Not Covering Bugs In Your Tests With Tests

Roy just posted a unit testing anti-pattern based on his personal experience. I'd like to follow up with