Configuring the NUnit command line to run MonoTouch tests

前端 未结 2 439
無奈伤痛
無奈伤痛 2021-01-24 16:46

I\'ve got a unit test in my MonoTouch project that I can\'t run from inside MonoDevelop -- it fails with \"Unix transport error.\" Poking around on the web it looks like that\'s

相关标签:
2条回答
  • 2021-01-24 17:42

    There isn't a good way to use NUnit with MonoTouch.

    • There isn't currently an NUnit test runner that will run on the iPhone or in the simulator
    • You can test MonoTouch dlls with NUnit running on the Mac with Mono, but you can't use any iOS libraries from those assemblies. This means you can't test your controllers, only backend Model logic with no UIKit stuff.

    Sorry, I have felt the same pain myself. I will post back if a solution ever surfaces.

    0 讨论(0)
  • 2021-01-24 17:47

    set $MONO_PATH to the nunit library to be able to run nunit-console. On my machine, the $MONO_PATH declaration is (in my .profile file):

    MONO_PATH='/Applications/Beta/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/NUnit/:$MONO_PATH'

    0 讨论(0)
提交回复
热议问题