Is SWTbot supposed to work with Eclipse 3.3.2? [message #40292] |
Wed, 24 June 2009 09:34  |
Eclipse User |
|
|
|
Hi,
I'm completely new to SWTbot, and trying to install it under Eclipse 3.3.2.
The installation itself seems to work (using a locally unzipped
swtbot-update-site-2.0.0.358-dev.zip). I then created a test plug-in
project, added org.eclipse.swtbot.eclipse.finder,
org.eclipse.swtbot.swt.finder and org.junit4 as dependencies, and pasted
the TestSampleDialog class from
http://wiki.eclipse.org/SWTBot/UsersGuide#Getting_started_wi th_SWTBot in
there. The class compiled OK (although with many deprecation warnings),
but I don't know how to run it. I don't have the "SWTbot Test" entry in
my "Run as" menu.
I tried the exact same procedure under an Eclipse 3.4, and there I have
the "SWTbot Test" entry and can run the class.
Am I doing something wrong, or is SWTbot not supposed to work under
Eclipse 3.3?
|
|
|
Re: Is SWTbot supposed to work with Eclipse 3.3.2? [message #40322 is a reply to message #40292] |
Wed, 24 June 2009 12:33   |
Eclipse User |
|
|
|
Eclipse 3.3 used to work fine about 6 months ago.
The only things that may not work are:
- support for any additional widgets or swt styles that were
introduced in eclipse 3.4. You may have to comment out such api.
- bundle manifests that have a minimum version requirement on bundles
that ship with eclipse 3.4. They may possibly work with eclipse 3.3.
Try checking out the swtbot source code from trunk and see what does not
compile and/or breaks and file a bug report. If it's not too much work
for me I'll try to provide some form of backport to 3.3.
--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr
On 24/6/09 19:04, Pierre-Charles David wrote:
> Hi,
>
> I'm completely new to SWTbot, and trying to install it under Eclipse 3.3.2.
>
> The installation itself seems to work (using a locally unzipped
> swtbot-update-site-2.0.0.358-dev.zip). I then created a test plug-in
> project, added org.eclipse.swtbot.eclipse.finder,
> org.eclipse.swtbot.swt.finder and org.junit4 as dependencies, and pasted
> the TestSampleDialog class from
> http://wiki.eclipse.org/SWTBot/UsersGuide#Getting_started_wi th_SWTBot in
> there. The class compiled OK (although with many deprecation warnings),
> but I don't know how to run it. I don't have the "SWTbot Test" entry in
> my "Run as" menu.
>
> I tried the exact same procedure under an Eclipse 3.4, and there I have
> the "SWTbot Test" entry and can run the class.
>
> Am I doing something wrong, or is SWTbot not supposed to work under
> Eclipse 3.3?
|
|
|
|
|
|
|
|
|
Re: Is SWTbot supposed to work with Eclipse 3.3.2? [message #484728 is a reply to message #40503] |
Tue, 08 September 2009 18:16   |
Eclipse User |
|
|
|
Pierre-Charles David wrote:
> Pierre-Charles David a écrit :
>> Ketan Padegaonkar a écrit :
>>> I guess your best bet is to get things from
>>> http://sf.net/projects/swtbot or move to eclipse 3.4 even better 3.5 :)
>>
>> I can't move to 3.4 or later, but I think I'll try the sf.net version.
>> Thanks.
>
> I only tested the TestSampleDialog class, but I confirm that at least on
> this case, version net.sf.swtbot.eclipse-1.2.0.921 from the URL above
> works with Eclipse 3.3.2. I had to do the following changes to the code
> of the sample test case:
>
> - adjust the plugin dependencies and imports to use the net.sf packages;
> - add "throws WidgetNotFoundException" to both test methods to make it
> compile;
> - remove the following section from the testCreateJavaProjet test case:
>
> //Click Next button
> bot.button("Next >").click();
> bot.sleep(500);
>
> It seems the projectSelectionTree.select("Java Project"); above
> already advances to the next (and last) wizard page.
>
> Thanks for your help.
Can I do the following. I have an eclipse 3.3.2 RCP application.
I am developing it on Eclipse 3.5 and have my target application set to
a subset of 3.3.2 plugins. I added the sf.net plugins above. But I get
the following exception at the end of this post. I see that it is
recommended to add org.eclipse.swtbot.eclipse.core. However, if I add
that, then it depends on org.eclipse.core.runtime; version="3.4.0". But
the target needs to have v3.3.2. Does this have a chance of working?
java.lang.RuntimeException: Application
"org.eclipse.swtbot.eclipse.core.swtbottestapplication" could not be
found in the registry. The applications available are:
org.eclipse.update.core.standaloneUpdate,
org.eclipse.update.core.siteOptimizer,
org.eclipse.help.base.infocenterApplication,
org.eclipse.help.base.helpApplication, org.eclipse.help.base.indexTool,
org.eclipse.equinox.app.error,
net.sf.swtbot.eclipse.ui.swtbottestapplication,
org.eclipse.ant.core.antRunner,
org.eclipse.pde.junit.runtime.uitestapplication,
org.eclipse.pde.junit.runtime.legacytestapplication,
org.eclipse.pde.junit.runtime.coretestapplication,
org.eclipse.pde.build.Build, org.eclipse.jdt.core.JavaCodeFormatter.
at
org.eclipse.equinox.internal.app.EclipseAppContainer.startDe faultApp(EclipseAppContainer.java:242)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.start(E clipseAppContainer.java:98)
at
org.eclipse.equinox.internal.app.Activator.addingService(Act ivator.java:112)
at
org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(Ser viceTracker.java:1064)
at
org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialSer vices(ServiceTracker.java:926)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:330)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:274)
at org.eclipse.equinox.internal.app.Activator.start(Activator.j ava:54)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:260)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:111)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:417)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(SingleSourcePackage.java:37)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:405)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:369)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:357)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at
org.eclipse.core.internal.runtime.PlatformActivator.startApp Container(PlatformActivator.java:47)
at
org.eclipse.core.internal.runtime.PlatformActivator.start(Pl atformActivator.java:32)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:350)
at
org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1118)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:634)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:508)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:282)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:468)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:195)
at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:297)
|
|
|
|
|
|
|
Re: Is SWTbot supposed to work with Eclipse 3.3.2? [message #486047 is a reply to message #485711] |
Wed, 16 September 2009 01:16  |
Eclipse User |
|
|
|
John Reysa wrote:
> Ketan Padegaonkar wrote:
>> I should have phrased it correctly.
>>
>> Drop in the swtbot plugins from sf.net into your target -- the sf.net
>> stuff needs no change.
>>
>> The eclipse.ui plugin sits in your IDE -- The artifacts that you build
>> are to be installed in your IDE. This ensures that it launches the
>> net.sf.swtbot.eclipse.ui.swtbottestapplication.
>>
> Ketan, thanks. That did work. So I ran a simple test on the target
> eclipse 3.3.2 target platform. My next step was to create the simple
> rcp mail product. If I launch the test as an application, it runs
> the 3.3.2 eclipse IDE. When I change the launcher to select a product
> I get an error that the product cannot be found. Is there another
> change I need to make to get this to work?
Ketan, I would still be interested in the answer, but I decided to
convert my RCP app to 3.5. I was able to launch the product with
the SWT Launcher and run it through a few button clicks and tree
selections. I really like the work you've done.
|
|
|
Powered by
FUDForum. Page generated in 0.05357 seconds