Daily Usage Issues

JustMock performance slower in NCrunch vs Test Explorer?

Started by glinkot on 7,066 views

Hi,

I was investigating JustMock as I happen to have a licence with other products I've bought. It looks a bit like TypeMock without the recurring costs. I went through the steps below:

- Integrated JustMock with NCrunch (only one step) - http://www.telerik.com/help/justmock/integration-ncrunch.html
- Set up a 'project' and a 'justmock test project' in a solution. Used this example (http://www.telerik.com/help/justmock/getting-started-quick-start.html) to paste the code into the project under test and the test project. I pasted in the first 3 tests only (TestMethod, CallOriginal_TestMethod and Throws_TestMethod)

The tests come back with the right results, but on my machine (2012 macbook retina) NCrunch takes around 16 secs to refresh when I make an edit.

When using the VS test Explorer, it took a similar time the first time, but having 'warmed up' or loaded whatever it needed, subsequent 'run all' clicks take about 4 secs of real elapsed time, with the tests themselves only adding to 200ms. NCrunch is 16 seconds, every time.

In NCrunch it's showing some of the Mock creations, eg var order = Mock.Create<Order>(Behavior.CallOriginal, "Camera", 2); is taking 2 seconds.

Is there anything I can do to bring NCrunch's cycle time back in line with the test runner?

Thanks!
Hi, thanks for posting!

I'm not sure how much I can help you with this problem, as it seems to be coming from the internals of JustMock. NCrunch follows a somewhat different execution pattern that involves calling back into the test process repeatedly to execute tests in batches. This is necessary for continuous testing as the sequence of execution can change at any time. I can only speculate that JustMock isn't as optimised for this approach. I recommend contacting their support to see if they can help you. I can liaise with them as necessary.

Cheers,

Remco
Ok, thanks Remco. I've fiddled with the config wizard and gotten the time down a bit, I'll keep looking into it :)

Post a reply

Log in to reply.