Reputation: 902
I'm trying to run nunit-console.exe from a script and I get an 'Unable to locate fixture' error, but only when I have NUnit GUI also running. Once I close the NUnit GUI the script runs the tests just fine.
Here is nunit command being executed by the script;
"C:\Dev\Test1\Build\NUnit\nunit-console.exe" "C:\Dev\Test1\Tests\bin\Release\Test1.Tests.dll" /framework=v4.0.30319
It can even be a different version of the NUnit GUI that is running and it still interferes (ver 2.5.1 vs 2.5.5). It think it has something to do with the nunit-agent.exe as it runs (spawned by the nunit-console.exe process) when the GUI is not running, but it doesn't run when the nunit colsole runs while the GUI is also running.
Upvotes: 2
Views: 1177
Reputation: 6216
I found this same problem too, which appeared unexpectedly.
The only information that I had found online about it, was a question that someone had posted in a forum and that Charlie Poole (one of the NUnit authors) had responded to it.
Basically, the bug was found in 2.5.5 and was fixed in the next release, available from the NUnit.org download page of the website.
For me, this meant upgrading to NUnit 2.6.1 and the problem disappeared.
I hope this helps to clear your tumbleweed away! :-)
Upvotes: 1
Reputation: 10582
Try using nunit-console-x86.exe
instead of nunit-console.exe
.
Also, try using /framework=4.0
instead of /framework=v4.0.30319
.
Lastly, I've had similar issues when I try to run nunit-console-x86.exe
using a different user account than the logged in user, and so I resolved this by running the exe using the same user account.
Maybe this question will also help: nunit-console can not loacte fixture
Also see this bug: https://bugs.launchpad.net/nunitv2/+bug/582051
Good luck! :)
Upvotes: 0