appveyor - 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。
由于我们添加了net471;472
AppVeyor 无法再成功运行测试,我不断收到以下信息:
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/samarhea/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:SYSTEMDRIVE\Tools"
$nunitPath = "$env:SYSTEMDRIVE\Tools\NUnit3"
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"$nunitPath\addins" | Out-Null
Move-Item "$nunitPath\addins\appveyor.addins" "$nunitPath\appveyor.addins"
del $zipPath
Remove-Path "$nunitPath\bin"
Add-Path "$nunitPath"
Write-Host "NUnit 3.8.0 installed" -ForegroundColor Green
推荐阅读
- html - 悬停后如何启用下拉菜单?
- c# - Visual Studio 中的 SharePoint 可视化 Webpart 单元测试
- ios - 防止 UICollectionView 在 contentOffset 之外滚动
- typescript - 如何修复 TypeScript 在 localstorage.get 上抛出错误
- extjs - ExtJS 7 Force Froala 编辑器以适应父组件大小
- ios - 我们可以指示 PAServer 执行自定义命令吗?
- spark-submit - 最近有人运行 spark-submit 吗?
- c - 如何获得数组大小均为 10 的 txt 文件和二进制文件的总和?
- amazon-web-services - AWS CloudFormation 模板生成问题
- c# - 使用 NCrontab 进行每日运行的 Cron 表达式,从任何给定时间开始,间隔 50 分钟