How to: Run Database Unit Tests
This topic applies to:
Visual Studio Ultimate |
Visual Studio Premium |
Visual Studio 2010 Professional |
Visual Studio Express |
---|---|---|---|
You can run a database unit test in any one of several ways, such as using various windows and the Command Prompt window.
Note
You cannot run database unit tests remotely, that is, by using a test rig.
The ways that are available to you depend on the software that you have installed, as described in Running Database Unit Tests. If you have installed Visual Studio Premium, you will typically use the Test View window to run database unit tests.
To run database unit tests using the Test View window
On the Test menu, point to Windows, and then click Test View.
The Test View window opens.
In the Test View window, click the test or tests that you want to run. By using the CTRL key or the SHIFT key, you can specify discontinuous or continuous blocks of tests.
Do either of the following:
Right-click the surface of the Test View window, and then click Run Selection.
On the Test View toolbar, click Run Selection.
To run database unit tests from the Database Unit Test Designer
On the Test Tools toolbar, click either of the test run icons:
Start Selected Test Project with Debugger (For some profiles, as an alternative, you can press SHIFT+ALT+X.)
Start Selected Test Project without Debugger (For some profiles, as an alternative, you can press CTRL+ALT+X.)
This step runs all tests in the current test run. As soon as you start a test run, the Test Results window appears and displays the progress of the test run. This display includes tests that are running and tests that have completed. For more information, see Interpreting Database Unit Test Results.
See Also
Tasks
How to: Run Automated Tests from Microsoft Visual Studio