in reply to Re: Regression testing
in thread Regression testing

Any time you fix a bug, write a test for it.

And be sure to test the new (or modified) test by running it against the non-fixed, buggy version of the code and making sure the test fails as you'd expect (a la the eXtreme Programming model). THEN fix the code and make sure it passes the test. Otherwise, it's easy to mistakenly write a test that your "fix" passes because it doesn't really test the condition you thought it tested...