Difference between `JUnit Plug-in Test` and `JUnit Test` in eclipse

社会主义新天地 提交于 2019-12-04 03:16:35

问题


In the eclipse run command, there are two choices: JUnit Plug-in Test and JUnit Test.

Before, I tried to launch eclipse plugin test (org.eclipse.jdt.ui.tests.refactoring), and I had some issues ( Debugging eclipse unit test code "Test class should have exactly one" and "Workspace is closed" error ).

The issue was that when I tried to launch the debugger with JUnit Test, I got Workspace is closed error.

In eclipse configuration, they have the same workspace.

  • What is the difference between the two? And especially, how does workspace work for them?
  • Why I have Workspace is closed error with JUnit Test run? Is it possible to launch eclipse plugin test with JUnit Test?

回答1:


JUnit Plug-in test is for testing Eclipse plug-ins. It runs a new instance of Eclipse. Then, it runs the tests.

JUnit test is for testing regular Java applications. It runs the tests without launching a new instance of Eclipse.



来源:https://stackoverflow.com/questions/13894287/difference-between-junit-plug-in-test-and-junit-test-in-eclipse

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