
Run Unit Tests Inside Visual Studio #93
Chapter 13, Enhancing Visual Studio
|
421
HACK
TestDriven.NET is packaged with functional versions of the NUnit and
MbUnit unit testing frameworks. It also includes an adapter for executing
Visual Studio Team System unit tests when available. These will be installed
to subdirectories inside the TestDriven.NET directory, as shown in
Figure 13-2.
Run Test(s)
The Run Test(s) command offers a straightforward way to build and run
tests. It is intended to be the default method of test execution in most con-
texts. It automatically detects the test framework being used and executes
tests using the correct test runner. The tests are launched by a test execu-
tion engine running as an external process. This test process is kept alive in
order to improve execution times on subsequent runs. Once a test process
has been cached, a rocket icon will appear in the notify box.
If the code editor window is selected, the test(s) to execute will be deter-
mined by the position of the caret. Individual tests are executed by right-
clicking anywhere inside a test method and selecting Run Test(s), as shown
in Figure 13-3. All tests in a test fixture are executed by right-clicking inside
a class (but outside of any method) and selecting Run Test(s). All tests in a
Figure 13-2. TestDriven.NET Setup