swtbot-users Mailing List for SWTBot - SWT/Eclipse functional testing (Page 25)
Brought to you by:
kpadegaonkar
You can subscribe to this list here.
| 2008 |
Jan
|
Feb
(14) |
Mar
(6) |
Apr
|
May
(15) |
Jun
(126) |
Jul
(128) |
Aug
(31) |
Sep
(35) |
Oct
(188) |
Nov
(47) |
Dec
(19) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(25) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2010 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Ketan P. <ket...@gm...> - 2008-05-28 05:06:54
|
I just tried running SWTBot 1.0 against the rcp mail example, the good news is that SWTBot works for RCP :) Here are the launch settings in case you want to try it out: Test runner: junit 3 run a product: org.rcpmail.product Launch with: All workspace and enabled target plugins I've checked in some sample code in http://swtbot.svn.sourceforge.net/svnroot/swtbot/trunk/examples/rcp/ If you're interested. Cheers, Ketan Padegaonkar I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse On 27-May-08, at 1:18 PM, Pontus Amberg wrote: > Is it possible to use SWTBot with a RCP application? A RCP application > is using run() on a class implementing IPlatformRunnable and not > main() > so I'm a bit confused how SWTBot shall be used when testing and > recording a RCP app. > > /Pontus > |
|
From: Ketan P. <ket...@gm...> - 2008-05-27 09:24:22
|
On 27-May-08, at 1:18 PM, Pontus Amberg wrote: > Is it possible to use SWTBot with a RCP application? A RCP application > is using run() on a class implementing IPlatformRunnable and not > main() > so I'm a bit confused how SWTBot shall be used when testing and > recording a RCP app. I've never really tried this. You can however run tests if you launch your application as a pde app. Your tests will continue to work when you move to an RCP based SWTBot. I'm hoping to add support for RCP in 1.1, hopefully. Let me know if you'd like to collaborate on this :) Cheers, Ketan Padegaonkar http://swtbot.org/ - a functional testing tool for SWT/Eclipse |
|
From: Pontus A. <pon...@mi...> - 2008-05-27 07:48:47
|
Is it possible to use SWTBot with a RCP application? A RCP application is using run() on a class implementing IPlatformRunnable and not main() so I'm a bit confused how SWTBot shall be used when testing and recording a RCP app. /Pontus |
|
From: Ketan P. <ket...@gm...> - 2008-05-22 17:45:59
|
Hi, I just made new release of SWTBot - 1.0 Some of the features include: - A recorder API — now you can record SWTBot scripts. Still in beta though. - Better SWTBot integration in eclipse — now you can run tests within eclipse. - More API — now you can use more SWT controls using an even richer API. - More stable than before. For more details, you can read up on the release notes at http://swtbot.org Cheers, Ketan Padegaonkar I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse |
|
From: Ketan P. <ket...@gm...> - 2008-05-17 02:47:42
|
All: Please welcome another committer, Sami on board! Sami would be in charge of all things eSWT :) For those who do not know eSWT, it is SWT for embedded devices (http://eclipse.org/ercp) He's currently working on a branch trying very hard to make sure that this happens. Cheers, Ketan Padegaonkar http://swtbot.org/ - a functional testing tool for SWT/Eclipse Begin forwarded message: > From: Sami Lechner <sam...@gm...> > Date: 17 May 2008 4:36:54 AM GMT+05:30 > To: Ketan Padegaonkar <ket...@gm...> > Subject: first step done > > hi Ketan > > I am more or less half way! I created a new project called > "net.sf.swtbot.base.finder". I imported all the stuff from finder and > than modified it so that it would run with eswt. I am just checking in > all my stuff. Its still very rough not commented but working. > please take a look at this new class and let me know what you think of > the following. > > * I will create another finder project. This one will be for eswt. The > existing one will only be used for swt. > * the two finder for eswt and swt will only be wrapper for their > specific code. meaning we share a common base but everything > specific to > the two version will be an extension of the base. > > I might be able to pull this off tomorrow the only problem than is > that > I am not a master of ant. So once this builds in Eclipse I would like > you to take this one and bring it into build scripts. > > > deducting the hockey match I have 3 hours on the clock :) > > my first and most important goal is to get this now as fast as > possible > into the main branch so that we avoid merging as much as possible. > Later > I will polish the eswt stuff up so it can be shown to the public > without > me loosing my face :) > > Sami > |
|
From: Ketan P. <ket...@gm...> - 2008-05-14 19:54:27
|
Hi Sarvani, This seems to be an issue with multiple classes on the classpath. I'm still in the process of figuring out where these are coming from. I see this issue come up only on linux and not on windows and mac. For now you could just use whatever is located at http://swtbot.sourceforge.net/artifacts/trunk/ . I'll be updating this nightly. Do let us know your experiences with SWTBot. Cheers, Ketan Padegaonkar I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse On 14-May-08, at 7:44 AM, Ketan Padegaonkar wrote: > Ouch, I just managed to reproduce this error on linux :( Never seen > this before on mac or windows. > > For now I've uploaded the latest artifacts from trunk at: http://swtbot.sourceforge.net/artifacts/trunk/ > . I'll have my cruise running on the mac push these artifacts to the > sf.net site on every build, so the url will always contain the > latest green build. > > I'll fix this and get back to you sooner than later when I fix this > issue on linux. |
|
From: Ketan P. <ket...@gm...> - 2008-05-14 02:15:14
|
Ouch, I just managed to reproduce this error on linux :( Never seen this before on mac or windows. For now I've uploaded the latest artifacts from trunk at: http://swtbot.sourceforge.net/artifacts/trunk/ . I'll have my cruise running on the mac push these artifacts to the sf.net site on every build, so the url will always contain the latest green build. I'll fix this and get back to you sooner than later when I fix this issue on linux. Cheers, Ketan Padegaonkar http://swtbot.org/ - a functional testing tool for SWT/Eclipse On 14-May-08, at 5:21 AM, sarvani jayanty wrote: > Hi Ketan, > I just switched to a linux box now. Its much easier!! > Now I am failing at the tests!!!! What am I missing this time?? > > -Sarvani > > ---------------------------------------------------------------------------------- > [java] test: > [java] [mkdir] Created dir: /usr/local/swtbot/ > net.sf.swtbot.build/artifacts/tests/net.sf.swtbot.recorder.test/ > junit/xml > [java] [junit] Exception in thread "main" > java.lang.NoClassDefFoundError: > [java] [junit] Caused by: java.lang.ClassNotFoundException: > [java] [junit] at java.net.URLClassLoader > $1.run(URLClassLoader.java:200) > [java] [junit] at > java.security.AccessController.doPrivileged(Native Method) > [java] [junit] at > java.net.URLClassLoader.findClass(URLClassLoader.java:188) > [java] [junit] at > java.lang.ClassLoader.loadClass(ClassLoader.java:306) > [java] [junit] at sun.misc.Launcher > $AppClassLoader.loadClass(Launcher.java:276) > [java] [junit] at > java.lang.ClassLoader.loadClass(ClassLoader.java:251) > [java] [junit] at > java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) > [java] [junit] java.io.FileNotFoundException: /usr/local/ > swtbot/net.sf.swtbot.build/test-sandbox/test-eclipse/eclipse/plugins/ > net.sf.swtbot.recorder.test_1.0.0.1/ > junitvmwatcher1674882563.properties (No such file or directory) > [java] [junit] at > java.io.FileInputStream.open(Native Method) > [java] [junit] at > java.io.FileInputStream.<init>(FileInputStream.java:106) |
|
From: sarvani j. <sja...@gm...> - 2008-05-13 23:52:30
|
Hi Ketan,
I just switched to a linux box now. Its much easier!!
Now I am failing at the tests!!!! What am I missing this time??
-Sarvani
----------------------------------------------------------------------------------
[java] test:
[java] [mkdir] Created dir:
/usr/local/swtbot/net.sf.swtbot.build/artifacts/tests/net.sf.swtbot.recorder.test/junit/xml
[java] [junit] Exception in thread "main"
java.lang.NoClassDefFoundError:
[java] [junit] Caused by: java.lang.ClassNotFoundException:
[java] [junit] at
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
[java] [junit] at
java.security.AccessController.doPrivileged(Native Method)
[java] [junit] at
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[java] [junit] at
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[java] [junit] at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
[java] [junit] at
java.lang.ClassLoader.loadClass(ClassLoader.java:251)
[java] [junit] at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
[java] [junit] java.io.FileNotFoundException:
/usr/local/swtbot/net.sf.swtbot.build/test-sandbox/test-eclipse/eclipse/plugins/net.sf.swtbot.recorder.test_1.0.0.1/junitvmwatcher1674882563.properties
(No such file or directory)
[java] [junit] at java.io.FileInputStream.open(Native
Method)
[java] [junit] at
java.io.FileInputStream.<init>(FileInputStream.java:106)
On Mon, May 12, 2008 at 5:41 PM, Ketan Padegaonkar <
ket...@gm...> wrote:
>
> On 13-May-08, at 5:26 AM, sarvani jayanty wrote:
> > [java] C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox
> > \test.xml:57: E
> > xecute failed: java.io.IOException: Cannot run program "unzip":
> > CreateProcess er
> > ror=2, The system cannot find the file specified
>
> You'll need unzip.exe on the path :) You can get a copy from
> http://www.info-zip.org/
>
> I'll also update the README about this requirement.
>
> Cheers,
> Ketan Padegaonkar
> I blog... therefore I am... http://ketan.padegaonkar.name
> http://swtbot.org/ - a functional testing tool for SWT/Eclipse
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> SWTBot-users mailing list
> SWT...@li...
> https://lists.sourceforge.net/lists/listinfo/swtbot-users
> http://swtbot.org/ - a functional testing tool for SWT/Eclipse
>
>
--
Sarvani Jayanty
QA Eng., Azureus Inc.
email: sja...@gm...
mobile: 650 862 9554
|
|
From: Ketan P. <ket...@gm...> - 2008-05-13 00:41:54
|
On 13-May-08, at 5:26 AM, sarvani jayanty wrote: > [java] C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox > \test.xml:57: E > xecute failed: java.io.IOException: Cannot run program "unzip": > CreateProcess er > ror=2, The system cannot find the file specified You'll need unzip.exe on the path :) You can get a copy from http://www.info-zip.org/ I'll also update the README about this requirement. Cheers, Ketan Padegaonkar I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse |
|
From: sarvani j. <sja...@gm...> - 2008-05-12 23:56:37
|
Hi Ketan,
Thanks for your quick reply.
When I initially emailed you I was using 3.3.2 version 20071019 eclipse.
Now I downloaded eclipse 3.3 verison and replaced the older buid.properties
file. As you mentioned I changed the values in the
build.developer.properties.sample to:
os = win32
ws = win32
arch = x86
update-site-location = update-site
eclipse.sdk.archive = eclipse-SDK-3.3-win32.zip
and renamed it to build.developer.properties. This time I got a different
error. It is unable to unzip eclipse zip file into test-eclipse.
--------------------------------error-----------------------------------------------------------------------------------------
[java] [unzip] Expanding:
C:\Automation\swtbot\net.sf.swtbot.build\test
-sandbox\eclipse-SDK-3.3-win32.zip into
C:\Automation\swtbot\net.sf.swtbot.build
\test-sandbox\test-eclipse
[java]
[java] installTestPlugins:
[java]
[java] BUILD FAILED
[java]
C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox\test.xml:315:
The following error occurred while executing this line:
[java]
C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox\test.xml:293:
The following error occurred while executing this line:
[java]
C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox\test.xml:32: T
he following error occurred while executing this line:
[java]
C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox\test.xml:42: T
he following error occurred while executing this line:
[java]
C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox\test.xml:57: E
xecute failed: java.io.IOException: Cannot run program "unzip":
CreateProcess er
ror=2, The system cannot find the file specified
[java]
[java] Total time: 1 minute 3 seconds
BUILD FAILED
C:\Automation\swtbot\net.sf.swtbot.build\build.xml:233: Java returned: 13
---------------------------------------------------------------------------------------------
Regards,
Sarvani
On Mon, May 12, 2008 at 4:17 PM, Ketan Padegaonkar <
ket...@gm...> wrote:
>
> On 12-May-08, at 11:46 PM, sarvani jayanty wrote:
> > I am running this on a windows 32bit machine, so did not change any
> > default values in the build.properties file except for the eclipse
> > version.
>
>
> Touching build.properties is probably a bad idea. Take a look at
> build.developer.properties.sample and copy it to
> build.developer.properties to suit your needs. Properties from
> build.developer.propoperties take precedence over build.properties.
>
> Cheers,
> Ketan Padegaonkar
> I blog... therefore I am... http://ketan.padegaonkar.name
> http://swtbot.org/ - a functional testing tool for SWT/Eclipse
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> SWTBot-users mailing list
> SWT...@li...
> https://lists.sourceforge.net/lists/listinfo/swtbot-users
> http://swtbot.org/ - a functional testing tool for SWT/Eclipse
>
>
--
Sarvani Jayanty
QA Eng., Azureus Inc.
email: sja...@gm...
mobile: 650 862 9554
|
|
From: Ketan P. <ket...@gm...> - 2008-05-12 23:18:19
|
On 12-May-08, at 11:46 PM, sarvani jayanty wrote: > I am running this on a windows 32bit machine, so did not change any > default values in the build.properties file except for the eclipse > version. Touching build.properties is probably a bad idea. Take a look at build.developer.properties.sample and copy it to build.developer.properties to suit your needs. Properties from build.developer.propoperties take precedence over build.properties. Cheers, Ketan Padegaonkar I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse |
|
From: Ketan P. <ket...@gm...> - 2008-05-12 22:52:32
|
Hi Sarvani, So far the instructions you've mention seem fine. Download eclipse SDK in test-sandbox, extract a copy into eclipse-target in a top level folder. To diagnose better could you tell me more on what eclipse version you are using so I can replicate the problem? I've been using eclipse- SDK-3.3 all this while on mac, and my CruiseControl runs on windows, I've also run builds on linux and so far I have not hit this particular issue. Could you try building with 3.3 to start with and start making small changes to build with your eclipse version ? Cheers, Ketan Padegaonkar I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse On 12-May-08, at 11:46 PM, sarvani jayanty wrote: > Hi, > I am trying to make a build and it's failing at line 192 in the > build.xml file. Not sure if I am doing anything wrong. > I checked out the source code from svn into a folder called swtbot. > I downloaded eclipse into C:\Automation\swtbot\net.sf.swtbot.build > \test-sandbox. Extracted the folder and renamed it to eclipse-target > Location: C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox > \eclipse-target > When I ran the ant script it complained about not being able to find > eclipse-target folder in "C:\Automation\swtbot\", so I copied the > eclipse-target folder in test-sandbox to swtbot folder. And this > time I got the error pasted below. > I am running this on a windows 32bit machine, so did not change any > default values in the build.properties file except for the eclipse > version. > ------------------ > baseLocation=${eclipseLocation} > #Os/Ws/Arch/nl of the eclipse specified by baseLocation > baseos=win32 > basews=win32 > basearch=x86 > ------------------- > Your help in getting this work is very much appreciated. > > Regards, > Talli > ---------------------------------------------- > Error > --------------------------------------------------------------------- > > [java] BUILD FAILED > [java] C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox > \test.xml:315: > The following error occurred while executing this line: > [java] C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox > \test.xml:293: > The following error occurred while executing this line: > [java] C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox > \test.xml:32: > he following error occurred while executing this line: > [java] Target "${setupTarget}" does not exist in the project > "Automated SWT > Bot Testing". > [java] > [java] Total time: 0 seconds > > BUILD FAILED > C:\Automation\swtbot\net.sf.swtbot.build\build.xml:192: Java > returned: 13 > > --------------------------------------------------------------------------------------------------------------------- > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________ > SWTBot-users mailing list > SWT...@li... > https://lists.sourceforge.net/lists/listinfo/swtbot-users > http://swtbot.org/ - a functional testing tool for SWT/Eclipse > |
|
From: sarvani j. <sja...@gm...> - 2008-05-12 18:17:09
|
Hi,
I am trying to make a build and it's failing at line 192 in the build.xml
file. Not sure if I am doing anything wrong.
I checked out the source code from svn into a folder called swtbot. I
downloaded eclipse into
C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox. Extracted the folder
and renamed it to eclipse-target
Location:
C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox\eclipse-target
When I ran the ant script it complained about not being able to find
eclipse-target folder in "C:\Automation\swtbot\", so I copied the
eclipse-target folder in test-sandbox to swtbot folder. And this time I got
the error pasted below.
I am running this on a windows 32bit machine, so did not change any default
values in the build.properties file except for the eclipse version.
------------------
baseLocation=${eclipseLocation}
#Os/Ws/Arch/nl of the eclipse specified by baseLocation
baseos=win32
basews=win32
basearch=x86
-------------------
Your help in getting this work is very much appreciated.
Regards,
Talli
----------------------------------------------Error---------------------------------------------------------------------
[java] BUILD FAILED
[java]
C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox\test.xml:315:
The following error occurred while executing this line:
[java]
C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox\test.xml:293:
The following error occurred while executing this line:
[java]
C:\Automation\swtbot\net.sf.swtbot.build\test-sandbox\test.xml:32:
he following error occurred while executing this line:
[java] Target "${setupTarget}" does not exist in the project "Automated
SWT
Bot Testing".
[java]
[java] Total time: 0 seconds
BUILD FAILED
C:\Automation\swtbot\net.sf.swtbot.build\build.xml:192: Java returned: 13
---------------------------------------------------------------------------------------------------------------------
|
|
From: Ketan P. <ket...@gm...> - 2008-03-25 15:09:51
|
Hi Michal, We're still investigating on this API, and there's an open bug regarding this (http://swtbot.org/bugzilla/show_bug.cgi?id=10) Cédric (who is on CC) has filed a patch against this bug when opening he opened it. We're still in the process of deciding what a good API would be in able to do what you mention with trees. Until then feel free to use the patch that's available on the bugzilla -- the API however ma change, keeping the functionality intact. If you do have ideas on how you'd like your API to be, do let us know, and we'll squash this issue immediately. Cheers, Ketan Padegaonkar I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse On 25-Mar-08, at 6:50 AM, Michal Dobisek wrote: > Hi Ketan, > > When trying out SWTBot, I found no way to access/select a nested > tree element. I.e. to select the tree item “Node 2.2.1” in the > ControlExample from org.eclipse.swt.examples. The method > > net.sf.swtbot.widgets.SWTBotTree.select(String) > > searches the child items of the tree, but these are just the root > items – the nested items have to be retrieved using getItems() > method on TreeItem. So (still in ControlExample), the call > bot.select(“Node 2”) > works fine, but > bot.select(“Node 2.1”) > selects nothing. > > Did I overlook something, or is this a bug/missing functionality in > the SWTBot? > > Thanks, > > Michal > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________ > SWTBot-users mailing list > SWT...@li... > https://lists.sourceforge.net/lists/listinfo/swtbot-users > http://swtbot.org/ - a functional testing tool for SWT/Eclipse > |
|
From: Michal D. <Mic...@wa...> - 2008-03-25 13:55:05
|
Hi Ketan,
When trying out SWTBot, I found no way to access/select a nested tree
element. I.e. to select the tree item "Node 2.2.1" in the ControlExample
from org.eclipse.swt.examples. The method
net.sf.swtbot.widgets.SWTBotTree.select(String)
searches the child items of the tree, but these are just the root items
- the nested items have to be retrieved using getItems() method on
TreeItem. So (still in ControlExample), the call
bot.select("Node 2")
works fine, but
bot.select("Node 2.1")
selects nothing.
Did I overlook something, or is this a bug/missing functionality in the
SWTBot?
Thanks,
Michal
|
|
From: Ketan P. <ket...@gm...> - 2008-03-21 14:22:04
|
On 21-Mar-08, at 4:41 AM, Michal Dobisek wrote: > Oops, just ignore the previous post – I was running the test code > from the Display thread, therefore it all occurred sync instead of > async – which I didn’t notice. SWTBot runs tests from a non UI-thread. As of now test-cases for plain SWT need to be hacked up to launch the actual application, there is a launch configuration for SWTBot tests if you are using an RCP app or an eclipse plugin. I hope to get this fixed sometime, do let me know if you have ideas on how to use the test case to launch your actual application. The mechanism used by SWTBot tests to test themselves is completely hacked up when I wanted something quick and dirty so that I could move ahead. Cheers, Ketan Padegaonkar I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse |
|
From: Michal D. <Mic...@wa...> - 2008-03-21 11:41:32
|
Oops, just ignore the previous post - I was running the test code from
the Display thread, therefore it all occurred sync instead of async -
which I didn't notice.
Michal
________________________________
From: Michal Dobisek
Sent: Friday, March 21, 2008 12:26 PM
To: 'swt...@li...'
Subject: click() and Dialogs
Hi Ketan,
I am trying out SWTBot and I came across the following problem. My test
looks like this:
bot.menu("Command").menu("New...").click(); // Opens a dialog with
creation parameters
bot.shell("New...").activate(); // Activate the dialog
...
The problem is, that the click() method does not return until I leave
the dialog. The New... menu item launches command, whose handler simply
creates a dialog and then runs open() on it. Since the dialog is
blocking, it runs it's own event loop in it (see Window.open()) and
therefore does not return before the dialog is opened. Since the bot is
running this via asyncExec, it does not return either.
Did you already come across such a situation? Do you have any solution?
Thanks,
Michal
PS: I am running SWTBot from the current SVN trunk.
|
|
From: Michal D. <Mic...@wa...> - 2008-03-21 11:29:33
|
Hi Ketan,
I am trying out SWTBot and I came across the following problem. My test
looks like this:
bot.menu("Command").menu("New...").click(); // Opens a dialog with
creation parameters
bot.shell("New...").activate(); // Activate the dialog
...
The problem is, that the click() method does not return until I leave
the dialog. The New... menu item launches command, whose handler simply
creates a dialog and then runs open() on it. Since the dialog is
blocking, it runs it's own event loop in it (see Window.open()) and
therefore does not return before the dialog is opened. Since the bot is
running this via asyncExec, it does not return either.
Did you already come across such a situation? Do you have any solution?
Thanks,
Michal
PS: I am running SWTBot from the current SVN trunk.
|
|
From: Ketan P. <ket...@gm...> - 2008-03-01 14:49:26
|
Hello everyone, I just made new release of SWTBot - 0.2.0. Some features: # A recorder API -- now you can record SWTBot scripts. # Better SWTBot integration in eclipse -- now you can run tests within eclipse. # More API -- now you can use more SWT controls using an even richer API. For more details, you can read up on the release notes here: http://swtbot.sourceforge.net/wiki/Release_Notes_-_0.2.0-beta Cheers, Ketan Padegaonkar I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse |
|
From: Pasquale F. <bas...@li...> - 2008-02-06 16:15:38
|
Ketan Padegaonkar wrote: > <stuff-deleted> > > Ouch. > > This is not supported, as yet. You can find buttons on a tool bar > using the text on them. > > So sneaky!!! :-P > However in case of eclipse, you do not have text on buttons, and the > text is actually the tooltip. You can look at > SWTBotToolbarButton#getMatcher() to see how you can use a matcher that > matches tooltip instead of the text on the toolbar. > > I'm missing myself in your code: reflection, builder pattern and so on.... > I'd prefer to subclass SWTBotToolBarButton into a SWTBotEclipseToolBar > to override getMatcher() and provide an implementation of a custom > net > .sf.swtbot.eclipse.finder.matcher.WidgetMatcherFactory.toolTipMatcher(); > > Do file a patch on http://bugs.swtbot.org/, if you manage to write > this ;) > > It's very arduous for me, because I'm new to these fantastic programming techniques! I will try as soon as possible, however. > Cheer, > Ketan Padegaonka Bye, Pas. |
|
From: Ketan P. <ket...@gm...> - 2008-02-06 11:27:05
|
On 06-Feb-08, at 5:19 PM, Pasquale Fersini wrote: > Ketan Padegaonkar wrote: >> >> On 05-Feb-08, at 10:54 PM, Pasquale Fersini wrote: >> Simple tests, but looks good. Did you have to make any special >> changes >> to make things pass ? > No, all your STANDARD code! That sounds good! >> I noticed that you were doing "new SWTEclipseBot(getDisplay())" that >> is totally unnecessary. Just using the default constructor works >> great. > For me, it doesn't work (if I delete getDiaplay() ). Can does this assertion pass in your case: assertNull(Display.getCurrent()); > Oh, I have another question: how can i access to eclipse button > bar? For instance, click on a red plug like in attached image. Ouch. This is not supported, as yet. You can find buttons on a tool bar using the text on them. However in case of eclipse, you do not have text on buttons, and the text is actually the tooltip. You can look at SWTBotToolbarButton#getMatcher() to see how you can use a matcher that matches tooltip instead of the text on the toolbar. I'd prefer to subclass SWTBotToolBarButton into a SWTBotEclipseToolBar to override getMatcher() and provide an implementation of a custom net .sf.swtbot.eclipse.finder.matcher.WidgetMatcherFactory.toolTipMatcher(); Do file a patch on http://bugs.swtbot.org/, if you manage to write this ;) Cheer, Ketan Padegaonkar I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse |
|
From: Ketan P. <ket...@gm...> - 2008-02-06 04:06:08
|
On 05-Feb-08, at 10:54 PM, Pasquale Fersini wrote: > Hi Ketan, > I used (just for little test) your SWTBot succesfully! > You can see my screencast at > > http://srv.homelinux.org/screencastSwtBot.avi > > Bye, > Pas. Simple tests, but looks good. Did you have to make any special changes to make things pass ? I noticed that you were doing "new SWTEclipseBot(getDisplay())" that is totally unnecessary. Just using the default constructor works great. Cheers, Ketan Padegaonkar I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse |
|
From: Pasquale F. <bas...@li...> - 2008-02-05 16:44:54
|
Hi Ketan, I used (just for little test) your SWTBot succesfully! You can see my screencast at http://srv.homelinux.org/screencastSwtBot.avi Bye, Pas. |
|
From: Ketan P. <ket...@gm...> - 2008-02-04 13:38:46
|
On 04-Feb-08, at 6:11 PM, Pasquale Fersini wrote: > Hi Ketan, > i'm trying to use SWTBot on a RCP application. I used SWTEclipseBot > but > i notice that it requires a lot of eclipse ide plug-ins (pde, jdt > and so > on). > Then i used just SWTBot(display) with display grabbed from > PlatformUI. In my test i use just a dependency that is > net.sf.swtbot.finder. When the rcp application is starting it return > me > an error: > Application "net.sf.swtbot.eclipse.ui.swtbottestapplication" could not > be found in the registry." > > Why? I don't want to use nothing other than SWTBot. > > Thanks again, > Pas. Umm... The problem is that you are using a lot of bleeding edge stuff. Which means that a lot of things are undocumented, a lot of them are likely to change. As far as launching your tests is concerned -- you should just use org.eclipse.workbench.ide, which works for me. That's what I use for the tests that I run at work. Most of swtbot is driven from what I do, and what I need. If you feel something is wrong, or needs to be done in a way that you need, I would need a lot more help, I'm working after office hours and weekends on working on this :( Please do look at the code, and do let me know if there's something I can implement quickly for you. That'd help me better. -- Ketan Padegaonkar I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse |
|
From: Pasquale F. <bas...@li...> - 2008-02-04 11:41:40
|
Hi Ketan, i'm trying to use SWTBot on a RCP application. I used SWTEclipseBot but i notice that it requires a lot of eclipse ide plug-ins (pde, jdt and so on). Then i used just SWTBot(display) with display grabbed from PlatformUI. In my test i use just a dependency that is net.sf.swtbot.finder. When the rcp application is starting it return me an error: Application "net.sf.swtbot.eclipse.ui.swtbottestapplication" could not be found in the registry." Why? I don't want to use nothing other than SWTBot. Thanks again, Pas. |