Is it possible to implement test development in SQL?

I'm not a db guy. I'm just wondering if it is possible to write statements in Sql so that you can write unit tests for your scripts, for your sprocs, etc., and then even apply the Test Driven Development approach for your sessions?

thanks!

+7
source share
2 answers
+1
source

You can actually do this, not directly from the SQL protocol, but the language in which you are running your application.

Due to the fact that SQL must be encapsulated in DAL (data access level) and all data obtained using repositories (or other data access classes). You can do a unit test of these classes, which will run SQL scripts at the end. So basically you check your SQL code.

It’s easier for me than trying to write such tests in SQL. :)

I used to think about this: http://www.beletsky.net/2010/11/testing-database-and-test-database.html

+1
source

All Articles