37

If I start my unit tests from TestDriven.NET under VS2008, they run pretty much immediately.

If I start my unit tests using nunit-console.exe, the NUnit console hangs for five minutes before actually running my tests. If I attach a debugger, it seems to be spending its time in System.IO.MemoryStream.Read, called from System.Runtime.Serialization.Formatters, called from System.Runtime.Remoting, on the other side of some native-managed transitions called by NUnit.Core.ProxyTestRunner.Test.get. Sometimes, it's in System.Runtime.Serialization.ObjectManager.RecordFixup or .FindObjectHolder.

This is with NUnit-2.5.2 on 32-bit XP, fully patched. All assemblies are targeted to .NET 2.0.

What is nunit-console up to? Is there any way to persuade it to not do it?

Garth Kidd
  • 7,264
  • 5
  • 35
  • 36
  • 1
    How is your application configured? There's a long search list for configuration files, if it's getting insufficient or invalid configuration, it could be spending lots of time attempting to parse. – ssamuel Nov 07 '11 at 03:11
  • I wish I could remember: I'm now on VS2010, using a much later version of NUnit, and it all works. – Garth Kidd Nov 07 '11 at 23:26
  • Not exactly an answer but I would just give up and go with XUnit, it's really much better anyway. – justin.m.chase Dec 15 '11 at 16:23
  • 1
    Have you tried disabling shadow copy in nUnit console? – Xeon Feb 27 '14 at 08:49
  • I think it's having a hard time communicating with nunit-agent. That's probably why you're having trouble with Remoting, and maybe kill an existing run of nunit-agent. Also try the /process Single that @wigy mentioned. – Saqib Rokadia May 18 '16 at 21:47

1 Answers1

1

I cannot be sure, since I am also lucky to use a new version. You probably have a huge test suite with lots of tests, aren't you? If you do not need application domain isolation for other reasons, you can turn it off and then you save the remoting/marshaling time.

Try this please and give feedback to us how it went:

nunit-console.exe /noshadow /nologo /process Single /domain None whatever.dll

There is also a way to add these options via the configuration files, if you do not want to touch your build scripts even with a stick. :)

wigy
  • 2,174
  • 19
  • 32