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

Notification

Icon
Error

nCrunch is very eager
Slampen
#1 Posted : Friday, November 14, 2025 8:34:44 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/20/2012(UTC)
Posts: 5
Location: Norway

Thanks: 2 times
I find nCrunch beeing very eager on analyzing and building projects(, and to degree running tests).

Often it goes berserk on projects that have not been changed or are not directly related to a change.

I would love to run "impacted tests automatically...." but I find my self often turn it off, the ROI is to small. :)

I don't want to wait for nCrunch to analyze and build 70 projects (I know it's way too many) before my little unit test is run.

Windows 11, VS22 and Xunit 2.9.3. Running default settings.

Is there any settings I should have a look on?

\\Stian

Remco
#2 Posted : Friday, November 14, 2025 10:14:17 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 1004 times
Was thanked: 1351 time(s) in 1254 post(s)
Hi Stian,

Thanks for sharing this issue.

Running on an engine mode set to 'Run all tests automatically' WILL aggressively queue up tests covering projects that have changed, but NCrunch normally shouldn't build projects that haven't changed. There are three notable exceptions to this:
1. If you have tests or builds that reach out of NCrunch's workspace and modify files in the foreground solution. This is usually caused by absolute file references. In some cases, this can even cause the engine to loop forever.
2. If you have the copy referenced assemblies to workspace setting turned on for any of your projects, NCrunch will rebuild all projects dependent upon one that has changed. This can significantly increase the amount of background building necessary.
3. If you change the public surface of an assembly built from a project, for example, rename a public method or add a new class, this then changes the overall external 'signature' of an assembly and any projects referencing it must be rebuilt.

Note that you aren't limited to just the 'Run all tests automatically' and 'Run impacted tests automatically'. It's possible to build your own engine mode and specify custom filters. For example, you might want to automatically run all tests that are normally fast executing or are tagged with a certain category, while running other tests only when they are marked as impacted.

It is also worth remembering that NCrunch is designed to use background/spare capacity on your machine to try and get you inline information. It's designed to churn, and though you can certainly target it more carefully, the idea is that you shouldn't need to care about how much it does churn. If you find the background work is slowing your system down, it may be worth adjusting your max number of processing threads to reduce the resources used by the engine.
1 user thanked Remco for this useful post.
Slampen on 11/14/2025(UTC)
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.025 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download