tags:

views:

94

answers:

2

Hi, I'm developing a window application in VS2005 using C#. I need to integrate NUnit into my project. Mainly i need to implement the 'Execute' option available in NUint. How can i do this.?

+1  A: 

TestDriven.Net is a .Net Plugin in Vs2005 which will help you achieve it.

nils_gate
its actually for ncover but i want for nunit execution
Arunachalam
my application generates a dll which can be loaded in nunit manually but now i want to do it automatically from my application
Arunachalam
It does have NUnit, included. NCover does not work without Unit testing framework, like NUnit. NCover is a code coverage tool, which calculates how much of your code is covered by the tests you have written.
nils_gate
check this http://testdriven.net/overview.aspx, you can even debug it. I have been using it for quite sometime.
nils_gate
ya that's true but i need to integrate the execution part of nunit in my project can u get me
Arunachalam
@nils - from how I read it, he is trying to integrate NUnit into his app, not into VS
Marc Gravell
A: 

It sounds like you want to run NUnit from your exe?

Unless you go to a lot of trouble, it sounds to me like the best option would be to include the NUnit console exe (and dlls) in your package, and execute via Process.Start, capturing stdout (or writing to a file, which may be simpler). Then parse the output file.

It might not be as pretty as the GUI version, but it will probably be easier to deploy.

Marc Gravell
can u please explain in detail ?
Arunachalam
I don't have detailed notes, since I haven't done it... but if (for whatever reason) you want to exec NUnit at runtime (presumably to test downstream code), you would have to ship the necessary NUnit assemblies etc with your app. It sounds like it *should* work... but again: I haven't tried it...
Marc Gravell