Pin test class in test runner rather than pin each test separately
Would be nice to have ability to pin test class to test runner, rather than pinning each newly added test separately. When adding a new feature, you tend to spam quite a few tests in new test class, or to some existing class. If solution is big, and you have many tests, the response time from NCrunch becomes poor. Of course you can pin each task separately when you add them, but when you spam many small tests, it becomes annoying. NCrunch could automatically detect newly added or modified tests in pinned class(es) and run them, ignoring the rest.

-
Tim Long commented
Pinning a file would be a useful option, too. My use-case is MSpec where each "context" is in a separate class and individual "specifications" (tests) are fields ("It" delegates) in the class. Related tests are most commonly grouped together in a single file containing multiple context classes. In that situation, pinning a class is essentially not much different to pinning a single test. The next level "up" is the file, so to pin a related set of tests one needs to pin the file. Namespace would be the next level up the hierarchy from that, but the file is normally the area of focus and would be the most natural thing to pin.
-
Anonymous commented
Thank you, Remco, for the answer. I was not aware of this functionality. The menu shows "Pin selected test to Test Window", and I always assumed it worked on test to test basis, and you would need to click that menu item each time you add more tests to test fixture.
I agree with Jay, it would be much more intuitive to have an icon next to test fixture class name directly in the source code editor, where you could find menu item saying "Pin test class to Test Window" or something like that.
By the way, thank you for the awesome tool!
-
Jay Bazuzi commented
Today my flow is:
1. Find a test I care about
2. RCick on the ">" for that test in in the NCrunch gutter
3. Select "Pin..."
4. In the Tests Window, go up one node from the test to the containing class
5. RClick and select "Pin..."What I (and I assume Anonymous) am looking for is a shortcut, where I can click in the editor window near the top of the test class and pin the class's tests right there.
R# has something similar already.
-
If I understand this request correctly, NCrunch should already be doing this.
In the Tests Window, you can choose to 'pin' the test fixture itself. When this is done, you should see the little pin appear next to the fixture and all its child tests. If any new tests are added to the fixture, they will automatically be pinned.
Note that this only works at fixture level - it isn't currently possible to pin a namespace or project.