Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » help with swing / rcp application testing
help with swing / rcp application testing [message #42349] Wed, 08 July 2009 12:27 Go to next message
lalitha Missing name is currently offline lalitha Missing name
Messages: 29
Registered: July 2009
Junior Member
Hi,

I have a swing/rcp application. The application when launched brings up a
login swing dialog. After entering the login details and clicking on the
login button, the rcp view comes up.

I want get hold of this swing dialog and simulate the click event, so that
the application comes up and then I can test the rcp view with swtbot.

Thanks for your help

L.
Re: help with swing / rcp application testing [message #42379 is a reply to message #42349] Wed, 08 July 2009 12:54 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
Huh! Why not use an swt based dialog instead ? Also there's no way
swtbot can click on a dialog that is launched before eclipse is loaded.
You'll need to figure out another way to "disable" authentication in
your application.

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

On 8/7/09 21:57, lalitha wrote:
> Hi,
>
> I have a swing/rcp application. The application when launched brings up
> a login swing dialog. After entering the login details and clicking on
> the login button, the rcp view comes up.
>
> I want get hold of this swing dialog and simulate the click event, so
> that the application comes up and then I can test the rcp view with swtbot.
>
> Thanks for your help
>
> L.
>
Re: help with swing / rcp application testing [message #42410 is a reply to message #42379] Wed, 08 July 2009 13:43 Go to previous messageGo to next message
lalitha Missing name is currently offline lalitha Missing name
Messages: 29
Registered: July 2009
Junior Member
Ketan,

Thanks. We will change the login dialog to a swt dialog. However we do use
the albireo bridge for our swing rcp application. I know that earlier on
you have had some conversation going on as to, how to get hold of the
swing componant from the rcp view. At that time the person who was trying
to work with your suggested solution, was still getting some errors. Is
there any known solution for this issue? I don't want to reinvent the
wheel if some one already has a work around for this.

Thanks again for your quick response.

L.
Re: help with swing / rcp application testing [message #42432 is a reply to message #42410] Wed, 08 July 2009 14:17 Go to previous messageGo to next message
Asif is currently offline Asif
Messages: 11
Registered: July 2009
Junior Member
Is it possible to use Jemmy API to deal with swing base dialog along with
SWTBot?


E.g of Jemmy code would be:-

JDialogOperator loginDialog = new JDialogOperator(Titlename);
loginDialog.typeText("username", "admin");
loginDialog.typeText("password", "adminadmin");
loginDialog.pushButton("OK");

Then start working on SWTBot test tool API's for rcp application.

Jemmy API provide the same approach as SWTBot, the difference is, it is
used for Swing/AWT base gui automation. I'm not sure if SWTBot supports
the swing/AWT base ui application.
Re: help with swing / rcp application testing [message #42463 is a reply to message #42410] Thu, 09 July 2009 00:39 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
Here's what you could do:
invoke the VM using -Dusername=someuser -Dpassword=secret

Let the login dialog do a System.getProperty() for the username and
password and if they are valid, then don't show the dialog

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

On 8/7/09 23:13, lalitha wrote:
> Ketan,
>
> Thanks. We will change the login dialog to a swt dialog. However we do
> use the albireo bridge for our swing rcp application. I know that
> earlier on you have had some conversation going on as to, how to get
> hold of the swing componant from the rcp view. At that time the person
> who was trying to work with your suggested solution, was still getting
> some errors. Is there any known solution for this issue? I don't want to
> reinvent the wheel if some one already has a work around for this.
>
> Thanks again for your quick response.
>
> L.
Re: help with swing / rcp application testing [message #42528 is a reply to message #42463] Thu, 09 July 2009 07:28 Go to previous messageGo to next message
lalitha Missing name is currently offline lalitha Missing name
Messages: 29
Registered: July 2009
Junior Member
Ketan,

My question was:
"However we do use the albireo bridge for our swing rcp application. I
know that earlier on you have had some conversation going on as to, how to
get
hold of the swing component from the rcp view. At that time the person
who was trying to work with your suggested solution, was still getting
some errors. Is there any known solution for this issue? I don't want to
reinvent the wheel if some one already has a work around for this."

i.e. After login and launching the rcp application, how do I get hold of
the swing components that are embedded in the rcp views. In 2008 you had
some conversation going on about this.

Thanks for your help.


L.
Re: help with swing / rcp application testing [message #42559 is a reply to message #42528] Thu, 09 July 2009 07:30 Go to previous messageGo to next message
lalitha Missing name is currently offline lalitha Missing name
Messages: 29
Registered: July 2009
Junior Member
Ketan,

I had another question. Earlier on you had suggested using FEST for
testing the swing portion of the RCP/Swing application. Any perticular
reason for suggesting FEST? Would you recommend FEST over Jemmy?

Thanks,

L.
Re: help with swing / rcp application testing [message #42589 is a reply to message #42559] Thu, 09 July 2009 07:51 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
Lalitha,

I've no experience with either, from what I've seen FEST has a nicer
dsl-ish api for doing things. I do not know much about jemmy.

As far as the albireo bridge bridge is concerned, swtbot currently has
no plans for supporting swing (or even integrating with other tools
which do so). This does not mean that swtbot will not support them, it
just means there's not people asking for this support and certainly no
patches yet.

Please open a bug against swtbot for discussion around integration with
other swing testing tools.

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

On 9/7/09 17:00, lalitha wrote:
> Ketan,
>
> I had another question. Earlier on you had suggested using FEST for
> testing the swing portion of the RCP/Swing application. Any perticular
> reason for suggesting FEST? Would you recommend FEST over Jemmy?
>
> Thanks,
>
> L.
>
Previous Topic:install document
Next Topic:how to test swing code
Goto Forum:
  


Current Time: Fri Jul 25 23:19:03 EDT 2014

Powered by FUDForum. Page generated in 0.05312 seconds