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

Notification

Icon
Error

Suggestion: Add an integration with an R# plugin to allow running a test using nCrunch manually
alexnorcliffe
#1 Posted : Thursday, March 15, 2012 6:05:58 PM(UTC)
Rank: Member

Groups: Registered
Joined: 9/2/2011(UTC)
Posts: 23

Thanks: 1 times
Was thanked: 5 time(s) in 5 post(s)
I use R#'s test runner alongside nCrunch. It would be great if an option to "Run test using nCrunch" appeared in the R# jewel that it already displays next to each discovered test

I checked with Hadi about the feasibility, here's what he had to say:

[17:57:01] Alex Norcliffe: ping, 2 min question?
[17:57:28] Hadi Hariri: hey
[17:57:31] Hadi Hariri: sure, what/s up?
[17:58:36] Alex Norcliffe: hiya, actually 2 questions:
- are you aware of ncrunch?
- do you know if the R# plugin system exposes enough hooks to add a custom menu item to the unit test runner VS jewels?

i'm about to suggest to Remco (he makes ncrunch) that he writes an R# plugin so that you can run a test via NCrunch's runner from within the R# unit test runner menu that appears next to tests
[17:59:07] Alex Norcliffe: i tend to use ncrunch side by side with r#'s test runner
[17:59:35] Hadi Hariri: yep. know about ncrunch and yes you should be able to plugin into that menu anything
[17:59:40] Hadi Hariri: that's how dottrace, dotcover etc does it.
[17:59:44] Alex Norcliffe: ah, brill
[17:59:44] Hadi Hariri: we allow pretty much anyone to add.
[18:00:01] Hadi Hariri: if he/you need help, make sure to ping me and I'll put you in touch with Victor who runs that test runner.
[18:00:24] Alex Norcliffe: the combination of the two tools is awesome, particularly since ncrunch steers clear of holding up any of the cores that vs uses by default, so the background building really does appear not to impact on vs's responsiveness
[18:00:27] Alex Norcliffe: brill, thanks!
[18:01:37] Hadi Hariri: y ncrunch is pretty good. And lots of people using it.

I'm happy to collab if possible, am already looking into possibly doing some YouTrack / R# integration with Hadi
Remco
#2 Posted : Thursday, March 15, 2012 8:49:35 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've been thinking about this one for a while, as right now with NCrunch it's quite clumsy to be unable to kick off new tests that don't have any code coverage yet - so being able to do this inline would be a very nice thing to have.

The main problems I would have in doing this with resharper are:

1. It wouldn't be available to anyone that isn't using resharper
2. It would be yet another integration point for NCrunch to maintain (believe me, there are already far too many other tools and frameworks NCrunch is integrated with - it's a bit of a maintenance nightmare)
3. It would be a lost opportunity to explore more features in the same area (see below)

Something NCrunch also lacks thus-far is the ability to perform operations and summarise information at method level. This can be particularly annoying in certain circumstances (for example, if you are trying to read coverage with all your methods collapsed). My plan in this area is to introduce a coverage marker that sits alongside method signatures and has a some special behaviour (like kicking off tests that use it as an entry point). It'll take a bit of work to make this happen, but I'm confident the above problem would be solved cleanly and using a more flexible approach.
alexnorcliffe
#3 Posted : Thursday, March 15, 2012 9:04:51 PM(UTC)
Rank: Member

Groups: Registered
Joined: 9/2/2011(UTC)
Posts: 23

Thanks: 1 times
Was thanked: 5 time(s) in 5 post(s)
OK that makes sense... so long as the other issue I mentioned is solved to ensure the summary marker doesn't conflict with R# markers :)

I could always knock-up an independent R# plugin myself I suppose, but I'd need some hints on which nCrunch.Framework(?) methods to call to kick off a test run, if it's even callable from an external assembly at this point
Remco
#4 Posted : Thursday, March 15, 2012 9:36:02 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)
Right now NCrunch doesn't have any kind of extensibility framework in place, so short of calling directly into its code within the VS process (not recommended), trying to arrange the hookup may not be the best approach. My biggest concern is that NCrunch is still in a huge state of flux, and I wouldn't want to break other people's code through the constant rearrangement of my own. Later down the line when NCrunch is more stable, I may look into this a bit more :)
alexnorcliffe
#5 Posted : Thursday, March 15, 2012 9:41:10 PM(UTC)
Rank: Member

Groups: Registered
Joined: 9/2/2011(UTC)
Posts: 23

Thanks: 1 times
Was thanked: 5 time(s) in 5 post(s)
That's fine and understood, I'm doing the same with our own framework for the same reasons (trying to guide people only to the bits that are settled)
The rather thinly veiled offer is for help and collaboration though, which I've made a few times, so have another think about it :) Maybe Marcel would be interested too

In the meantime thanks again for a great tool
1 user thanked alexnorcliffe for this useful post.
Remco on 3/16/2012(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.035 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download