我在Mac OS X 10.8.4上的Eclipse 4.2.2 Juno中使用SWTBot 2.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
添加当前的捆绑包,但即使我在那里添加了所有插件,错误仍然存在。
任何帮助?
答案 0 :(得分:1)
我有同样的问题。对我来说,有一个包含未启动swtbot测试的软件包,因为我没有在运行配置中选择它。以下是您应该检查对我有用的步骤:
Run -> Run Configurations… -> your SWTBot Test -> Plug-ins
Launch with: plug-ins selected below only
从Workspace
中选择所有需要运行应用程序的插件+包含SWTBot测试的插件
现在单击Add Required Plug-ins
两次,以确保从Target Platform
确保您拥有最少的SWTBot所需的插件。它们是:org.eclipse.swtbot.eclipse.core
,
org.eclipse.swtbot.eclipse.finder
,
org.eclipse.swtbot.junit4_x
,
org.eclipse.swtbot.swt.finder
Validate Plug-ins
并手动添加此处提到的所有插件Apply
和Run
答案 1 :(得分:0)
在启动配置中 - >插件,你有“启动”组合框设置“所有工作区和启用的目标插件”?
我在同样的问题上挣扎,并发现这是(部分)问题。