swtbot-users Mailing List for SWTBot - SWT/Eclipse functional testing (Page 23)
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-06-13 14:15:46
|
Creating a wrapper around White (http://codeplex.com/white) is what I'm looking at. That would mean installing .NET 3.5 in addition to white, but I think that is a fair tradeoff. There should be similar alternatives on other platforms. Cheers, Ketan Padegaonkar I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse On Fri, Jun 13, 2008 at 7:21 PM, Hans Schwaebli <han...@ya...> wrote: > I assume there is no support for native dialogs in SWT Bot. > > Of course there are some workarounds, which one can use, if possible, like > avoiding native dialogs. > > But if they can't be avoided and need to be automated, then a solution must > be found. > > But what would be that solution, one that works on at least Windows and > ideally on Linux too? > > If one had an idea, I maybe would implement and contribute something, but I > currently have no idea how that can be solved. > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > 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: Hans S. <han...@ya...> - 2008-06-13 13:51:55
|
I assume there is no support for native dialogs in SWT Bot.
Of course there are some workarounds, which one can use, if possible, like avoiding native dialogs.
But if they can't be avoided and need to be automated, then a solution must be found.
But what would be that solution, one that works on at least Windows and ideally on Linux too?
If one had an idea, I maybe would implement and contribute something, but I currently have no idea how that can be solved.
|
|
From: Hans S. <han...@ya...> - 2008-06-13 13:09:52
|
I think I know why I have the compile errors after checking the example out.
When I did this on the classic release of Eclipse, it compiled.
But on my Eclipse JEE instance it does not compile. So it seems that the example requires the classic Eclipse. Bad trap....
Hans Schwaebli <han...@ya...> wrote: I installed SWT Bot Eclipse plugins for eclipse 3.3.2 and checked out org.rcpmail and org.rcpmail.test.
Then I see a lot of compile errors or build erros. I have trouble removing them. I didn't succeed yet.
Why not just check the examples out and there are no compile errors?
By the way, I checked out revision 641, which is version 1.1. as far as I understood it.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php_______________________________________________
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: Hans S. <han...@ya...> - 2008-06-13 12:50:49
|
I thought about that too. But I got an error when running it as SWTBot Test. So I thought that might not be the right way to start them, and then I started it as a simple JUnit test, which failed. Now here is the error which I get, when starting org.rcpmail.test (compiles and org.rcpmail can be started separetely with success): java.lang.RuntimeException: Application "net.sf.swtbot.eclipse.ui.swtbottestapplication" could not be found in the registry. The applications available are: net.sf.swtbot.eclipse.headless.coretestapplication, net.sf.swtbot.eclipse.headless.swtbottestapplication, org.eclipse.ant.core.antRunner, org.eclipse.equinox.app.error, org.eclipse.jdt.apt.core.aptBuild, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.pde.build.Build, org.eclipse.pde.junit.runtime.uitestapplication, org.eclipse.pde.junit.runtime.legacytestapplication, org.eclipse.pde.junit.runtime.coretestapplication, org.eclipse.ui.ide.workbench, org.eclipse.update.core.standaloneUpdate, org.eclipse.update.core.siteOptimizer, org.rcpmail.application. at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:242) at org.eclipse.equinox.internal.app.EclipseAppContainer.start(EclipseAppContainer.java:98) at org.eclipse.equinox.internal.app.Activator.addingService(Activator.java:112) at org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1064) at org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(ServiceTracker.java:926) at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:330) at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:274) at org.eclipse.equinox.internal.app.Activator.start(Activator.java: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.startActivator(BundleContextImpl.java:993) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:417) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340) at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(SingleSourcePackage.java:37) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:405) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at org.eclipse.core.internal.runtime.PlatformActivator.startAppContainer(PlatformActivator.java:47) at org.eclipse.core.internal.runtime.PlatformActivator.start(PlatformActivator.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.startActivator(BundleContextImpl.java:993) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:350) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1118) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:634) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:282) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:468) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297) eclipse.buildId=M20080221-1800 java.version=1.6.0_06 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE Framework arguments: -version 3 -port 3300 -testLoaderClass org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader -loaderpluginname org.eclipse.jdt.junit.runtime -testNameFile C:\DOKUME~1\markovze\LOKALE~1\Temp\testNames64035.txt -application net.sf.swtbot.eclipse.ui.swtbottestapplication -product org.eclipse.sdk.ide -pdelaunch -testpluginname org.rcpmail.test Command-line arguments: -os win32 -ws win32 -arch x86 -version 3 -port 3300 -testLoaderClass org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader -loaderpluginname org.eclipse.jdt.junit.runtime -testNameFile C:\DOKUME~1\markovze\LOKALE~1\Temp\testNames64035.txt -application net.sf.swtbot.eclipse.ui.swtbottestapplication -product org.eclipse.sdk.ide -data C:\eclipse\workspace/../junit-workspace -dev file:C:/eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/pde-junit/dev.properties -pdelaunch -os win32 -ws win32 -arch x86 -testpluginname org.rcpmail.test Ketan Padegaonkar <ket...@gm...> wrote: On 13-Jun-08, at 11:17 AM, Hans Schwaebli wrote: > at junit.framework.TestSuite.runTest(TestSuite.java:230) > at junit.framework.TestSuite.run(TestSuite.java:225) > at > org > .eclipse > .jdt > .internal > .junit > .runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) > at > org > .eclipse > .jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at > org > .eclipse > .jdt > .internal > .junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) You seem to be running this as a JUnit test instead of an SWTBot test. There's a right click option to run as SWTBot test. -- Ketan ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ 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: Hans S. <han...@ya...> - 2008-06-13 12:45:28
|
I installed SWT Bot Eclipse plugins for eclipse 3.3.2 and checked out org.rcpmail and org.rcpmail.test.
Then I see a lot of compile errors or build erros. I have trouble removing them. I didn't succeed yet.
Why not just check the examples out and there are no compile errors?
By the way, I checked out revision 641, which is version 1.1. as far as I understood it.
|
|
From: Ketan P. <ket...@gm...> - 2008-06-13 11:27:09
|
On 13-Jun-08, at 11:17 AM, Hans Schwaebli wrote: > at junit.framework.TestSuite.runTest(TestSuite.java:230) > at junit.framework.TestSuite.run(TestSuite.java:225) > at > org > .eclipse > .jdt > .internal > .junit > .runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) > at > org > .eclipse > .jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at > org > .eclipse > .jdt > .internal > .junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) You seem to be running this as a JUnit test instead of an SWTBot test. There's a right click option to run as SWTBot test. -- Ketan |
|
From: Hans S. <han...@ya...> - 2008-06-13 08:09:43
|
Hello Stefan, I really have trouble with this. I am totally new to RCP and SWT Bot and unter time pressure. How do I need to start a RCP application for SWT Bot to being able to test it automatically? There seem to be stuff in your start example which I don't need, but I can't discern what is general and what is specific. Can you show me the code piece in your JUnit tests which starts the RCP application for the SWT Bot? That would help I think. Bye, Hans Stefan Seelmann <see...@ap...> wrote: Hi Hans, we use SWTBot to test a RCP application and integrated it into the maven build, see [1] for the pom.xml. The resulting command line looks like this: ----------------------------------------------------------- java -classpath plugins/org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar org.eclipse.core.launcher.Main -os linux -ws gtk -arch x86_64 -application net.sf.swtbot.eclipse.headless.swtbottestapplication -data workspace formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,workspace/test-result.xml -testPluginName org.apache.directory.studio.test.integration.ui -className org.apache.directory.studio.test.integration.ui.AutomatedSuite ----------------------------------------------------------- Kind regards, Stefan [1] http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/pom.xml?view=markup Hans Schwaebli schrieb: > It does not only apply to the recorder. I cannot automate anything > because the display is null. I used the same statements to start the GUI > like you are doing it in your examples. > > Did you test RCP applications with SWT Bot? Does it work with RCP > applications? The recorder does not matter so much, as long as we can > test RCP applications with SWT Bot. > > > > */Ketan Padegaonkar /* wrote: > > I've already re-iterated that the recorder is work in progress, use it > at your own risk. There's little support for most controls, and is not > worth the effort to look into. > > There's also no support for RCP in the recorder. > > On 12-Jun-08, at 4:53 PM, Hans Schwaebli wrote: > > > Exception in thread "main" java.lang.IllegalStateException: Was > > expecting a display to appear. > > at > > net > > .sf > > .swtbot > > .recorder > > .ui.SWTBotRecorderUI.waitForDisplayToAppear(SWTBotRecorderUI.java:184) > > at > > net > > .sf > > .swtbot > > .recorder.ui.SWTBotRecorderUI.initialize(SWTBotRecorderUI.java:65) > > at net.sf.swtbot.recorder.ui.Main.start(Main.java:51) > > at net.sf.swtbot.recorder.ui.Main.main(Main.java: > > Cheers, > Ketan Padegaonkar, > I blog... therefore I am... http://ketan.padegaonkar.name > http://swtbot.org/ - a functional testing tool for SWT/Eclipse > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > SWTBot-users mailing list > SWT...@li... > https://lists.sourceforge.net/lists/listinfo/swtbot-users > http://swtbot.org/ - a functional testing tool for SWT/Eclipse > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > > > ------------------------------------------------------------------------ > > _______________________________________________ > SWTBot-users mailing list > SWT...@li... > https://lists.sourceforge.net/lists/listinfo/swtbot-users > http://swtbot.org/ - a functional testing tool for SWT/Eclipse > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ 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: Hans S. <han...@ya...> - 2008-06-13 05:47:49
|
The example tests "org.rcpmail.test" of SWT Bot fail if I run them in Eclipse (see below) because of NullPointerException and WidgetNotFoundException. Only one test method in the AllTests suite runs green ("testThisPasses").
It seems that the tests don't start the GUI of org.rcpmail because I see no GUI when running the above tests. So I think it has to do something with it. The other tests start the GUI first and automatically.
What is wrong? It's not just because of the example, we have an RCP application to test and I wanted to learn how to do it by looking at the RCP example. But it fails.
java.lang.NullPointerException
at net.sf.swtbot.eclipse.finder.SWTEclipseBot.views(SWTEclipseBot.java:86)
at org.rcpmail.MessageCreateTest.viewCount(MessageCreateTest.java:59)
at org.rcpmail.MessageCreateTest.testCreatesAnotherMessageWindow(MessageCreateTest.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at net.sf.swtbot.SWTBotTestCase.runBare(SWTBotTestCase.java:203)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
|
|
From: Ketan P. <ket...@gm...> - 2008-06-12 19:07:16
|
My replies inline. On 13-Jun-08, at 12:00 AM, Somesh Sasalatti wrote: > I think we should have a dedicated section on using swt bot in > different scenarios. > against stand alone SWT apps > against an eclipse plugin ( which i would really be interested in) > against RCP apps > etc. > each section having its own help and examples. howto's . I'd be > interested in contributing. Sure, do throw in some ideas that you'd like to see as part of the documentation. I'm in the process of writing a getting started guide, with some sample code snippets. It'd be great if you could contribute a section around execution of SWTBot based on your experiences. > It would also be nice if we have separate plugin downloadables for > the kind of stuff you want to test. > ex: > if you need a lean plugin just to test an eclipse plugin without the > record/replay by writing the code yourself ( think of it as a junit > plugin ) > if you need a plugin just to test an eclipse plugin with the record/ > replay > if you want everything. This is on the cards for me. The build infrastructure is something that needs a lot more love than it's getting as of now. > makes sense? > I know its more work for you . but we can help -- Ketan |
|
From: Somesh S. <som...@gm...> - 2008-06-12 18:30:31
|
I think we should have a dedicated section on using swt bot in different scenarios. against stand alone SWT apps against an eclipse plugin ( which i would really be interested in) against RCP apps etc. each section having its own help and examples. howto's . I'd be interested in contributing. It would also be nice if we have separate plugin downloadables for the kind of stuff you want to test. ex: if you need a lean plugin just to test an eclipse plugin without the record/replay by writing the code yourself ( think of it as a junit plugin ) if you need a plugin just to test an eclipse plugin with the record/replay if you want everything. makes sense? I know its more work for you . but we can help On Thu, Jun 12, 2008 at 10:39 AM, Ketan Padegaonkar < ket...@gm...> wrote: > Hi, > > I'm doing a new website for SWTBot that should be more version control > friendly than the existing wiki. > > If there is something that you feel you'd like to see on the new > website, do write back. I'm looking for inputs on what you'd like to > see on the new website. > > In the meanwhile the new website content is available at > http://swtbot.sourceforge.net/site > until I put in place some useful content there. > > -- Ketan > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > 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: Ketan P. <ket...@gm...> - 2008-06-12 17:39:40
|
Hi, I'm doing a new website for SWTBot that should be more version control friendly than the existing wiki. If there is something that you feel you'd like to see on the new website, do write back. I'm looking for inputs on what you'd like to see on the new website. In the meanwhile the new website content is available at http://swtbot.sourceforge.net/site until I put in place some useful content there. -- Ketan |
|
From: Stefan S. <see...@ap...> - 2008-06-12 12:52:54
|
Hi Hans, we use SWTBot to test a RCP application and integrated it into the maven build, see [1] for the pom.xml. The resulting command line looks like this: ----------------------------------------------------------- java -classpath plugins/org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar org.eclipse.core.launcher.Main -os linux -ws gtk -arch x86_64 -application net.sf.swtbot.eclipse.headless.swtbottestapplication -data workspace formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,workspace/test-result.xml -testPluginName org.apache.directory.studio.test.integration.ui -className org.apache.directory.studio.test.integration.ui.AutomatedSuite ----------------------------------------------------------- Kind regards, Stefan [1] http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/pom.xml?view=markup Hans Schwaebli schrieb: > It does not only apply to the recorder. I cannot automate anything > because the display is null. I used the same statements to start the GUI > like you are doing it in your examples. > > Did you test RCP applications with SWT Bot? Does it work with RCP > applications? The recorder does not matter so much, as long as we can > test RCP applications with SWT Bot. > > > > */Ketan Padegaonkar <ket...@gm...>/* wrote: > > I've already re-iterated that the recorder is work in progress, use it > at your own risk. There's little support for most controls, and is not > worth the effort to look into. > > There's also no support for RCP in the recorder. > > On 12-Jun-08, at 4:53 PM, Hans Schwaebli wrote: > > > Exception in thread "main" java.lang.IllegalStateException: Was > > expecting a display to appear. > > at > > net > > .sf > > .swtbot > > .recorder > > .ui.SWTBotRecorderUI.waitForDisplayToAppear(SWTBotRecorderUI.java:184) > > at > > net > > .sf > > .swtbot > > .recorder.ui.SWTBotRecorderUI.initialize(SWTBotRecorderUI.java:65) > > at net.sf.swtbot.recorder.ui.Main.start(Main.java:51) > > at net.sf.swtbot.recorder.ui.Main.main(Main.java: > > Cheers, > Ketan Padegaonkar, > I blog... therefore I am... http://ketan.padegaonkar.name > http://swtbot.org/ - a functional testing tool for SWT/Eclipse > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > SWTBot-users mailing list > SWT...@li... > https://lists.sourceforge.net/lists/listinfo/swtbot-users > http://swtbot.org/ - a functional testing tool for SWT/Eclipse > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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: Hans S. <han...@ya...> - 2008-06-12 12:26:14
|
It does not only apply to the recorder. I cannot automate anything because the display is null. I used the same statements to start the GUI like you are doing it in your examples. Did you test RCP applications with SWT Bot? Does it work with RCP applications? The recorder does not matter so much, as long as we can test RCP applications with SWT Bot. Ketan Padegaonkar <ket...@gm...> wrote: I've already re-iterated that the recorder is work in progress, use it at your own risk. There's little support for most controls, and is not worth the effort to look into. There's also no support for RCP in the recorder. On 12-Jun-08, at 4:53 PM, Hans Schwaebli wrote: > Exception in thread "main" java.lang.IllegalStateException: Was > expecting a display to appear. > at > net > .sf > .swtbot > .recorder > .ui.SWTBotRecorderUI.waitForDisplayToAppear(SWTBotRecorderUI.java:184) > at > net > .sf > .swtbot > .recorder.ui.SWTBotRecorderUI.initialize(SWTBotRecorderUI.java:65) > at net.sf.swtbot.recorder.ui.Main.start(Main.java:51) > at net.sf.swtbot.recorder.ui.Main.main(Main.java: Cheers, Ketan Padegaonkar, I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ SWTBot-users mailing list SWT...@li... https://lists.sourceforge.net/lists/listinfo/swtbot-users http://swtbot.org/ - a functional testing tool for SWT/Eclipse __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
|
From: Ketan P. <ket...@gm...> - 2008-06-12 12:08:14
|
I've already re-iterated that the recorder is work in progress, use it at your own risk. There's little support for most controls, and is not worth the effort to look into. There's also no support for RCP in the recorder. On 12-Jun-08, at 4:53 PM, Hans Schwaebli wrote: > Exception in thread "main" java.lang.IllegalStateException: Was > expecting a display to appear. > at > net > .sf > .swtbot > .recorder > .ui.SWTBotRecorderUI.waitForDisplayToAppear(SWTBotRecorderUI.java:184) > at > net > .sf > .swtbot > .recorder.ui.SWTBotRecorderUI.initialize(SWTBotRecorderUI.java:65) > at net.sf.swtbot.recorder.ui.Main.start(Main.java:51) > at net.sf.swtbot.recorder.ui.Main.main(Main.java: Cheers, Ketan Padegaonkar, I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse |
|
From: Hans S. <han...@ya...> - 2008-06-12 11:23:52
|
I try to GUI test a RCP application. It has a startup.jar library which can be executed with java -jar. The starting class is org.eclipse.core.launcher.Main
If I start the SWT Bot recorder with this argument, it does not show the recorder controls. But it starts the RCP application with its GUI.
On the console I get this exception:
Exception in thread "main" java.lang.IllegalStateException: Was expecting a display to appear.
at net.sf.swtbot.recorder.ui.SWTBotRecorderUI.waitForDisplayToAppear(SWTBotRecorderUI.java:184)
at net.sf.swtbot.recorder.ui.SWTBotRecorderUI.initialize(SWTBotRecorderUI.java:65)
at net.sf.swtbot.recorder.ui.Main.start(Main.java:51)
at net.sf.swtbot.recorder.ui.Main.main(Main.java:36)
I know you said, that the recorder is in an very early stage. Maybe this is just not supported. Or am I doing something wrong?
The guy who is responsible for the RCP application told me it has to be started this way (with org.eclipse.core.launcher.Main in the startup.jar file). I had asked him to tell me the GUI class which is actually started by the Eclipse class.
|
|
From: Ketan P. <ket...@gm...> - 2008-06-12 09:45:48
|
On 12-Jun-08, at 2:44 PM, Hans Schwaebli wrote: > If we would decide to use JUnit 4, would that work together with SWT > Bot 1.1? Shouldn't be a problem from whatever I see. -- Ketan |
|
From: Hans S. <han...@ya...> - 2008-06-12 09:14:52
|
Is SWT Bot compatible with JUnit 4?
The SWTBotTestCase seems to be written as a JUnit 3 class and the example tests too.
If we would decide to use JUnit 4, would that work together with SWT Bot 1.1?
|
|
From: Ketan P. <ket...@gm...> - 2008-06-10 16:46:48
|
PDE tests are JUnit based tests, where you grab things in the UI using PDE and the available eclipse API. They're difficult to write (but run faster) as they need more time. Your tests should have a good proportion of JUnit and functional tests, SWTBot fits in the later. On Tue, Jun 10, 2008 at 9:41 PM, Hans Schwaebli <han...@ya...> wrote: > My boss said that we could take into consideration using SWT Bot for our > tests and that we might use PDE if something does not work (yet) with SWT > Bot. I don't know what Eclipse PDE really is, but he thinks, that we might > use it. Maybe we need to really know the details of PDE to be able to not > having to rely too much on SWT Bot. > > What do you think? Or would you say that it would be better to join the > development of SWT Bot. But of course this is not our goal, we just need a > testing framework for RCP GUI tests. I don't know how time intensive it > would be to workaround with PDE or to contribute to SWT Bot. > > What do you think? > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > SWTBot-users mailing list > SWT...@li... > https://lists.sourceforge.net/lists/listinfo/swtbot-users > http://swtbot.org/ - a functional testing tool for SWT/Eclipse > > > -- 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-06-10 16:43:28
|
I do understand the lifecycle of a view. I'm not sure I understand what you want SWTBot to do. As far as SWTBot is concerned, it works merely on what is visible. It does not care much about anything else. On Tue, Jun 10, 2008 at 9:32 PM, Guillaume Bourel <gb...@ag...> wrote: > Thanks Ketan, > > If SWTBot is not throwing a WidgetNotFoundException when a view is not > open, there's probably a bug. > > I agree with this, but the view is already "open" it is just not visible : > just after launching the application the two views are in the same folder : > the first is visible (on top) but the second is hidden. > "As a human being", when I just click on the tab of the second view, the RCP > framework "automatically" calls createViewPart and the view is shown. > to reproduce this behavior with SwtBot I need to : > 1°/ Manually create the view > 2°/ Call SWTEclipseBot.view to select the view > > I'm not sure if this manual creation is really the right thing, because it > creates a different behavior between my "real" application and my test > application : > what I'm afraid of is : > if I manually force the creation of the view (in my test case), a behavior > which needs this view (initialised) will work fine. > But in the real application if I don't clic on the view, it will not be > initialised and the same behavior will not work. > > > Ketan Padegaonkar a écrit : > > SWTBot works in a way which is similar to what a human being does. If > you search for a view which is not open SWTBot throws a > WidgetNotFoundException, which is a right failure, since the view is > not really open, although it exists. > If SWTBot is not throwing a WidgetNotFoundException when a view is not > open, there's probably a bug. > So what you're doing is the right thing, activate the view in whatever > way you find convinient -- invoke API directly or click through the > menus. > Cheers, > Ketan Padegaonkar > I blog... therefore I am... http://ketan.padegaonkar.name > http://swtbot.org/ - a functional testing tool for SWT/Eclipse > On 6/10/08, Guillaume Bourel <gb...@ag...> wrote: > > > I tried to use SWTEclipseBot.view(String label) to select a view which > has been created at launch time but was never made visible (my > perspective contains two views within the same folder). > But if I just load the view (with IWorkbenchPage.showView("myViewID", > null, IWorkbenchPage.VIEW_CREATE); ) before calling > SWTEclipseBot.view(String label) everything works fine. > Maybe this check could be done in > SWTBotView.findWidget(IWorkbenchPartReference view, Finder finder) > when ((WorkbenchPartReference) view).getPane().getControl() returns a > null control. > Or does this null return value means something else ? > Cheers, > Guillaume. > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > SWTBot-users mailing list > SWT...@li... > https://lists.sourceforge.net/lists/listinfo/swtbot-users > http://swtbot.org/ - a functional testing tool for SWT/Eclipse > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > 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: Hans S. <han...@ya...> - 2008-06-10 16:11:42
|
My boss said that we could take into consideration using SWT Bot for our tests and that we might use PDE if something does not work (yet) with SWT Bot. I don't know what Eclipse PDE really is, but he thinks, that we might use it. Maybe we need to really know the details of PDE to be able to not having to rely too much on SWT Bot.
What do you think? Or would you say that it would be better to join the development of SWT Bot. But of course this is not our goal, we just need a testing framework for RCP GUI tests. I don't know how time intensive it would be to workaround with PDE or to contribute to SWT Bot.
What do you think?
|
|
From: Guillaume B. <gb...@ag...> - 2008-06-10 16:03:55
|
Thanks Ketan, > If SWTBot is not throwing a WidgetNotFoundException when a view is not > open, there's probably a bug. I agree with this, but the view is already "open" it is just not visible : just after launching the application the two views are in the same folder : the first is visible (on top) but the second is hidden. "As a human being", when I just click on the tab of the second view, the RCP framework "automatically" calls createViewPart and the view is shown. to reproduce this behavior with SwtBot I need to : 1°/ Manually create the view 2°/ Call SWTEclipseBot.view to select the view I'm not sure if this manual creation is really the right thing, because it creates a different behavior between my "real" application and my test application : what I'm afraid of is : if I manually force the creation of the view (in my test case), a behavior which needs this view (initialised) will work fine. But in the real application if I don't clic on the view, it will not be initialised and the same behavior will not work. Ketan Padegaonkar a écrit : > SWTBot works in a way which is similar to what a human being does. If > you search for a view which is not open SWTBot throws a > WidgetNotFoundException, which is a right failure, since the view is > not really open, although it exists. > > If SWTBot is not throwing a WidgetNotFoundException when a view is not > open, there's probably a bug. > > So what you're doing is the right thing, activate the view in whatever > way you find convinient -- invoke API directly or click through the > menus. > > Cheers, > Ketan Padegaonkar > I blog... therefore I am... http://ketan.padegaonkar.name > http://swtbot.org/ - a functional testing tool for SWT/Eclipse > > On 6/10/08, Guillaume Bourel <gb...@ag...> wrote: > >> I tried to use SWTEclipseBot.view(String label) to select a view which >> has been created at launch time but was never made visible (my >> perspective contains two views within the same folder). >> >> But if I just load the view (with IWorkbenchPage.showView("myViewID", >> null, IWorkbenchPage.VIEW_CREATE); ) before calling >> SWTEclipseBot.view(String label) everything works fine. >> Maybe this check could be done in >> SWTBotView.findWidget(IWorkbenchPartReference view, Finder finder) >> when ((WorkbenchPartReference) view).getPane().getControl() returns a >> null control. >> Or does this null return value means something else ? >> >> Cheers, >> Guillaume. >> >> > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > 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: Ketan P. <ket...@gm...> - 2008-06-10 14:47:21
|
SWTBot works in a way which is similar to what a human being does. If you search for a view which is not open SWTBot throws a WidgetNotFoundException, which is a right failure, since the view is not really open, although it exists. If SWTBot is not throwing a WidgetNotFoundException when a view is not open, there's probably a bug. So what you're doing is the right thing, activate the view in whatever way you find convinient -- invoke API directly or click through the menus. Cheers, Ketan Padegaonkar I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse On 6/10/08, Guillaume Bourel <gb...@ag...> wrote: > I tried to use SWTEclipseBot.view(String label) to select a view which > has been created at launch time but was never made visible (my > perspective contains two views within the same folder). > > But if I just load the view (with IWorkbenchPage.showView("myViewID", > null, IWorkbenchPage.VIEW_CREATE); ) before calling > SWTEclipseBot.view(String label) everything works fine. > Maybe this check could be done in > SWTBotView.findWidget(IWorkbenchPartReference view, Finder finder) > when ((WorkbenchPartReference) view).getPane().getControl() returns a > null control. > Or does this null return value means something else ? > > Cheers, > Guillaume. > |
|
From: Ketan P. <ket...@gm...> - 2008-06-10 13:09:52
|
The Message box is a native dialog. SWT does not have support to recognize native dialogs, and SWTBot therefore cannot test them. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=164192 for more info. Cheers, Ketan Padegaonkar, I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse On 10-Jun-08, at 4:43 PM, Hans Schwaebli wrote: > I use the example "org.eclipse.swt.examples.addressbook.AddressBook" > for testing SWT Bot. > > How can I click the OK button on that image: http://img142.imageshack.us/img142/2909/okbuttonar1.gif > > If I write "bot.button("OK").click();" this exception occurs: > > net.sf.swtbot.widgets.WidgetNotFoundException: Could not find widget > with text OK > at > net.sf.swtbot.widgets.AbstractSWTBot.<init>(AbstractSWTBot.java:127) > at net.sf.swtbot.widgets.SWTBotButton.<init>(SWTBotButton.java:46) > at net.sf.swtbot.SWTBot.button(SWTBot.java:191) |
|
From: Ketan P. <ket...@gm...> - 2008-06-10 12:41:14
|
On 10-Jun-08, at 3:00 PM, Hans Schwaebli wrote:
> I use "org.eclipse.swt.examples.addressbook.AddressBook" for testing
> SWT Bot.
>
> I created a data set by clicking "File -> New Contact".
>
> Then I wanted to select the row, just to select it. In real life
> this is just one mouse click.
>
> This is the statement:
> bot.table(bot.shell("Address Book - Untitled")).select(0);
Can you file a bug with the complete test that you have ? It's easier
to track bugs on the bugzilla.
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-06-10 12:39:25
|
As I've already mentioned, the recorder does not work with all controls. Work on the recorder is slightly tricky. Use it at your own risk, please do not ask for new features on the recorder, unless you're willing to add support for things. Cheers, Ketan Padegaonkar, I blog... therefore I am... http://ketan.padegaonkar.name http://swtbot.org/ - a functional testing tool for SWT/Eclipse On 10-Jun-08, at 2:09 PM, Hans Schwaebli wrote: > How to use the recorder is described here: http://swtbot.sourceforge.net/wiki/Recorder > > I tried the script recorder with > "org.eclipse.swt.examples.addressbook.AddressBook". It didn't record > well. For example when clicking on "New Contact" and entering name, > first name etc., it doesn't record the whole input. > > > > Guillaume Bourel <gb...@ag...> wrote: Hey, > > first, thanks a lot for this useful testing tool ! > > I'm currently using it with RCP applications and I was wondering if > the > script recorder could be used with such applications ? > > Cheers, > Guillaume. > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > SWTBot-users mailing list > SWT...@li... > https://lists.sourceforge.net/lists/listinfo/swtbot-users > http://swtbot.org/ - a functional testing tool for SWT/Eclipse > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php_______________________________________________ > SWTBot-users mailing list > SWT...@li... > https://lists.sourceforge.net/lists/listinfo/swtbot-users > http://swtbot.org/ - a functional testing tool for SWT/Eclipse > > |