Looking for best practices to test stored procedures?
We use sql server 2008 and my boss insist on testing stored procedures.
What is the best practice on testing stored procedures? Do yo开发者_JAVA技巧u use any tools ? what is your approach?
thanks
Unit testing with a framework like DbUnit and DbFit is invaluable. Having the discipline to test means also knowing what the before and after data should be, encoding tests for edge cases when you find bugs and so on.
We keep a database available in dev that contains idealised test output data for comparing data sets with in the main dev database. Helps to write the tests.
精彩评论