5 minute pause calling Nunit from Powershell?

166 views
Skip to first unread message

Kyle Howard

unread,
Oct 19, 2015, 2:46:29 PM10/19/15
to NUnit-Discuss
My configuration looks like this:

Nunit 2.6.4.14350
OS Server 2012r2
Jenkins 1.628
Nunit plugin .17
Powershell plugin 1.3
.net builds (framework 4.51) using msbuild

I've created a Powershell script that gets a list of files from the compiled directory, makes a list of all of the files that have UnitTest in them, then throws all of those files individually at nunit-console.exe with the /framework switch and the /XML= switch to get my ouput file.

Everything is working smoothly, but when I run my Powershell script (either inside of Jenkins or at the Powershell CLI command line) there is a distinct 5 minute pause between creating the file list and nunit kicking off.  At the beginning it shows the list of found files, then an nunit-console.exe window opens with nothing in it, then in Task Manager I see an NUnit-Agent process running with 0% processor utilization.  At the end of the 5 minutes, everything starts running again and all 49 tests pass in about 8 seconds or so.

The tests pass, everything is technically working, but can anyone explain this strange 5 minute pause in the process or how I might be able to mitigate that?  Our project build time is only about 3 minutes, and having that bump up to 8+ minutes just seems a bit excessive.

Also, if I run nunit-console.exe with those same switches against any individual test, they all pass very quickly.  There's nothing in my logs to indicate any activity at all between creating the file table and nunit actually running the tests.

Any help would be much appreciated!

k.

Charlie Poole

unread,
Oct 19, 2015, 4:28:25 PM10/19/15
to NUnit-Discuss
Is this an extremely large number of files containing tests? What
happens if you use that same number of files on the nunit-console
command-line?
> --
> You received this message because you are subscribed to the Google Groups
> "NUnit-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nunit-discus...@googlegroups.com.
> To post to this group, send email to nunit-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/nunit-discuss.
> For more options, visit https://groups.google.com/d/optout.

Kyle Howard

unread,
Oct 19, 2015, 4:43:11 PM10/19/15
to NUnit-Discuss
It's about 49 tests.  They work very fast if I send them at nunit-console one file at a time or a few at a time.  There doesn't seem to be any one test that makes it take too long, I've tried all of them.

Charlie Poole

unread,
Oct 19, 2015, 5:00:30 PM10/19/15
to NUnit-Discuss
I'm still not entirely understanding your process. When you say
"throws all of those files individually at nunit-console.exe" do you
mean you run nunit-console 49 times? Or do you run it once with 49
files on the command line?

Also, what are all the options used on the command line? Depending on
the combination of options and the target framework, you may be
waiting for 49 processes to be launched before any execution begins.

Charlie

Kyle Howard

unread,
Oct 19, 2015, 5:30:08 PM10/19/15
to NUnit-Discuss
I'm only using the /framework switch and the /xml switch right now.  I definitely don't want to be launching 49 processes, but I suspect that's what's happening.

Charlie Poole

unread,
Oct 19, 2015, 5:42:21 PM10/19/15
to NUnit-Discuss
I really need more detail, without any proprietary info of course.

So... What is the command line exactly... leaving out the names of the
dlls if you like? Are all your test dlls built for the same .NET
version? What is it? :-)

Charlie Poole

unread,
Oct 19, 2015, 5:46:46 PM10/19/15
to NUnit-Discuss
Ah... I see you said .NET 4.5.1 for my last question.

Try using /process:Separate to force all the assemblies to load into a
single process.
Reply all
Reply to author
Forward
0 new messages