Mono 附带的 nunit-console 已弃用,请使用 Nunit Nuget 包或其他形式获取 NUnit

shi*_*oni 5 macos ssh mono nunit-console

如何通过 ssh 在 MAC OSX (Mono 5.18.1) 上的控制台上运行 NUnit 测试

在此输入图像描述

我在 MAC OS X 上有一个测试 dll,需要使用 nunit-console 通过 ssh 连接运行。然而,它给出了错误,表示 Mono 附带的 Nunit-console 已被弃用。

还尝试了 Nunit3-console.exe,但它给出错误(仅当通过 ssh 运行时)

代码:

"/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono" "/Users/TestData/NUnit.Console-3.9.0/nunit3-console.exe" "/Users/TestData/UITest.QPTTests/bin/Debug/UITest.QPTTests.dll"
Run Code Online (Sandbox Code Playgroud)

错误:

System.ComponentModel.Win32Exception : ApplicationName='mono', CommandLine='--runtime=v4.0.30319 "/Users/TestData/NUnit.Console-3.9.0/nunit-agent.exe" b10715dd-58ed-4f6a-9220-6f9a52a2cXXX tcp://137.0.0.1:5125/TestAgency --pid=2129 --work=/Users', CurrentDirectory='', Native error= Cannot find the specified file
Run Code Online (Sandbox Code Playgroud)

小智 1

source /etc/profile在运行unit-console之前尝试执行命令在您的情况下:

source /etc/profile; "/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono" "/Users/TestData/NUnit.Console-3.9.0/nunit3-console.exe" "/Users/TestData/UITest.QPTTests/bin/Debug/UITest.QPTTests.dll"
Run Code Online (Sandbox Code Playgroud)