Feature Suggestions

Pin all tests in class (or in current file)

Started by willdean on 546 views

I hope this is a feature suggestion and not an opportunity to by made to look a fool.

I very frequently want to pin all the tests in a test fixture class - this is because I'm working on a particular class and want to see if there are regressions. I know I should be able to rely on impact detection, but the effect of that depends on what run mode I have NC in, and often I just want to see all the tests pinned.

If the test fixture class has a constructor or a setup method, this will have some green dots I can right-click and choose "pin all covering tests", but if it *doesn't* have one of those methods, then I have never found a way to do a "pin all in file" or "pin all in class".

I recognise that the UI probably doesn't need any more variants of "pin this" or "run that" - so could "CTRL M P" gain an additional behaviour - when you're over a class *but not over a method*, then all the test methods in that class get pinned?

Thanks.
Hi, thanks for sharing this.

Right now there is no one step way to do this. The fastest way to do it would be to pin the child test (via the hotkey or coverage markers), then select the (now visible) fixture test in the Tests Window and choose to pin that one.

I'll take the feature request under consideration :)
Thanks for the reply - the project I was working on when I wrote that had the NCrunch Tests window configured "flat" rather than hierarchical (I think I had been looking at execution times), so that option wasn't available, but I'll remember to use this in future.

As a minor nit, several of the options in the context menu are grammatically iffy when you click up in the hierarchy - references to "the selected test" should probably be to "child tests" or "member tests" or something, as you're not actually on "a test" at that point, and the tests are not "selected" either.

Please take the nit-picking as a compliment!

Post a reply

Log in to reply.