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

Notification

Icon
Error

Enhancement to pinning / modes
willdean
#1 Posted : Thursday, February 6, 2014 10:13:41 AM(UTC)
Rank: Member

Groups: Registered
Joined: 1/31/2012(UTC)
Posts: 25
Location: England

Thanks: 7 times
Was thanked: 2 time(s) in 2 post(s)

I'm not quite sure how this fits with the current custom mode stuff, which I have played with a bit. I often like to work like this:

* By default, I want all tests to run automatically (mode 1)
* If I have any pinned tests, I want to run in mode 4.

So when I want to concentrate on a few tests, I can pin them, but when I've finished with that test, I want everything to run.

Obviously I can do this by manually changing mode all the time, but if I forget to switch back to mode 1, then tests can go un-run for longer than I'd like.

Not quite sure if / how you could add this functionality - it's very simple, but may not fit well with the current architecture - but maybe all it needs is a new condition in the custom conditions which is 'if there are no other pinned tests'.

Then I could have:

'Is pinned'
OR
'If there are no pinned tests'

Thanks,

Will


Remco
#2 Posted : Thursday, February 6, 2014 11:02:27 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Hi Will -

This is an interesting idea. I've had a bit of a think about how such a workflow could be implemented using NCrunch, but it's difficult to find a clean way to do this using the current structure without introducing some kind of magic switch.

It seems almost to me as though you need some kind of macro. I.e. when you pin a test, it automatically switches to 'Pinned only mode', then when you unpin all tests, the mode switches back. Assuming you did all of this with shortcut keys, could you not use an AutoHotKey macro of some sort to do this for you?
willdean
#3 Posted : Thursday, February 6, 2014 11:18:33 PM(UTC)
Rank: Member

Groups: Registered
Joined: 1/31/2012(UTC)
Posts: 25
Location: England

Thanks: 7 times
Was thanked: 2 time(s) in 2 post(s)
Remco;5234 wrote:

It seems almost to me as though you need some kind of macro. I.e. when you pin a test, it automatically switches to 'Pinned only mode', then when you unpin all tests, the mode switches back. Assuming you did all of this with shortcut keys, could you not use an AutoHotKey macro of some sort to do this for you?


You're right, I'm sure I could do something like that, though it would conflict with the use of the mouse for pinning and unpinning, which is actually how I mostly do it (either from the tree view or from the source window right-click). My aim is obviously to get you to do the programming, not me.

Does a condition which is just "'if there are no pinned tests" count as too much magic? I think that would let me make the custom mode I want.

Remco
#4 Posted : Friday, February 7, 2014 12:32:11 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
willdean;5235 wrote:

You're right, I'm sure I could do something like that, though it would conflict with the use of the mouse for pinning and unpinning, which is actually how I mostly do it (either from the tree view or from the source window right-click). My aim is obviously to get you to do the programming, not me.

Does a condition which is just "'if there are no pinned tests" count as too much magic? I think that would let me make the custom mode I want.



I would generally recommend trying to pin tests using the keyboard shortcuts where you can. Not because of any sort of convention, but just because it's faster. We do tend to get very attached to our mouse when we write code, without really noticing how much it slows us down.

But anyway, you're right in that a magic switch is definitely not too much magic at all :) There is already a magic switch for the auto-pinning of new tests (which was added in V2). This would simply be another switch.

The big thing that I'm starting to get scared of is just how many configuration options now exist within NCrunch. The idea was to try and keep it as a simple tool to use, but it's now starting to get quite daunting. Many of the options and switches in NCrunch aren't relevant for the majority of users, and they make it difficult to identify the options that are. I guess I'm trying to prevent NCrunch from become a massive pocketknife where I would rather it was more of a targeted tool. Unless there is a wider calling for an option such as this, I may need to push such requests back until the configuration system can be simplified to make the more important options easier to manage. This will take a bit of UX work I guess.
willdean
#5 Posted : Friday, February 7, 2014 11:17:10 PM(UTC)
Rank: Member

Groups: Registered
Joined: 1/31/2012(UTC)
Posts: 25
Location: England

Thanks: 7 times
Was thanked: 2 time(s) in 2 post(s)
Remco;5236 wrote:

The big thing that I'm starting to get scared of is just how many configuration options now exist within NCrunch. The idea was to try and keep it as a simple tool to use, but it's now starting to get quite daunting. Many of the options and switches in NCrunch aren't relevant for the majority of users, and they make it difficult to identify the options that are. I guess I'm trying to prevent NCrunch from become a massive pocketknife where I would rather it was more of a targeted tool. Unless there is a wider calling for an option such as this, I may need to push such requests back until the configuration system can be simplified to make the more important options easier to manage. This will take a bit of UX work I guess.


I know what you mean about options in general - I know everybody asks for their own special option - I was only proposing my 'are no tests pinned' was added to the list of custom conditions in the "Test Filter Builder" window. You could even take out 'False' as a condition if you didn't want to make the list longer :-)

Of course, this is usually about the point people start to ask for a plug-in model - as if that didn't require absolutely crippling long-term maintenance.
Remco
#6 Posted : Saturday, February 8, 2014 12:43:34 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
willdean;5244 wrote:
Of course, this is usually about the point people start to ask for a plug-in model - as if that didn't require absolutely crippling long-term maintenance.


Absolutely :) I have been looking at ways this could be done. It's all still long term thinking though. There's a few new hoops I'd like to see the engine jump through before I start fixing it down with a plugin model.

Where the 'no other tests are pinned' condition is concerned, this is a very different kind of condition as it applies to the state of the entire engine, rather than that of a single test. Such conditions could be very powerful, but are also much harder to implement with satisfactory performance. Thanks for the suggestion though - I will think about it :)
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.047 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download