1

We are developing a C# SDK on GitHub that targets the following frameworks:

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

The VS2017 solution contains 17 projects of which 11 are test projects. We have duplicate test projects to make sure we can test for both the .NET Framework projects and for NetStandard.

Since we added net471;472 AppVeyor can no longer successfully run the tests, i keep getting the following:

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

Here is the link the the AppVeyor config file https://github.com/RHEAGROUP/CDP4-SDK-Community-Edition/blob/master/appveyor.yml and here is the AppVeyor project itself https://ci.appveyor.com/project/samatrhea/cdp4-sdk-community-edition

I doubt the problem is due to net471;net472, but more due to the number of projects in this solution.

Some help on how to configure appveyor to make the builds successful again would be appreciated. Locally all tests are passing and we do not have the same problem

Thanks in advance on any tip!

Sam
  • 333
  • 3
  • 16

1 Answers1

0

After some googling, I see that this error happened to nunit in different scenarios, and often when number of tests becomes high. I see you tried to install latest NUnit 3.8.0 which can help, but the way you did that did not affect the runner called for tests. Please try add this install section to your YAML and see if this helps.

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
Ilya Finkelsheyn
  • 2,851
  • 11
  • 20
  • thanks for the suggstion. I added the install section to the YAML file, but i stil gt the same result. https://ci.appveyor.com/project/samatrhea/cdp4-sdk-community-edition/build/1.0.212 – Sam Aug 14 '18 at 10:06
  • Can you try [parallel testing](https://www.appveyor.com/docs/parallel-testing/)? With single concurrent job free plan you will simple have 2 consequent jobs, but with smaller test number each. Thus we can check If problem is indeed related to tests amount. – Ilya Finkelsheyn Aug 14 '18 at 16:27