This is a reasonable alternative to paid-for programs like NCrunch or Resharper. But if you have any money at all, or your company can afford it, get a professional program. Visual NUnit is buggy, unreliable, and will require you to keep the task manager open to kill its dozens of DLL locking processes. That said, it is free, and it does allow you to run tests in the debugger. But that's like saying you'll make due with a box with ice in it because you don't want to pay for a refrigerator.
Sorry, I really couldn't get on with this. The UI is awkward - it displays DLLs you can test (not nunit projects) and then I think you need to manually type in a namespace to run against. But I had a real job getting it to run anything at all - I managed once and it was really, really slow.
I then uninstalled the extension and was wondering why I couldn't build my solution - turns out I had about 30 visualnunit.exe processes running in task manager.
Nice idea, and appreciate the effort but it really didn't work at all well for me.
It is a good tool tool for debugging a single test. However, if you have a non trivial TestFixture Setup/TearDown, it is a very slow test runner. This is because the TestFixtures are setup and torn down for each test.
Works great except for one thing. If I hit Alt+F and then S to save a file I get a support popup window. I can't be the only person who does this to save a file. Can you please do something about this shortcut, surely a support shortcut is not really required.
I am using Visual studio 2010 and recently I have installed Visual Nunit tool to run Nunit tests via UI.
My source code exists in G: drive. My output is generated in V:\bin drive
When I build solution, visual nunit's UI will not pick the test case.
namespace, test class fields will be empty.
If I change the output folder of the test project to anywhere in G: drive, it picks and I can run the test cases.
Can't we set path to pick dlls from other drive?
Hi - I can run some unit tests using NUnit's stand-alone GUI with no problems. However, when I run the same tests using Visual NUnit with Visual Studio 2010, I get the following error:
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
I think I have tracked this down to needing to edit a config file to add an element along these lines:
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0.3"/>
However, for Visual NUnit, I'm not sure which config file should be edited. I don't think it should be the config file of the assembly I am testing. Should it be nunit-agent.exe.config or nunit.exe.config, or some other config file?
I installed the utility as per instructions. Opened VisualNUnit window in VS2010 Pro, but I just get an empty window. I can select the project, but nothing else is available.
Typed in the Namespace and Fixture but still nothing.
Would like to use this, but can't.
I had the same issue. I built the solution and selected my startup project as the Nunit test project. I clicked the "Run" button without populating any of the fields, and the test cases showed up automatically. I had to hit "Run" again to start them off.
I have workaround - What I did was add a pre-build action to my project that kills off Visual NUnit. This requires powershell.
In your project properties, add the following command to the pre-build event command line:
powershell "Get-Process VisualNunitRunner* -ErrorAction SilentlyContinue | kill"
After you do a build, the VisualNunit process seems to get relaunched, so everything still works.
I did notice a side effect with my workaround above - since the process gets killed off, it doesn't remember which tests have failed. This means that you cannot rerun just the failed tests - you always have to rerun all tests.
Is there a hotkey for running the tests? It seems like I can bind a hotkey to switch to the window, but then I have to use the mouse to actually run the tests. It would be really handy to have a key command that would automatically switch to it and start running all the tests. Also as others had mentioned, an option to automatically run tests upon building, or a dedicated command to both build and run tests would be great.
BTW shouldn't the progress bar turn red if there are any failing tests? That's how the NUnit runner (and a lot of others) work, and could help provide more feedback at a glance, and fit in with the whole red/green TDD thing.
Thanks for a great plugin!
It seems a good tool to me, but apparently it's preventing me to fully rebuild my solution. VS complains about 'warning MSB3061: Unable to delete file', referring to my project-under-test DLL and to nunit.framework.dll, both in test project's bin\debug folder.
As a matter of fact, two instances of VisualNUnitRunner.exe process are running and are holding a lock on those DLL, so neither VS nor me can delete them.
Is there anything wrong I set up? Otherwise I'm afraid I'll have to make it without this nice extension.
Same here. Only happens on occasion but it gets annoying after a while. I can still manage by leaving an open ProcessExplorer on my system tray ready to terminate VisualNunitRunner.exe whenever this happens, but it would be nice to have this bug fixed.