I personally almost always invoke the "Show coverage for selected test only" in the body of the test method (where I start my work). So didn't think about invoking it in the production code, which could have multiple tests to select. But that would be cool :)
Quote:The problem is how to narrow down the coverage to a single test with the shortest number of keypresses. It could always be possible to adjust this feature so it works for multiple tests at the same time, but I think that this would make the feature confusing and probably wouldn't help much in the 99% of cases where you only want to see what a specific test is touching.
Agree.
Quote:I'm thinking perhaps a single key option inside the coverage popup, i.e. 'S'. So if you were sitting on a line of code and pressed Ctrl+M, S, then positioned the cursor over the test you wanted to narrow down, and just pressed 'S', this would do the trick.
That would be nice. But I still think it would be helpful if it there was another keyboard shortcut, that when I place cursor in the body of a test method, and press Ctrl + M, C (or something else) code coverage would be narrow down to that test. So I wouldn't have to see the coverage popup. If "Show coverage for current test" keyboard shortcut is customizable in Visual Studio's Options dialog, I may even change it to something like F1 or Alt+F1, so that I can invoke it by one hand :)