What is the best way to test a stored procedure?

前端 未结 8 2333
借酒劲吻你
借酒劲吻你 2021-02-12 02:40

Like many companies that require all access be through stored procedures, we seem to have a lot of business logic locked away in sprocs. These things are just plain hard to tes

8条回答
  •  清歌不尽
    2021-02-12 03:23

    We had a very thin Data Access layer which basically facaded stored procedures to look like C# methods. Our NUnit test-suite then had SetUp/TearDown to create/rollback a transaction and test methods that called into DAL. Nothing fancy, and proved to be easier to maintain than TSQLUnit test-suite.

提交回复
热议问题