我已经安装了 mono-complete、nuget 和 nunit。
我正在使用 NUnit Console Runner 来运行 nunit 测试用例。
NUnit 控制台运行器 3.7.0
版权所有 (c) 2017 Charlie Poole, Rob Prouse
运行环境
操作系统版本:Linux 4.4.0.1020
CLR 版本:4.0.30319.17020
测试文件
SampleNUnit.dll
错误、故障和警告
1)错误:
加载测试时驱动程序发生异常。
在(包装器托管到 native )System.Object:__icall_wrapper_mono_remoting_wrapper(intptr,intptr)
在 (wrapper remoting-invoke) NUnit.Engine.Agents.RemoteTestAgent:Run (NUnit.Engine.ITestEventListener,NUnit.Engine.TestFilter)
在 NUnit.Engine.Runners.ProcessRunner.RunTests (ITestEventListener 监听器,NUnit.Engine.TestFilter 过滤器)<0x40ae1bb0 + 0x000ae> 在:0
试运行总结
总体结果:失败
测试计数:0,通过:0,失败:0,警告:0,不确定:0,跳过:0
开始时间:2017-07-24 22:38:51Z
结束时间:2017-07-24 22:38:51Z
持续时间:0.403 秒
感谢您的帮助,以便我可以运行 NUnit 测试用例。
最佳答案
在相关 NUnit issue您提到您使用 mcs
编译了一个测试文件.如果改为使用 xbuild
进行编译在您的 Mono 版本上(msbuild
在较新版本上),您会发现它按预期工作。
xbuild /p:Configuration=Release NUnitTest.sln
关于ubuntu - 在 Ubuntu : An exception occurred in the driver while loading tests 上运行 NUnit 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45291234/