How To: Create DB Unit Test With Team System In my last post I talked about What Is Database Unit Testing and Why? , in this post I'll show how to create DB Unit Test. Building on the AdventureWorks sample project from VSTSRTM08-V7 VPC , I'll unit test a modified version of the uspLogError stored procedure. -- Removed the error check IF @dbVersion = ' 9.04.10.13.00 ' BEGIN IF ERROR_NUMBER() IS NULL RETURN ; END ... INSERT [ dbo ] . [ ErrorLog ] ( [ UserName ] , [ ErrorNumber ] , ...
What Is Database Unit Testing and Why? Unit testing is a well-understood concept in application development, but the database community has not yet embraced the advantages and strategies of this approach. Therefore, I'd like to start by exploring the fundamental tenets of the unit-testing methodology. Unit testing provides a structured and automated way of testing individual components of a system. Unit tests are most often authored by the developer of the component that is being tested. Each...