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

Notification

Icon
Error

Disable bower/gulp/etc. in NCrunch builds?
bstenzel
#1 Posted : Friday, November 6, 2015 7:54:21 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/6/2015(UTC)
Posts: 5

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
I'm currently working on project that uses an AngularJS frontend with an WebAPI backend. The frontend uses bower to load the dependencies and gulp to concat/uglify/etc. and builds an index page for development with all the necessary script references. It currently takes NCrunch ~25 seconds to build the assemblies and run the tests. Too long for TDD for my taste.

Is there any way to disable the bower and gulp tasks for NCrunch? I tried excluding js and json files, but to no avail.
Remco
#2 Posted : Friday, November 6, 2015 8:36:41 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi,

Thanks for posting.

I admit that I'm not sure how bower and gulp are integrated into your build, but normally build integration is done with custom build targets hooked in with build <Import> tags inside the project XML.

NCrunch has an environment variable that it always sets when building your project. It's possible to use this to create conditional build behaviour. See http://www.ncrunch.net/documentation/troubleshooting_ncrunch-specific-overrides for more information on this.

If you can find the gulp/bower build targets or imports, you should easily be able to use this to suppress them for NCrunch builds by adding an MSBuild condition to the Import or target invocation.
1 user thanked Remco for this useful post.
bstenzel on 11/6/2015(UTC)
bstenzel
#3 Posted : Friday, November 6, 2015 11:18:46 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/6/2015(UTC)
Posts: 5

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
Thanks for your reply. Dead-on; bower and gulp are integrated with custom build targets. Prefixing all the conditions with "'$(NCrunch)' != '1' And " brought the build time in NCrunch down to under one second. There's still a curious delay of a couple seconds before it actually runs the tests. Would be nice to find the cause of that too, but it's already a lot better than before. Good enough for TDD again. ;)

Thanks again and keep up the great work!
Remco
#4 Posted : Friday, November 6, 2015 11:43:10 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
bstenzel;7958 wrote:
Thanks for your reply. Dead-on; bower and gulp are integrated with custom build targets. Prefixing all the conditions with "'$(NCrunch)' != '1' And " brought the build time in NCrunch down to under one second. There's still a curious delay of a couple seconds before it actually runs the tests. Would be nice to find the cause of that too, but it's already a lot better than before. Good enough for TDD again. ;)


There is a feature coming soon that hopefully can tell us what this delay is :)

bstenzel;7958 wrote:

Thanks again and keep up the great work!


Welcome!
bstenzel
#5 Posted : Thursday, December 10, 2015 6:41:50 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/6/2015(UTC)
Posts: 5

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
Just a heads up: the weird delay had nothing to do with NCrunch. I still had the Fusion logs active from debugging a linker error in a different project, so the delay came from writing hundreds of MB of fusion logs. ;)
1 user thanked bstenzel for this useful post.
Remco on 12/10/2015(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.095 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download