0

为我的产品运行测试器插件(使用SWTBot)时出现此错误:

!ENTRY org.eclipse.ui 4 4 2013-11-07 18:16:48.608
!MESSAGE Referenced part does not exist yet: org.eclipse.jdt.ui.PackageExplorer.
2013-11-07 18:16:48,611 main ERROR                         

此外,我得到这个异常,基本上说我没有将我的测试器插件设置为我的产品的依赖项:

Exception in thread "WorkbenchTestable" java.lang.IllegalArgumentException: No Classloader found for plug-in com.project.test.swtbot
    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:619)

我正在使用 Eclipse RCP。我是否正确解释了错误?有谁知道如何解决这个问题?

提前谢谢了

4

2 回答 2

1

尝试运行配置 -> 插件 -> 验证插件 -> 添加所需的插件

于 2013-11-08T09:42:58.680 回答
0

弄清楚了。对于遇到此问题的任何人,您应该始终在启动配置中使用(除非发生令人毛骨悚然的事情)“所有工作区和启用的目标插件”。这使您的测试能够验证您可能没有考虑的每个依赖项。

干杯

于 2013-11-12T15:01:55.047 回答