0

I've started a nUnit3 tests on a computer that has 2 core. It seems it runs only with 1 agent.

I've read the documentation but they say the --agents=X is to reduce the number of threads.

Why by default it doesn't use 2 agents if I've 2 cores? Should I use the --agents=X option?

My whole command line:

C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" Solution\MySolution.sln --config=Debug --result=%CD%\TestResult.xml;format=nunit2
J4N
  • 19,480
  • 39
  • 187
  • 340

1 Answers1

0

What version of the NUnit console are you using?

There's an issue in v3.5, where one agent is launched per command line argument, rather than per assembly. (This is unintended.) As you're using a solution file, this would launch just one single agent.

Try specifying the two assemblies explictly, as a workaround:

C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" aTests.dll bTests.dll --config=Debug --result=%CD%\TestResult.xml;format=nunit2

Issue: https://github.com/nunit/nunit-console/issues/116

Chris
  • 5,882
  • 2
  • 32
  • 57
  • We have the 3.6 version of nunit. The issue is that we have around 40 tests projects and we add some regularly. – J4N Jan 31 '17 at 07:54
  • The issue is still present in 3.6, nobodies submitted a PR to fix it yet. You could try rolling back to v3.41? You just need to update the console, the 3.6 framework should still work with it. – Chris Jan 31 '17 at 08:15
  • Do you have a link where I can find this version? I cannot get the 3.41 CONSOLE(https://www.nunit.org/index.php?p=download ) there is only the 3.5 or 3.6 – J4N Jan 31 '17 at 08:29
  • Pre-3.5, the console and framework were bundled together in a single package. See: https://github.com/nunit/nunit/releases/tag/3.4.1 – Chris Jan 31 '17 at 09:09