Export (0) Print
Expand All

Designing Database Unit Tests

Visual Studio 2005

Like other test types built into Team Edition for Testers, database unit tests are also integrated into Visual Studio. Using the Database Unit Test designer, you can define Transact-SQL (T-SQL) test scripts that execute database changes and then evaluate the results of those scripts against test conditions that indicate whether the test succeeded or failed. The content provided in this section explains how to create a test project, add database unit tests to that project, and finally how to add T-SQL scripts and test conditions to evaluate the results of the test scripts.

In This Section

How to: Create a Test Project for Database Unit Testing

Describes when you need a new test project and how to create one.

How to: Create an Empty Database Unit Test

Describes how you can create a blank database unit test with a new test class, or add a new database unit test to an existing test class.

How to: Create Database Unit Tests for Functions, Triggers, and Stored Procedures

Explains how to create a database unit test with T-SQL code stubs from these database objects.

How to: Add Test Conditions to Database Unit Tests

Describes how you can add test conditions by using the Database Unit Test Designer.

Related Sections

Generating Data with Data Generators

Describes how you can use Data Generator to create reproducible test data that does not contain sensitive information. When you use Data Generator in combination with database unit testing and a database project that is under version control, you can verify changes to the database before you share them with the rest of the team, reducing risk.

Customizing Database Unit Tests in Visual C# or Visual Basic

Describes how you can edit a basic database unit test to add functionality.

Running Database Unit Tests

Describes how you can run database unit tests and interpret the results.

Overview of Database Unit Testing

Introduces database unit testing and describes the structure and contents of a database unit test.

Terminology Overview of Team Edition for Database Professionals

Provides definitions of terms that are specific to Team Edition for Database Professionals and contains a link to definitions for terms that relate to Visual Studio Team System.

© 2015 Microsoft