Running a single JUnit test in Eclipse

后端 未结 13 628
面向向阳花
面向向阳花 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:43

    To run only one test method.
    In the (package explorer or project explorer) unfold the class. It should show you all methods. Right click on the one method you want to run, then select Run As -> JUnit from the context menu.

提交回复
热议问题