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

Notification

Icon
Error

General help on using Ncrunch
Cameron
#1 Posted : Sunday, June 28, 2015 8:42:57 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/28/2015(UTC)
Posts: 7
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
Hello,

I'd like to use NCrunch for a project I am starting, but I have a question on how best to use it.

I have some tests which take 30 seconds to run, and I am not sure how to best deal with the long run-times.

I understand 30 seconds is not ideal for a test run-time duration, but because of the nature of the operation
it cannot be split or reduced much further into the ideal XX milliseconds run-time for a unit test.

None the less, I would like to include these tests in my overall test set, but somehow figure out
a way to partition or group the slow running tests from the 'normal' fast tests which run in fractions
of a second.


Can anyone suggest the right way to keep and include these tests, which partitioning them somehow
so that they do not interfere with normal use of NCrunch?

I am very new to NCrunch, by the way, but it seems awesome.
Thanks,
Cameron
Remco
#2 Posted : Sunday, June 28, 2015 10:49:08 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,000

Thanks: 932 times
Was thanked: 1259 time(s) in 1172 post(s)
Hi Cameron,

Thanks for posting!

30 seconds normally shouldn't be a problem. NCrunch can and does work with tests that run for much longer times than this. However, it may be a problem if your solution doesn't support parallel execution.

There's a short guide in the NCrunch documentation targeted towards dealing with tests like these. In summary, the best way to handle them is usually to make sure you have parallel execution enabled and enough resources available for at least 2 processing threads. In this way, NCrunch will automatically arrange the longer running tests in such a way that it can continue to run them with minimal interference to the rest of the test suite. This is done through the use of fast lane threads that can focus on the faster tests while other resources are used for the slower ones.

Where parallel execution on your local machine isn't an option (perhaps the tests aren't designed with this in mind) or you don't have the resources available on your dev machine, it's also worth having a look at distributed processing.
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