IntelliJ Alt + Enter对话框未列出“创建测试”

时间:2017-07-29 11:28:33

标签: java intellij-idea

当我在IntelliJ(Windows 10计算机上的2017.2版)上的类名称上按Alt + Enter时,未列出Create Test选项。我能做些什么才能到达那里?

我的窗口看起来像 enter image description here

我期待着类似的东西 enter image description here 它来自IntelliJ help page for creating tests

是否可以选择将Create Test对话框添加到菜单中?

2 个答案:

答案 0 :(得分:2)

默认为Ctrl + Shift + T

或者您可以通过输入键盘图菜单来更改它,Ctrl + Alt + S以打开设置,然后键盘映射......

enter image description here

答案 1 :(得分:0)

要启用此选项,请转到IDEA设置->编辑器->意图-> Java->声明,然后选中创建测试复选框。左上角的搜索会有所帮助。

IntellJ IDEA setting create test