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'.
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?
Remco 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.
willdean 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.
Remco 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.
willdean 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 :)