« TagTestHelper - you mock me! | Main | A trim(), a trim(), my kingdom for a trim()! »

July 14, 2004

Caution! Test in Progress

Robert Watkins recently blogged about adding annotations to JUnit which I commented upon at the time, but I've just thought of my numero uno use for annotated unit tests should such extra functionality be added.

I want to be able to mark tests as work-in-progress.

Now bear with me - the reason I want to be able to do this is so I can commit these tests to CVS and not break the build because Cruise Control has been instructed to ignore any failures in tests annotated with @in-progress.

With these minor changes to JUnit and Cruise, I'd be able to follow Uncy Kent suggestion and use a broken test as a software bookmark when I leave work at night. The next morning I'd come in, look for my broken WIP test and pick up from there.

Obviously, I can (and do) use broken tests for this purpose now, but I don't like leaving work at night with any dirty laundry hanging out of CVS, so being able to commit my WIP tests and associated code (which hopefully shouldn't break any other tests, right :-)) without incurring the wrath of the resident fascist Build Master has inherent appeal.

Such a tool would also allow the acceptance tests which we hopefully all have delivered along with our shiny new story cards to be committed to source control well in advance of the code, again without breaking the build.

Posted by Andy Marks at July 14, 2004 06:07 PM

Comments

An idea I went with a while back was putting date-based assertions in my test cases. That is: if the test is being run after a certain date, cause it to fail.

An "in-progress" annotation with an expiry date would be really cool as well.

Posted by: Robert Watkins at July 14, 2004 07:41 PM

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?