[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [swtbot-dev] Impressions and questions from a first time user

Hi Niklaus,

My replies inline:

On 1/5/10 12:11 PM, Niklaus Giger wrote:

a) As elexis has overridden WorkbenchAdvisor, a login dialog for the DB comes
up first. One has to manually enter a username/password before SWTBot gets
control. Does anybody has a hint where I have to patch SWTBot/elexis in order
to pass control to SWTBot first?

Yes, you will need to patch the login dialog. There is a good, secure way to patch the login dialog on the FAQ[1].

b) The application takes about 15 seconds on my MacMini to startup/setup the
DB. It took me a while to install/grasp the main ideas for JRuby, eclipse-
shell, glimmer. But this allowed me to test interactively the
glimmer/samples/login.rb. I definitively love the idea of using an interpreted
language to develop the test cases.

Ruby is awesome. I'd like to hear your experiences with using ruby, and possibly even support jruby as a first class language to be used with swtbot :) I'd blogged about this on my blog[2]. You can download the attachment on my blog.

c) As there are quite a few perspectives, dialogues, windows, etc to test I
(as a newcomer to the elexis source code) find it a daunting task to discover
how all these GUI elements are grouped, named and accessible via SWTBot.

Does anybody now of a utility or SWTBot functions about how to dump the GUI
elements? I see that there is a "SWTBot EclipseSpy view". Should I add it to

I would find it handy if I could enter in my jirb windows a command like:
include_class Java::org.eclipse.swtbot.swt.finder.SWTBotFactory

No there is none, the Spy View is all there is. It seems like an interesting idea to be able to dump gui elements. If you do manage to write one, do consider contributing it back :)

d) Trying to understand/modify SWTBot I tried to install it from source and
failed miserably. See the attached log files. The problem I did run into is:
      [java] BUILD FAILED
/scripts/build.xml:35: The following error occurred while executing this
line: [java]
/scripts/build.xml:91: The following error occurred while executing this
line: [java]
/home/src/swtbot/org.eclipse.swtbot.releng/customTargets.xml:11: The
following error occurred while executing this line: [java]
/home/src/swtbot/org.eclipse.swtbot.releng/allElements.xml:12: The
following error occurred while executing this line: [java]
/scripts/genericTargets.xml:106: A cycle was detected when generating the
classpath org.eclipse.swtbot.junit4_x_2.0.0.201001052001,
org.eclipse.swtbot.junit4_x_2.0.0.201001052001. [java]
      [java] Total time: 1 second

/home/src/swtbot/org.eclipse.swtbot.releng/build.xml:192: Java returned: 13
Any help would be appreciated.

Here's my copy of build.developer.properties: http://gist.github.com/269940, perhaps you'd need something similar.

You will need to run 'ant materialize-workspace' in this case.

If it is considered a good idea I would not hesitate to invest a few hours in
order to documents my experiences and publish an example on how to test a
simple SWT application and/or glimmer/samples/login.rb using SWTBot, eclipse-
shell and JRuby. What do think about it?

That would be a good experience to learn from. SWTBot should surely be able to lend itself better to dynamic languages; it's 2010 already and java still seems to be getting nowhere :)


-- Ketan

Best regards

[1] - http://wiki.eclipse.org/SWTBot/FAQ#How_do_I_test_a_login_dialog_using_SWTBot

[2] - http://ketan.padegaonkar.name/2009/04/10/cucumber-on-jruby-inside-eclipse.html