Designing Database Unit Tests

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

  • 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.