- add a reference to the C:\Program Files\NUnit 2.5.10\bin\net-2.0\lib\nunit-console-runner.dll to your test project
- add the following class to your test project using System;
- in the test project properties, under 'Application' set the output type as 'Windows Application and the Startup objects as the class created in the previous step. Under the debug tab, browse to the folder containing the csproj for the test project in the 'Working directory' field and put the name of the csproj file in the C'Command line arguments' field
- set the test project as the startup project
namespace MyTests
{
class NUnitDebugRunner
{
[STAThread]
static void Main(string[] args)
{
NUnit.ConsoleRunner.Runner.Main(args);
}
}
}
Now when you hit F5, any breakpoints in the tests will be hit.
Thanks to Blokley
No comments:
Post a Comment