Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

With NUnit, what project type in Visual Studio do I need to use to create my test project?

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?

like image 250
Blankman Avatar asked Dec 04 '08 19:12

Blankman


People also ask

What is NUnit test project?

NUnit is a unit testing framework for . NET applications. TestLeft provides an NUnit project template for Visual Studio that simplifies creation of NUnit tests that run TestLeft code. You will be able to run such tests by using the NUnit utility or from Visual Studio by using NUnit Test Adapter.

What type of testing does NUnit support?

NUnit is a Unit Testing framework that supports all the . NET languages. It was initially ported from JUnit.


2 Answers

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.

like image 150
Will Dean Avatar answered Oct 14 '22 03:10

Will Dean


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/

like image 38
Kevin Tighe Avatar answered Oct 14 '22 04:10

Kevin Tighe