Running a single JUnit test in Eclipse

后端 未结 13 575
面向向阳花
面向向阳花 2020-11-27 15:05

If I have a test suite with multiple tests, when I try to run a single unit test, either from the context menu of the code editor, or from the JUnit view, it seems to insist

13条回答
  •  孤城傲影
    2020-11-27 15:40

    Don't use Strg+F11 but the hotkey Alt+Shift+X -> T.
    Then Eclipse will execute the current open file as a JUnit test. The green play button will only run the last chosen Run Configuration.

    For me, it works well with Alt+Shift+X -> T.

提交回复
热议问题