nunit: NUnitEngineException : Unable to acquire remote process agent

I’m trying to start some tests with nunit3-console.exe (v3.8.0) on a virtual machine running Windows 10 (x64) but before any tests get executed NUnit stops. I get the following error messages:

Unhandled Exception: NUnit.Engine.NUnitEngineException: Failed to start remote test agent.
   at NUnit.Engine.Services.TestAgency.OnAgentExit(Object sender, EventArgs e)
   at System.Diagnostics.Process.OnExited()
   at System.Diagnostics.Process.RaiseOnExited()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(Object state, Boolean timedOut)

And after a few more seconds this is shown:

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

I recently added the flag –x86 to NUnit and that’s when this issue started. I added the flag because I also added an external file (Microsoft Exression Encoder) to my test project, and it seems to be x86 only. I read (on Stackoverflow I think) that using –inprocess works. I used to have that flag but it is not compatible with –x86. So I can’t get it to work no matter how I try.

This is the command I use to run NUnit: nunit3-console.exe C:\...\GUITests.dll --x86 --where "cat == .NIGHTLY" --result="C:\...\Logs\TestResult.xml;format=nunit2"

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 25 (16 by maintainers)

Most upvoted comments

I think we may need to add more logging!

@rprouse I installed NUnit using NUnit.Console-3.8.0.msi (from https://github.com/nunit/nunit-console/releases)

In this case “remote” merely means “in another process.” NUnit console runs each assembly in a separate process by default. The process has to be started and then connected to in order to issue commands telling it to load and run the tests. The technology used to do this is called “.NET Remoting.”