VS2017解决方案包含17个项目,其中11个是NUnit测试项目,在AppVeyor中失败,无法获取远程处理代理错误



我们正在GitHub上开发一个针对以下框架的C# SDK:

<TargetFrameworks>net45;net451;net452;net46;net461;net462;net47;net471;net472;netstandard1.6;netstandard2.0</TargetFrameworks>

VS2017解决方案包含17个项目,其中11个是测试项目。我们有重复的测试项目,以确保我们可以同时测试.NET Framework项目和NetStandard。

由于我们添加了 AppVeyor 无法再成功运行测试net471;472因此我不断收到以下内容:

Unable to acquire remote process agent at NUnit.Engine.Runners.ProcessRunner.CreateAgentAndRunner() at NUnit.Engine.Runners.ProcessRunner.RunTests(ITestEventListener listener, TestFilter filter)

这是 AppVeyor 配置文件 https://github.com/RHEAGROUP/CDP4-SDK-Community-Edition/blob/master/appveyor.yml 的链接,这里是 AppVeyor 项目本身 https://ci.appveyor.com/project/samatrhea/cdp4-sdk-community-edition

我怀疑问题是由于net471;net472,但更多的是由于该解决方案中的项目数量。

有关如何配置 appveyor 以使构建再次成功的一些帮助将不胜感激。在本地所有测试都通过,我们没有同样的问题

提前感谢任何提示!

经过一些谷歌搜索,我发现此错误发生在不同的场景中nunit,并且经常在测试数量变得很高时发生。我看到您尝试安装最新的 NUnit 3.8.0 可以提供帮助,但您这样做的方式不会影响运行器要求进行测试。请尝试将此install部分添加到您的 YAML 中,看看是否有帮助。

install:
- ps: |
Write-Host "Installing NUnit 3.8.0..." -ForegroundColor Cyan -NoNewline
$toolsPath = "$env:SYSTEMDRIVETools"
$nunitPath = "$env:SYSTEMDRIVEToolsNUnit3"
Remove-Item $nunitPath -Recurse -Force
$zipPath = "$($env:TEMP)NUnit.Console-3.8.0.zip"
(New-Object Net.WebClient).DownloadFile('https://github.com/nunit/nunit-console/releases/download/3.8/NUnit.Console-3.8.0.zip', $zipPath)
7z x $zipPath -y -o"$nunitPath" | Out-Null
del $zipPath
$zipPath = "$($env:TEMP)Appveyor.NUnit3Logger.zip"
(New-Object Net.WebClient).DownloadFile('https://www.appveyor.com/downloads/Appveyor.NUnit3Logger.zip', $zipPath)
7z x $zipPath -y -o"$nunitPathaddins" | Out-Null
Move-Item "$nunitPathaddinsappveyor.addins" "$nunitPathappveyor.addins"
del $zipPath
Remove-Path "$nunitPathbin"
Add-Path "$nunitPath"
Write-Host "NUnit 3.8.0 installed" -ForegroundColor Green

最新更新