Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

JustMock performance slower in NCrunch vs Test Explorer?
glinkot
#1 Posted : Thursday, January 15, 2015 3:23:03 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/11/2015(UTC)
Posts: 8
Location: Australia

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
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/h...ntegration-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!
Remco
#2 Posted : Thursday, January 15, 2015 4:00:43 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,986

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
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
glinkot
#3 Posted : Thursday, January 15, 2015 4:07:34 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/11/2015(UTC)
Posts: 8
Location: Australia

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Ok, thanks Remco. I've fiddled with the config wizard and gotten the time down a bit, I'll keep looking into it :)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.029 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download