eclipse中的“JUnit插件测试”和“JUnit测试”之间的区别 [英] Difference between `JUnit Plug-in Test` and `JUnit Test` in eclipse
问题描述
JUnit插件测试
和 JUnit测试
。
之前,我试图启动eclipse插件测试( org.eclipse.jdt.ui.tests.refactoring
),我有一些问题(调试eclipse单元测试代码测试类应该只有一个和工作区已关闭错误)。
问题是当我尝试启动调试器与 JUnit测试
,我得到工作区已关闭
错误。
在eclipse配置中,它们具有相同的工作空间。
< img src =https://i.stack.imgur.com/FwcVV.jpgalt =enter image description here>
- 两者有什么区别?特别是,工作空间如何为他们工作?
- 为什么我有$ code工作区已关闭?是否可以使用
JUnit Test
启动eclipse插件测试?
JUnit插件测试用于测试Eclipse插件。它运行一个新的Eclipse实例。然后,它运行测试。
JUnit测试用于测试常规Java应用程序。它运行测试而不启动新的Eclipse实例。
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 withJUnit Test
?
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.
这篇关于eclipse中的“JUnit插件测试”和“JUnit测试”之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!