- Home /
How can I use nunit-console on OS X?
I've got the bundled NUnit working with MonoDevelop-Unity, but I would like to automate some things using the command line. nunit-console comes with MonoDevelop-Unity at: MonoDevelop/Contents/Frameworks/Mono.framework/Versions/2.10.2/bin/nunit-console
, but I don't know how to call this from the console. How do I use it?
Answer by cjubb · Apr 15, 2013 at 03:46 PM
Give this a go:
/Applications/Unity/MonoDevelop.app/Contents/Frameworks/Mono.framework/Versions/2.10.2/bin/nunit-console
Answer by Martin_Gonzalez · Feb 24, 2018 at 03:58 AM
The bad news is that you cannot run unit-tests via command line if you use some UnityEngine native code like GameObject or even Debug.Log because it needs to be initialized and running.
But if you are running tests with pure .net
Just type
nunit-console path/to/your/dll
and that will do the magic
Remember you need to build your solution before, you can use msbuild
command
msbuild path/to/your/solution
Your answer
Follow this Question
Related Questions
Debugging unit tests with Monodevelop 0 Answers
Unit Test Tools and building from MonoDevelop 1 Answer
Is there a way to use Nunit with Unity in Monodevelop ? 10 Answers
Configurations for Moq or another mock testing framework 0 Answers
How to inspect non-MonoBehaviour classes in the debugger 1 Answer