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

Notification

Icon
Error

Browse to workspace as a minor change
springjazzy
#1 Posted : Friday, November 2, 2012 4:55:20 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/6/2012(UTC)
Posts: 46

Good day!

It's very convenient for me to use NCrunch not only as test environment, but also as build environment, because of its shadow building. I really need "Browse to workspace" button somewhere on the toolbar. Could you do it as a minor change version - because I've just purchased NCrunch and I hope to see in that license.
Remco
#2 Posted : Saturday, November 3, 2012 12:14:53 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for the suggestion!

Although adding a toolbar option is a fairly low risk/effort task, I'd first like to learn a bit more about the use case you're following to see if I can offer you something better.

Are you using the NCrunch workspaces to run an application that has been built by NCrunch? (i.e. testing your application though its UI)


Cheers,

Remco
springjazzy
#3 Posted : Sunday, November 4, 2012 10:21:42 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/6/2012(UTC)
Posts: 46

>Are you using the NCrunch workspaces to run an application that has been built by NCrunch? (i.e. testing your application though its UI)

Yes, that's exactly what I'm doing. With NCrunch I'don need to build solution in VS(except loading forms designer). But going to Advanced->Workspace-> find executable takes time. What I need is something like F5 in VS.
Remco
#4 Posted : Sunday, November 4, 2012 10:24:20 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
I have an idea that may make this easier .. I'm wondering if you're keen to give it a try. If it works well for you, I may introduce it as a packaged feature.

The NCrunch workspaces aren't really designed with the intention of executing applications directly. Because they always end up in different places, and it can be hard to tell which workspace holds the latest files, you invariably need to rely on the 'browse to workspace' option via the Tests Window.

A way around this could be to make sure that a copy of the files always end up in a consistent place.

Create a directory on your disk - c:\temp\workingdir, then try adding the following build step to your UI project:

<PropertyGroup Condition="'$(NCrunch)' == '1'">
<PostBuildEvent>xcopy /Y *.* c:\temp\workingdir</PostBuildEvent>
</PropertyGroup>

... And ensure you have NCrunch configured to run post build events for this project. My assumption (if you're already running from the workspace) is that the project either works independently or you already have the 'Copy referenced assemblies to workspace' setting turned on. In this way, it should be fine to simply copy the files from this project as part of a build step. If you want to disable the 'Copy referenced assemblies to workspace' setting to improve performance, you can also place this build step against the dependency projects in your solution so that they are also copied into the temporary directory where they can be used by your UI.

In theory, the copying shouldn't interfere with parallel execution and should always leave you with a automatically built set of files stored in a consistent location on your disk. If you want to go a step further, you could always set up a shortcut from your start menu (or some kind of O/S hotkey tool) that will automatically launch the .EXE from the temporary directory. This would be about as close to F5 as you can get.

Anyway I'm eager to hear if this works for you. If so, I may be able to make a more formal approach built into the tool.


Cheers,

Remco
springjazzy
#5 Posted : Monday, November 5, 2012 12:51:52 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/6/2012(UTC)
Posts: 46

Thanks, it worked! However my proposal is to save original VisualStudio variables like $SolutionDir, so that I can get path to solution and set up relative paths. It's inconvenient to set up separate directory for each solution I have.
Remco
#6 Posted : Monday, November 5, 2012 9:04:42 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Great to hear! I have a backlog task planned for the 1.43 release that will involve adding a new environment variable to the NCrunch build process that points back to the original solution location - I think this is what you're asking for. I'd be very interested to hear how you've found this new file copying approach after a couple of weeks of using it ... as if it works well, I'd like to turn it into a packaged feature.
springjazzy
#7 Posted : Tuesday, November 6, 2012 4:55:12 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/6/2012(UTC)
Posts: 46

OK! Could you give me the details when 1.43 will be released? Would it be considered as "minor change version" so that I could use it in the limits of my license?
Remco
#8 Posted : Tuesday, November 6, 2012 9:31:25 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Absolutely. All decimal releases are minor and do not require a new license. The release date of 1.43 is variable at the moment, although I'm aiming to have the build ready about 3-4 weeks from now.
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.053 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download