Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Is SWTbot supposed to work with Eclipse 3.3.2?
Is SWTbot supposed to work with Eclipse 3.3.2? [message #40292] Wed, 24 June 2009 13:34 Go to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
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?


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Is SWTbot supposed to work with Eclipse 3.3.2? [message #40322 is a reply to message #40292] Wed, 24 June 2009 16:33 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
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 #40352 is a reply to message #40322] Thu, 25 June 2009 11:37 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Ketan Padegaonkar a écrit :
> Eclipse 3.3 used to work fine about 6 months ago.

Is there an old release I can download which worked with 3.3? I don't
see any on the website.

> 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.

I'm not sure if/when I will have the time to do that, sorry.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Is SWTbot supposed to work with Eclipse 3.3.2? [message #40382 is a reply to message #40352] Thu, 25 June 2009 11:42 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
On 25/6/09 17:07, Pierre-Charles David wrote:

> Is there an old release I can download which worked with 3.3? I don't
> see any on the website.

http://download.eclipse.org/technology/swtbot/archives/.

--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr
Re: Is SWTbot supposed to work with Eclipse 3.3.2? [message #40412 is a reply to message #40382] Thu, 25 June 2009 13:48 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Ketan Padegaonkar a écrit :
> On 25/6/09 17:07, Pierre-Charles David wrote:
>
>> Is there an old release I can download which worked with 3.3? I don't
>> see any on the website.
>
> http://download.eclipse.org/technology/swtbot/archives/.

Thanks for the link. I don't see the dates corresponding to the
versions, and even the oldest available (2.0.0.204-dev) only contains
directories for ganymede and galileo. No mention of Europa.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Is SWTbot supposed to work with Eclipse 3.3.2? [message #40441 is a reply to message #40412] Thu, 25 June 2009 13:49 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
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 :)

--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr

On 25/6/09 19:18, Pierre-Charles David wrote:
> Ketan Padegaonkar a écrit :
>> On 25/6/09 17:07, Pierre-Charles David wrote:
>>
>>> Is there an old release I can download which worked with 3.3? I don't
>>> see any on the website.
>>
>> http://download.eclipse.org/technology/swtbot/archives/.
>
> Thanks for the link. I don't see the dates corresponding to the
> versions, and even the oldest available (2.0.0.204-dev) only contains
> directories for ganymede and galileo. No mention of Europa.
Re: Is SWTbot supposed to work with Eclipse 3.3.2? [message #40472 is a reply to message #40441] Thu, 25 June 2009 15:09 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
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.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Is SWTbot supposed to work with Eclipse 3.3.2? [message #40503 is a reply to message #40472] Thu, 25 June 2009 15:23 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
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.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Is SWTbot supposed to work with Eclipse 3.3.2? [message #484728 is a reply to message #40503] Tue, 08 September 2009 22:16 Go to previous messageGo to next message
John Reysa is currently offline John ReysaFriend
Messages: 21
Registered: July 2009
Junior Member
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 #484968 is a reply to message #484728] Thu, 10 September 2009 02:43 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
On 09/09/09 3:46 AM, John Reysa wrote:

> 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?

Yes, I think this may just work. Some background:
'org.eclipse.swtbot.eclipse.core' contains the application that
bootstraps swtbot for execution -- which is why it is required in the
target platform. There is a similar plugin in the old swtbot version as
well.

So here's what you may try:
- checkout swtbot source from eclipse.org.
- change the org.eclipse.swtbot.eclipse.ui to launch
net.sf.swtbot.eclipse.ui.swtbottestapplication. You'll notice that this
is listed in the available applications in the error message.
- build swtbot with the change and give it a spin.

Drop in a note if that does not work, and I'll tell you a not so
userfriendly workaround.

--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr
Re: Is SWTbot supposed to work with Eclipse 3.3.2? [message #485261 is a reply to message #484968] Fri, 11 September 2009 02:16 Go to previous messageGo to next message
John Reysa is currently offline John ReysaFriend
Messages: 21
Registered: July 2009
Junior Member
Ketan Padegaonkar wrote:
> On 09/09/09 3:46 AM, John Reysa wrote:
>
>> 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?
>
> Yes, I think this may just work. Some background:
> 'org.eclipse.swtbot.eclipse.core' contains the application that
> bootstraps swtbot for execution -- which is why it is required in the
> target platform. There is a similar plugin in the old swtbot version as
> well.
>
> So here's what you may try:
> - checkout swtbot source from eclipse.org.
> - change the org.eclipse.swtbot.eclipse.ui to launch
> net.sf.swtbot.eclipse.ui.swtbottestapplication. You'll notice that this
> is listed in the available applications in the error message.
> - build swtbot with the change and give it a spin.
>
> Drop in a note if that does not work, and I'll tell you a not so
> userfriendly workaround.
>
I followed the build instructions and renamed my
eclipse-modeling-galileo-win32.zip to eclipse-SDK-3.5-win32.zip so that
it appeared to work with the ant scripts. It looked like it built
successfully, passed 5 tests, but had an error on one test:

....\org.eclipse.swtbot.relen
g\artifacts\tests\org.eclipse.swtbot.swt.finder.test\junit\x ml\TEST-org.eclipse.
swtbot.swt.finder.SWTBot2Test.xml is empty.
[java] [junitreport] This can be caused by the test JVM exiting
unexpectedly

I did the following:
- made the change in the Activator to change the APPLICATION_ID
- rebuilt
- confirmed the change was in the zip file under artifacts
- took the org.eclipse.swtbot.eclipse-2.0.0.394-dev-e35.zip file's
plugins and put them in the Eclipse 3.3 target platform
- tried to run a simple swtbot test.
When running the test, I get the same error:
Application "org.eclipse.swtbot.eclipse.core.swtbottestapplication"
could not be found in the registry.

Is there something I am doing wrong?
Re: Is SWTbot supposed to work with Eclipse 3.3.2? [message #485266 is a reply to message #485261] Fri, 11 September 2009 04:37 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
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
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr

On 11/09/09 7:46 AM, John Reysa wrote:
> I did the following:
> - made the change in the Activator to change the APPLICATION_ID
> - rebuilt
> - confirmed the change was in the zip file under artifacts
> - took the org.eclipse.swtbot.eclipse-2.0.0.394-dev-e35.zip file's
> plugins and put them in the Eclipse 3.3 target platform
> - tried to run a simple swtbot test.
> When running the test, I get the same error:
> Application "org.eclipse.swtbot.eclipse.core.swtbottestapplication"
> could not be found in the registry.
>
> Is there something I am doing wrong?
Re: Is SWTbot supposed to work with Eclipse 3.3.2? [message #485711 is a reply to message #485266] Mon, 14 September 2009 15:19 Go to previous messageGo to next message
John Reysa is currently offline John ReysaFriend
Messages: 21
Registered: July 2009
Junior Member
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?
Re: Is SWTbot supposed to work with Eclipse 3.3.2? [message #486047 is a reply to message #485711] Wed, 16 September 2009 05:16 Go to previous message
John Reysa is currently offline John ReysaFriend
Messages: 21
Registered: July 2009
Junior Member
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.
Previous Topic:Key Press: Enter
Next Topic:Building an RCP application including swtbot tests
Goto Forum:
  


Current Time: Sat Apr 20 02:00:17 GMT 2024

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

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

Back to the top