SQL Server Unit Testing

The SQL Server unit tests feature have been added in the December 2012 update of SQL Server Data Tools (SSDT). This article presents a detailed information on how to create an run unit tests in SQL Server.

The SQL Server unit tests are created in normal VB or C# Test projects and the MSTest infrastructure is used to run the tests and view the results. There are two ways to create SQL Server unit tests in a test project: you can generate tests from a database project opened in SQL Server Object Explorer (SSOX), which creates unit tests with a skeleton T-SQL script for you to complete, or you can manually add unit tests into a test project using the template introduced by SSDT. You can then run these unit tests from Visual Studio or MSTest.

Read the complete article on http://msdn.microsoft.com/en-us/library/jj851200%28VS.103%29.aspx