views:

385

answers:

3

When I am creating a test project in Visual Studio, do I just create a C# console project type, then import Nunit?

Does the GUI then hook into this project somehow?

There seems to be tons of nunit related .dll's, which ones do I need?

+7  A: 

Just create a class library (i.e. a DLL). You only need to import nunit.framework.dll.

Yes, the nUnit GUI loads your assembly (which can be a DLL or a .EXE) and finds all the public classes which have been marked with the appropriate attributes.

Will Dean
@Will Dean: Thanks for answers. However, as I'm new in all of this, can you be a little more explicit? Create a class library how? for what? At the same time, I need to import NUnit.Framework from where? (I guess my TestProject).
Richard77
+1  A: 

I'd recommend checking out the TestDriven.Net Visual Studio plugin. It allows you to run your tests right from VS, so there's no need to fire up the NUnit GUI.

http://www.testdriven.net/

Kevin Tighe
or Resharper that also supports this
BengtBe
A: 

I have set my VS to start nunit as an external program to run all the tests written in a module. Now what I am trying to do is to create a batch file which will call Myproj.exe. what i am expecting is that it will run Nunit as i have set it to run a external program and execute all my tests in nunit.exe but when i run that batch file it starts running from VS instaed of opening NUnit.

Can any one plz give me a clear idea as how to accomplish it. I am too much stuck.