nunit / nunit-console

NUnit Console runner and test engine
MIT License
214 stars 151 forks source link

NUnit console runner hangs when "NUnit.Engine.ITestRunnerFactory was not found" #1356

Open RuvimPiholyuk opened 1 year ago

RuvimPiholyuk commented 1 year ago

I notice that my Jenkins pipeline hangs occasionally with the Nunit console runner. The only consistency is the nunit-agent log has the line: 15:43:59.540 Error [ 5] ServiceManager: Requested service NUnit.Engine.ITestRunnerFactory was not found

A working case has this line: 16:08:11.570 Debug [ 1] ServiceManager: Request for service ITestRunnerFactory satisfied by DefaultTestRunnerFactory

I am using nunit.consolerunner.3.15.0 and my project it targeting .NET Framework 4.7.2

failing nunit-agent.txt working nunit-agent.txt

RuvimPiholyuk commented 1 year ago

Additional info: I'm using this Python script to run nunit3-console.exe on a bunch of test DLLs. Now, the weird thing is that whenever I kick off this process, it tends to get stuck – and mind you, it's only the very first DLL that seems to trigger this hanging problem. Sometimes, it actually manages to finish up smoothly, but if there's a hiccup, you can bet it's with that first DLL. The kicker is that even though I see the result XML files I'm expecting, I've got to manually shut down the process through the Python script. And the kicker's kicker is that this leads Jenkins, to assume that everything's A-okay, which isn't quite the case.

So, while things aren't entirely breaking down, I'd really prefer to sort out this hanging issue for good if I can. Any ideas or fixes you could throw my way to tackle this headache would be incredibly appreciated!

CharliePoole commented 2 days ago

@RuvimPiholyuk Do you still have this problem if you use 3.18.2?