Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Exception in thread "WorkbenchTestable"
Exception in thread "WorkbenchTestable" [message #21605] Thu, 12 February 2009 21:13 Go to next message
Bhooshan Mogal is currently offline Bhooshan MogalFriend
Messages: 16
Registered: July 2009
Junior Member
Hi,

I am new to SWTBot. I just got it up and running on my environment a
couple of days ago. However, when I try to execute the sample SWTBot Test
for eclipse plugins from the user's guide, it gives me the following
error, after the eclipse workbench gets launched:

Exception in thread "WorkbenchTestable" java.lang.NoClassDefFoundError:
net.sf.swtbot.eclipse.finder.SWTBotEclipseTestCase
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:228)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:313)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1274)
at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r$BundleClassLoader.findClass(RemotePluginTestRunner.java:38 )
at java.lang.ClassLoader.loadClass(ClassLoader.java:607)
at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadC lass(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadC lasses(RemoteTestRunner.java:425)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:445)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:386)
at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
at
net.sf.swtbot.eclipse.ui.TestApplication.runTests(TestApplic ation.java:112)
at
org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Work benchTestable.java:68)
at java.lang.Thread.run(Thread.java:801)

My classpath includes the following classes for swtbot:
C:\swtbotbm\net.sf.swtbot.finder_1.2.0.921.jar;C:\swtbotbm\o rg.apache.commons.collections_3.2.0.v200803061811.jar;C:\swt botbm\org.apache.log4j_1.2.13.v200806030600.jar;C:\swtbotbm\ net.sf.swtbot.eclipse.finder_1.2.0.921.jar;C:\swtbotbm\org.e clipse.swt.win32.win32.x86_3.3.0.v3346.jar

I would be extremely glad if I get any help to get this problem solved.

Thanks,
Bhooshan.
Re: Exception in thread "WorkbenchTestable" [message #21651 is a reply to message #21605] Fri, 13 February 2009 10:54 Go to previous messageGo to next message
Hans Schwaebli is currently offline Hans SchwaebliFriend
Messages: 70
Registered: July 2009
Member
If you are new to SWTBot I suggest to use a new SWTBot version. You seem
to be using a very old one, v.1.2.

The new version is 2.0 (still not finished) and the package names start
with "org.eclipse" instead of "net.sf".

If you then still have a errors, we can look at it, but I think it is
difficult to analyse errors for an old SWTBot version.
Re: Exception in thread "WorkbenchTestable" [message #21696 is a reply to message #21651] Fri, 13 February 2009 19:03 Go to previous messageGo to next message
Bhooshan Mogal is currently offline Bhooshan MogalFriend
Messages: 16
Registered: July 2009
Junior Member
Hi Hans,

Thanks for your reply. I downloaded swtbot v2.0, but it shows me the same
error as before. Only this time, the path for the class
SWTBOTEclipseTestCase (which had the NoClassDefFound before) is different.

The error with v2.0:


Exception in thread "WorkbenchTestable" java.lang.NoClassDefFoundError:
org.eclipse.swtbot.eclipse.finder.SWTBotEclipseTestCase
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:228)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:165)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:554)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:524)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:455)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:443)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:423)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:193)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:368)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:444)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:313)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1274)
at
org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner$Bundl eClassLoader.findClass(RemotePluginTestRunner.java:39)
at java.lang.ClassLoader.loadClass(ClassLoader.java:607)
at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadC lass(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadC lasses(RemoteTestRunner.java:425)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:445)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:386)
at
org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.main( RemotePluginTestRunner.java:63)
at
org.eclipse.swtbot.eclipse.core.UITestApplication.runTests(U ITestApplication.java:122)
at
org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Work benchTestable.java:68)
at java.lang.Thread.run(Thread.java:801)


Thanks,
Bhooshan
Re: Exception in thread "WorkbenchTestable" [message #22051 is a reply to message #21696] Mon, 16 February 2009 12:19 Go to previous messageGo to next message
Hans Schwaebli is currently offline Hans SchwaebliFriend
Messages: 70
Registered: July 2009
Member
@Ketan: Can you please look into it too?

@Bhooshan:
Verify that you have no compile errors in Eclipse (I assume you start it
from IDE). You need the SWTBot plugins in your target platform and in your
Eclipse plugins directory.

I have never tried that example from the user's guide, so I don't know
about it specifically. But such tests work, since SWTBot internally uses
such tests too when building new versions.

Alternatively you can check out all the sources of SWTBot and build it by
yourself using it's "releng" plugin. There is a readme file in that
plugin. If you do what is written then you can build SWTBot and see all
it's tests running.
Re: Exception in thread "WorkbenchTestable" [message #23798 is a reply to message #22051] Mon, 23 February 2009 19:41 Go to previous messageGo to next message
Bhooshan Mogal is currently offline Bhooshan MogalFriend
Messages: 16
Registered: July 2009
Junior Member
Hi folks,

Sorry for the delay in responding. I managed to get swtbot to run with the
eclipse environment on my machine over the last week using some local
help. I also managed to write some testcases and it is working just fine.
Thanks a lot for the help.

I am trying to use SWTBot to automate our products installer. The
installer is built on eclipse/swt (The name of the installer is IBM
Installation Manager), so I would think SWTBot supports it. However, I am
not sure how to set up and run the application so it can be automated.
The SWTBot docs say to launch the Main() method in it's own thread, but we
have no access to the source code.. I only have the .exe. Am I supposed
to launch it using Java Runtime/Java Process? Any advice would be very
helpful.

Thanks,
Bhooshan
Re: Exception in thread "WorkbenchTestable" [message #24131 is a reply to message #23798] Wed, 25 February 2009 04:04 Go to previous message
Madhu Samuel is currently offline Madhu SamuelFriend
Messages: 199
Registered: July 2009
Senior Member
Bhooshan Mogal wrote:

> Hi folks,

> Sorry for the delay in responding. I managed to get swtbot to run with the
> eclipse environment on my machine over the last week using some local
> help. I also managed to write some testcases and it is working just fine.

Can you please help on how to execute an SWTBot testcase?

> Thanks a lot for the help.

> I am trying to use SWTBot to automate our products installer. The
> installer is built on eclipse/swt (The name of the installer is IBM
> Installation Manager), so I would think SWTBot supports it. However, I am
> not sure how to set up and run the application so it can be automated.
> The SWTBot docs say to launch the Main() method in it's own thread, but we
> have no access to the source code.. I only have the .exe. Am I supposed
> to launch it using Java Runtime/Java Process? Any advice would be very
> helpful.

> Thanks,
> Bhooshan


Previous Topic:SWTBotTestCase Not Found!
Next Topic:CVS / SVN Root
Goto Forum:
  


Current Time: Thu Apr 25 08:33:04 GMT 2024

Powered by FUDForum. Page generated in 0.06165 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top