ubuntu - 在 Ubuntu : An exception occurred in the driver while loading tests 上运行 NUnit 测试

标签 ubuntu mono nunit

我已经安装了 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/

相关文章:

c++ - Microsoft::VisualStudio::CppUnitTestFramework 中的参数化测试方法

linux - xvfb 和 xvfb-run 之间有区别吗?

c - 客户端断开连接后是否可以从客户端套接字读取数据?

c# - 让 Linq 与 Mysql 和 Mono 一起玩,这可能吗?

c# - Nunit 测试命名约定示例

c# - 如何配置 TeamCity 以同时运行测试而不是一个接一个地运行?

perl - 在 Ubuntu 中从 perl 脚本运行 Tcl(期望)脚本的命令

linux - 安装 Qt 5.2.1 并使 pkg-config 识别它

c# - 单点触控 : CIContext in FinishedLaunching seems to crash app?

asp.net-mvc - 在 IE 8 上呈现的 html 中出现奇怪的额外字符