Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing Stored Procedures
Message
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Title:
Testing Stored Procedures
Miscellaneous
Thread ID:
00655029
Message ID:
00655029
Views:
64
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
Next
Reply
Map
View

Click here to load this message in the networking platform