How to navigate to feature file from resharper test session window in Visual Studio 2012?

≡放荡痞女 提交于 2019-12-10 10:02:45

问题


For acceptance testing I use TeckTalk SpecFlow in Visual Studio 2012. When I run all specflow scenarios, resharper unit test session windows is opened I can see all test results. Like on screen shot below.

The question is, when I see failed test (scenario) in some feature file, how can I navigate directly to this feature file from resharper session window to edit it???


回答1:


It seems to work perfectly well if run via the new VS2012 Test explorer, which on my machine worked automatically from "Run SpecFlow Scenarios" on the project menu. I can only assume Resharper is getting in the way on your machine.

Try Test->Run->All, then all you have to do is double click the test and it takes you straight to the scenario in question.




回答2:


A partial solution that only works when the test has failed is double-clicking on the test name in the resharper test sessions or unit tests window. If the test failed last time it ran then this works perfectly, unfortunately it takes you to the feature.cs file if it last passed/ignored/unknown .

You can when you're in the feature.cs file use the shortcut to navigate solution explorer to the currently open file ( shift+alt+l by default) and then open the feature file as the file above the selected file in the solution explorer. It's not ideal, but it's better than nothing.



来源:https://stackoverflow.com/questions/12447674/how-to-navigate-to-feature-file-from-resharper-test-session-window-in-visual-stu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!