Eclipse中的“JUnit插件测试”和“JUnit测试”之间的区别 [英] Difference between `JUnit Plug-in Test` and `JUnit Test` in eclipse

查看:432
本文介绍了Eclipse中的“JUnit插件测试”和“JUnit测试”之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在eclipse运行命令中,有两个选择: JUnit插件测试 JUnit测试

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

之前,我试过启动eclipse插件测试( org.eclipse.jdt.ui.tests.refactoring ),我有一些问题(调试eclipse单元测试代码测试类应该只有一个和工作区关闭错误)。

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 ).

问题是,当我试图启动调试器用 JUnit Test ,我得到 Workspace关闭错误。

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

>

在eclipse配置中,它们具有相同的工作空间。

In eclipse configuration, they have the same workspace.


< img src =https://i.stack.imgur.com/FwcVV.jpgalt =enter image description here>


  • 两者之间有什么区别?

  • 为什么我有 Workspace被关闭错误与JUnit测试运行?是否可以使用 JUnit Test 启动eclipse插件测试?

  • 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?

推荐答案

JUnit插件测试用于测试Eclipse插件。它运行一个新的Eclipse实例。然后,它运行测试。

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

JUnit测试用于测试常规Java应用程序。它运行测试而不启动Eclipse的新实例。

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

这篇关于Eclipse中的“JUnit插件测试”和“JUnit测试”之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆