Verifying Databases with Unit Tests
You can test database objects by using a special variation of the unit testing capabilities of Visual Studio Team Edition for Testers. This type of unit test, the database unit test, is integrated fully into the Visual Studio Team System environment. For more information about Visual Studio Team Edition for Testers, see Getting Started with Team System Testing Tools.
In This Section
- Overview of Database Unit Testing
Introduces database unit testing and describes the structure and contents of a database unit test.
- Walkthrough: Creating and Running a Database Unit Test
Provides a step-by-step description of how you can generate a unit test and add Transact-SQL (T-SQL) code and C# test conditions to that test.
- Scripts in Database Unit Tests
Describes the order in which T-SQL scripts are run before, during, and after database unit tests.
- Using Test Conditions in Database Unit Tests
Describes the various test conditions that you can use in a database unit test to verify whether a database object behaves as you expect.
- Using T-SQL Assertions in Database Unit Tests
Introduces the concept of using Assert statements and T-SQL assertions in your database unit tests.
- Designing Database Unit Tests
Describes how to create a basic database unit test.
- Customizing Database Unit Tests in Visual C# or Visual Basic
Describes how to 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.
- Keyboard Shortcuts for Database Unit Test Designer
Provides a list of shortcut keys for the Database Unit Test Designer.
- Database Unit Test Files
Describes the files that contain the components of database unit tests.
Related Sections
- Generating Data with Data Generators
Describes how you can fill a test database with data that can produce meaningful test results without compromising information security.
- Comparing Databases
Describes how you can compare database schemas and data.
- Unit Tests Overview
Describes the uses and types of unit tests and provides links to topics that describe other aspects, such as how to create unit tests and how to test private methods.
- Managing Tests
Describes how to manage tests by using Test Manager.
- Running Tests
Provides links to topics that describe how you can start to run any type of test.
- Test Results and Analysis
Provides links to topics that describe how you can view test results both quickly and in-depth and how you can save, retrieve, delete, and publish them.
- 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.