0
votes

I have a .Net 4.0 test assemby and I am running nunit-console-x86.exe that fire an nunit-agent-x86.exe process. Do you know if the runner pass the /nothread option to nunit-agent-x86.exe? I have noticed that my tests run successfully when they are executed inside the runner process with that option set (and with a modification of the runner configuration file to target the CLR 4.0)? I am using the version 2.6.4 of Nunit.

2

2 Answers

0
votes

As runners are chained together, the same package is passed from one to the other. That package is created with a setting that reflects the use of /nothread, so every runner receives it, no matter what process they are in.

You haven't indicated why you need that option in the first place. It's a rather strange option, since it says you prefer that the tests be run on the same thread that is used by NUnit itself, rather than creating a new one.

0
votes

I need the /nothread option because some of the objects I instantiate during my tests are COM objects and they need to be instantiated in the main STA thread.