Steps to run NUnit tests on OSX

后端 未结 1 1386
既然无缘
既然无缘 2021-01-19 02:59

How do I run NUnit tests developed within VS2010 on a Mac? This seems like a very simple and naive question but I have been struggling to find all the steps. I have done my

相关标签:
1条回答
  • 2021-01-19 03:23

    No need to have monodevelop. After getting nunit you can just call it via (for instance)

    mono nunit-console.exe your.dll
    

    You can also do this using only binaries downloaded from nunit site, just be in the nunit's directory.

    If there is no package for OS X, you can install it by making script invoking nunit (this is how standard nunit install on Linux works) and putting it in your search path. Adding assemblies to GAC is not necessary as long as they are with exe's.

    For example this is nunit-console script on Ubuntu (which can be usually found in /usr/bin):

    #!/bin/sh
    exec /usr/bin/mono --debug $MONO_OPTIONS /usr/lib/mono/2.0/nunit-console.exe "$@"
    

    Of course you should replace /usr/lib/mono/2.0/ with directory which contains nunit.

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