Option to Build and Start Running Test Only on File Saves
I'm aware of the sliding building delay - and it can help - but I feel it'd be better to just provide an option to not start processing until I save a file.
Samuel Langlois commented
Matthew has a good point. Running tests on save would be useful for people having a large suite of tests which takes a while to run. It would mean less wasted resources especially when using a grid. And more control on when you want to run tests.
Matthew Steeples commented
@Craig: Our use case is one you've not catered for here (and hopefully one you'd consider as a "proper" use of NCrunch): We've got a few grid nodes that also compile and run tests (some longer running tests). Because these are a shared resource, we don't really want them sat spinning through builds which aren't even going to compile because the developer hasn't finished typing the line that they're working on. Currently we have to make use of the Sliding build delay, and this (in my eyes) is just an extension of that, but rather than being a point in time it's an event
Craig Shea commented
Not to push people away from NCrunch, but Resharper and VS Live Unit Testing do exactly this: only runs tests on save of a file. This is what they call "continuous" testing. Well, it's not continuous testing.
In fact, it's this behavior of only running tests upon saving a file which drives people to use NCrunch in the first place!! I work in a solution with 20K tests (9.5K of these are in one test project alone!) and I do not have any issues using NCrunch.
The biggest reason why you would typically encounter issues using NCrunch is due to not tuning NCrunch correctly for your particular solution. The next biggest reason that NCrunch may not work well is due to something in your configuration/environment/solution which is not considered a "good practice". And finally, the third issue you would encounter with NCrunch are tests which are not well written nor following good unit/isolation testing principles, such as the FIRST principles.
Given all of the above, I see no need to implement such a capability.
Where were these temporary files located? What you've described isn't normal behaviour for NCrunch - it seems like something is going very wrong in your environment. Feel free to post more details in the support forum if you'd like to some help in troubleshooting.
Lamaan Ball commented
I have (for now) abandoned Ncrunch because it slows development down too much. I hogs both processor and hard disk swallowing gigabytes of disk space almost every day with temporary files it does not delete ( Yesterday I deleted 22Gb of Ncrunch temp files that had accumulated over a couple of weeks work). But the real killer is the constant building every character I type. I found myself waiting several seconds just to enter a carriage return.
With Ncrunch disabled I can work again and VS2015 Codelens gives me at least some of Ncrunch functionality back.
Darius Damalakas commented
This would be nice. 3 votes from me. I have a build delay option, but hooking up on 'save' would work much better hear - just simply don't build until i press save (ctrl+s, or ctrl+shift+s).