Navigate between test and test subject在测试和测试主题之间导航
In WebStorm, you can quickly navigate between a test and the test subject.在WebStorm中,您可以在测试和测试主题之间快速导航。
For more information on common testing procedures, see Run tests. 有关常见测试过程的更多信息,请参阅运行测试。
For language- and framework-specific guidelines, see Testing JavaScript, Testing Node.js, and Languages and frameworks.有关特定于语言和框架的指南,请参阅测试JavaScript、测试Node.js以及语言和框架。
Jump from a test to its test subject从一个测试跳到它的测试主题
-
Open a test file in the editor.在编辑器中打开测试文件。 From the editor context menu, choose从编辑器上下文菜单中,选择“转到”|“测试主题”或按Ctrl+Shift+T。 or press Ctrl+Shift+T.The test subject for the current test file opens in the dedicated tab of the editor and gets the focus.当前测试文件的测试主题将在编辑器的专用选项卡中打开并获取焦点。
Jump from a file to its test从文件跳转到其测试
-
Open file in the editor.在编辑器中打开文件。If you want to navigate from a method to its test, position the caret at this method.如果要从方法导航到其测试,请将插入符号定位到此方法。 -
If more than one test is associated with the test subject, select the desired one from the list.如果有多个测试与测试对象关联,请从列表中选择所需的测试。The test for the current file opens in the dedicated tab of the editor and gets the focus.当前文件的测试将在编辑器的专用选项卡中打开,并获取焦点。