Eclipse 使用SWTBot但始终遇到[thread“WorkbenchTestable”java.lang.IllegalArgumentException中的异常:未找到插件X的类加载器]

Eclipse 使用SWTBot但始终遇到[thread“WorkbenchTestable”java.lang.IllegalArgumentException中的异常:未找到插件X的类加载器],eclipse,eclipse-plugin,junit4,swtbot,Eclipse,Eclipse Plugin,Junit4,Swtbot,我在MacOSX10.8.4上使用Eclipse4.2.2Juno中的SWTBot2.1.1 网上有一些教程(,),但不管我试了多少次,我总是遇到 !ENTRY org.eclipse.core.net 1 0 2013-07-17 17:33:52.328 !MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source.

我在MacOSX10.8.4上使用Eclipse4.2.2Juno中的SWTBot2.1.1

网上有一些教程(,),但不管我试了多少次,我总是遇到

!ENTRY org.eclipse.core.net 1 0 2013-07-17 17:33:52.328
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences
Exception in thread "WorkbenchTestable" java.lang.IllegalArgumentException: No Classloader found for plug-in com.eclipse.swtbot.setup
at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.getClassLoader(RemotePluginTestRunner.java:79)
at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.getTestClassLoader(RemotePluginTestRunner.java:73)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:693)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:429)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.main(RemotePluginTestRunner.java:64)
at org.eclipse.swtbot.eclipse.core.UITestApplication.runTests(UITestApplication.java:117)
at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71)
at java.lang.Thread.run(Thread.java:680)
每次我运行这个SWTBot测试时,它只会显示一个空的Eclipse窗口,其他什么都不会

有人指出我应该在
Run->Run-Configuration…->SWTBot Test->Plug-ins
,但即使我在其中添加了所有插件,错误仍然存在


有任何帮助吗?

在启动配置->插件中,是否将“启动方式”组合框设置为“所有工作区和启用的目标插件”


我为同样的问题而挣扎,并发现这是问题的一部分。

我也有同样的问题。对我来说,有一个包含swtbot测试的包没有启动,因为我没有在运行配置中选择它。以下是您应该检查哪些步骤对我有效:

  • 运行->运行配置…->您的SWTBot测试->插件

  • 启动时:仅在下面选择插件

  • 工作区中选择所有插件
    您需要运行应用程序+包含SWTBot测试的插件

  • 现在单击两次
    添加所需插件
    ,以确保从
    目标平台

  • 确保您选择了SWTBot所需的最少插件。它们是:
    org.eclipse.swtbot.eclipse.core
    org.eclipse.swtbot.eclipse.finder
    org.eclipse.swtbot.junit4\u x
    org.eclipse.swtbot.swt.finder

  • 单击
    验证插件
    并手动添加此处提到的所有插件
  • 单击
    Apply
    Run

  • 嗨,欢迎来到StackOverflow。这不是一个有用的答案,你应该使用注释,一旦你有了更多的代表,这些注释就可以使用了