运行测试人员插件(使用 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。我正确地解释了错误吗?有没有人知道如何解决这个问题?
非常感谢提前
答案 0 :(得分:1)
尝试运行配置 - >插件 - >验证插件 - >添加必需的插件
答案 1 :(得分:0)
想出来。对于任何遇到此问题的人,您应该始终在启动配置中使用(除非发生某些令人毛骨悚然的事情)“所有工作区和启用的目标插件”。这使您的测试能够验证您可能不会考虑的每个依赖项。
干杯