Unit Testing Database Logic for SQL Server Database Developers

I haven't tried it, but Karl Gram seems to be cooking up something interesting - dbUnit for unit testing database logic.

dbUnit aids the developer in creating unit tests for all your database logic. You can test the table structure, inserts, updates, deletes, triggers and also procedures. In general the tool allows you as a developer to write all your unit tests in T-SQL and use NUnit to unit test them.

Some of the features of the current alpa version (0.5) are:

  • Create a dbUnit project
  • Add unit tests to the project
  • Specifiy the SQL Server to connect to
  • Handle expected exceptions (e.g raiserror and other database errors)
  • Generate the NUnit test dll
  • Start NUnit from within dbUnit

Learn more here.

Recent SQL Server related posts:

Source: David Hayden ( Florida ASP.NET Developer )

 

posted on Sunday, December 18, 2005 6:35 PM

Main

News

Green Tea

.NET Development

Enterprise Library

Patterns & Practices