What is the best way to test a stored procedure?

前端 未结 4 1602
悲哀的现实
悲哀的现实 2021-02-12 02:39

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

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-12 03:29

    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.

提交回复
热议问题