4. Integrating Zanebug with VS.NET (via TestDriven.NET)

Zanebug seamlessly integrates with the excellent TestDriven.NET tool, which is a free add-in for all versions of VS.NET (2002/2003/2005). TestDriven.NET allows you to run Zanebug tests directly within VS.NET and includes several additional features such as Code Coverage and the ability to step through tests in Debug mode.

4.1. Installation

To setup Zanebug and TestDriven.NET integration, simply do the following (the order doesn't matter):

  1. Install Zanebug (version 1.6 or higher)

  2. Install TestDriven.NET (version 2.0 or higher) http://www.testdriven.net

That's it! TestDriven.NET will automatically recognize Zanebug tests and run them using the Zanebug engine. Likewise, if NUnit isn't installed, it will automatically run NUnit tests under the Zanebug engine.

4.2. Usage

Using Zanebug via TestDriven.NET is extremely easy. There are 3 main options:

4.2.1. Run Test

The "Run Test" option appears in the Code Editor and Solution Explorer context menus.

This will execute whatever context your cursor is at. Below are the options:

  • Code Editor

    • Inside Test method - executes Test

    • Inside TestFixture but outside TestMethod - executes TestFixture

  • Solution Explorer

    • Selecting Class File - executes the TestFixture(s) in that class

    • Selecting Project - executes all the TestFixture(s) in that project

    • Selecting Solution - executes all TestFixtures(s) in all projects

TestDriven.NET displays in the Console Window. Below is sample output:

Note

It's important to note that the timing that TestDriven.NET displays ("took 5.20 seconds") is the timing for the entire TestSuite. For accurate timing information, use the Zanebug GUI.

4.2.2. Test With Debugger

The "Test With Debugger" option will do the same thing as "Run Tests", but it will execute in Debug mode. This is extremely useful because it allows you to step through your code / tests as they execute.

4.2.3. Test With Zanebug

You can select a project in the Solution Explorer and use the "Test With Zanebug" option to launch the project dll in Zanebug and run it. This will launch the actual Zanebug GUI and is useful when you need more detailed performance information.