views:

282

answers:

3

What are some of the ways? What frameworks can you use?

+3  A: 

Well, I presume you mean unit testing your code that hits the database, in which case, there is NDbUnit, which appears to be a DbUnit clone for .NET. I've never used it, but I have used DbUnit, and it is quite useful.

Edit: I assumed you were using .NET because you mentioned MSSQL. If however you are actually using Java, there is DbUnit.

Mike Stone
+2  A: 

Here's a project which does this: http://tsqlunit.sourceforge.net/

Also, Visual Studio Team System for DBA has built-in support for unit testing of Databases.

Vaibhav
A: 

T.S.T. the T-SQL Test Tool

TST is a tool that simplifies the task of writing and running test automation for code written in T-SQL. At the heart of the TST tool is the TST database. This database contains a series of stored procedures that are exposed as a test API. Part of this API is similar with those found in Unit Testing libraries familiar to programmers in C# or Java.

Ray Vega