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

Notification

Icon
Error

Why doesn't NCrunch use my current configuration/platform choice?
jeremygray
#1 Posted : Tuesday, June 21, 2011 4:12:53 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/20/2011(UTC)
Posts: 32
Location: Vancouver, BC, Canada

Thanks: 1 times
Was thanked: 3 time(s) in 3 post(s)
Using 1.32b, NCrunch does not appear to be using the current configuration and platform selection as set within the IDE for when it builds and tests code. It instead appears to be using only the default configuration and platform in the csproj files. Modifying each of our projects to include such defaults is certainly doable on a one-time basis but NCrunch would provide an easier out-of-the-box experience by respecting my in-IDE choices.

Is this a bug report or a change request? :)

Additionally, there may well be tests I need to run for both x86 and x64, and it would be very inconvenient to have to repeatedly edit all of the csproj files to change their default platform until such time as NCrunch picks up the current in-IDE choices. Luckily I do not need to do this quite yet but it came to mind while writing this post and would be quite a pain so I thought it best to mention.
Remco
#2 Posted : Tuesday, June 21, 2011 6:52:30 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Have a look at the UseBuildConfiguration component configuration option. This will let you tell NCrunch which build configuration to use (i.e. DEBUG, RELEASE, etc). Using this, you could set up your own build configuration that is specific to a particular processor architecture and NCrunch should happily use it. I think this answers both of your questions, but I'd also recommend having a look at the $(NCrunch) build environment variable - as if you do decide to manipulate your .proj files for NCrunch, you may find this quite useful.

I hope this helps,


Cheers,

Remco
jeremygray
#3 Posted : Tuesday, June 21, 2011 8:06:26 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/20/2011(UTC)
Posts: 32
Location: Vancouver, BC, Canada

Thanks: 1 times
Was thanked: 3 time(s) in 3 post(s)
Thanks for responding so quickly.

Unfortunately, any project or solution changes I am forced to make that are entirely specific to NCrunch will not pass review, so otherwise-unjustified additions to the list of build configurations and/or use of the NCrunch environment variable are out the window, I'm afraid.

I've been able to sell the AssemblyInfo file modifications from my other thread on the basis that those assembly attributes are essentially deprecated, and was able to twist some arms to get the project default configuration and platform settings pre-approved but that will only cover a single configuration (which will be our x86 one since we test that more often than x64.)

I won't be able to use NCrunch for x64, though, since I'm not inclined to editing dozens of project or NCrunch configuration files every time I need to switch, and would in any case still suggest that NCrunch pick up the IDE build configuration and platform either for release or not long thereafter.

To be clear, I still hope to use NCrunch as much as possible. I'll take care of the previously-noted changes as soon as I can and post back up once I've either found success or am next in need of assistance.
Remco
#4 Posted : Wednesday, June 22, 2011 11:52:55 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Would it be helpful for you if NCrunch exposed a configuration option that allowed you to inject build properties without needing to modify the .proj files?

I've been considering doing this for a while, so I don't see why it couldn't be introduced in an upcoming version.
jeremygray
#5 Posted : Wednesday, June 22, 2011 2:03:16 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/20/2011(UTC)
Posts: 32
Location: Vancouver, BC, Canada

Thanks: 1 times
Was thanked: 3 time(s) in 3 post(s)
I'd need to see an example of what you have in mind to be sure, but with a few assumptions it should do the trick for my current needs. So long as these properties you intend to inject are to be set in NCrunch's configuration window for the whole solution, not once per project, that is.

All said, not respecting the IDE's current build configuration and platform still sounds like a feature gap to me. Some of the solution-level build configurations I'm faced with reference differing project-level build configurations and your build-property-injection idea almost surely wouldn't cover that. Not to mention that most users would expect NCrunch to follow the IDE build configuration and platform as they change them. I expect to buy NCrunch for my own use on the job but things like this may well affect my ability to sell the idea to the rest of the team.
Remco
#6 Posted : Wednesday, June 22, 2011 4:54:00 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
I think that for the project(s) you are working on, the idea of following the currently selected IDE build configuration would be useful .. and I can also understand that in situations where people are using a large number of inline build conditions in their code, this would be very important.

Where this idea may start to introduce complications is when people use build configurations as simply a switch between different build objectives (i.e. debug vs release). I know many projects I work on would likely behave very strangely under NCrunch if I were to run it against a release mode configuration, as this configuration includes many custom build steps that wouldn't normally be expected when running automated tests on a developer's machine.

It seems to me that the sensible approach here would be to make it configurable. Are there any build configurations that you absolutely would not want to run NCrunch with? I'm wondering if this should be a simple on/off switch or perhaps something more complicated.
jeremygray
#7 Posted : Wednesday, June 22, 2011 5:20:30 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/20/2011(UTC)
Posts: 32
Location: Vancouver, BC, Canada

Thanks: 1 times
Was thanked: 3 time(s) in 3 post(s)
I hear you loud and clear on the potential for issues running tests against any random configuration/platform combo whenever one happens to be selected in the IDE. It isn't so much of an issue here but I can definitely see how it could be elsewhere.

At an absolute minimum I can get away with debug x86 (which will already be addressed through the csproj changes I've been able to get pre-approved, as much as there could be nicer out-of-the-box ways to do it) and can use other tooling to manually run the test suite for other configurations and/or platforms.

One step up from there would give me a way to use NCrunch against the x64 output when I'm in the midst of a period of x64 development, without requiring an inordinate amount of effort to switch to that platform and back once I'm done.

Everything beyond that helps progressively round out the product, of course, and helps me sell it to the rest of the organization, but I can't say quite yet what the drop-dead requirements would be in order to get wider adoption here. All I can say for sure at the moment is that if I can get NCrunch running for debug x86 on my own workstation you'll have at least one sale, and pretty much regardless of price. :)
Remco
#8 Posted : Thursday, June 23, 2011 6:54:52 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Good to hear. Thanks for all your feedback and suggestions. I'm having a closer look at the solution build configuration and will see if I can come up with an intuitive way to handle it. Please let me know if you notice any other potential barriers to adoption in your organisation - as I'm eager to knock these away as early as possible.

Of course, I'm also glad you enjoy using the tool :)
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.052 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download