Hi,
I'm a VFP hack consulting to a shop that has SQL servers spread around pretty thick. I've been brought on board to assist this shop in putting a development process in place. I've got that part covered. The question I have is
unit testing stored procedures.
What do you SQL gurus generally do to test your SPs? My instincts are to have a set of tables that are structurally equivalent to the production tables. There should be an SP in this database that blasts all the records and inserts a known (small) set of records in the tables. Then, write SPs that manually call the production-candidate SPs and compare the results (using SQL's equivalent to ASSERT) to the known good values. These test SPs could be chained together to create a full regression test of the application.
Am I on the right track? How do you guys do it?
Marty Smith
Marty Smith, CSQE