how to parallel test in ncrunch

58 views Asked by At

I have a set of test methods as below:

[TestMethod]
public void test1() { System.Threading.Thred.Sleep(10000); }

[TestMethod]
public void test2() { System.Threading.Thred.Sleep(10000); }

[TestMethod]
public void test3() { System.Threading.Thred.Sleep(10000); }

[TestMethod]
public void test4() { System.Threading.Thred.Sleep(10000); }

I would expect the tests to take 10 seconds to complete all the tests.

However it takes 20 seconds, not 10 sec and not 40 sec.

Can anyone tell me why this happens?

Does ncrunch have any config files or settings menu.

I read https://www.ncrunch.net/documentation/concepts_parallel-execution but can not find any options.

1

There are 1 answers

1
mentat On BEST ANSWER

nCrunch by default (configurable) gets half of your cpu cores. I suppose you got 4 cores and end up with two cores for nCrunch, which gives you these numbers as expected.