Stored Procedures
I am writing Informix SQL stored procedures at work right now. (Make that Deformix SQL--they seem to have twisted the definition of SQL in ugly ways.) I decided to write automated regression tests for these procedures before I started trying to test and debug the whole collection--and I'm glad that I did.
I found as I wrote detailed unit tests that there were bugs in the code that were easier to find and fix through unit test, rather than all at once. I also found situations that I found in unit test that would have been a lot harder to figure out as a complete process. For example, I discovered that there were customer records that did not have a corresponding record in the customer account table. Anyway, I think the net effect is that writing the unit tests before testing everything is more efficient.
No comments:
Post a Comment