Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » -> SWT unit test methods
-> SWT unit test methods [message #65580] Fri, 06 June 2003 14:44 Go to next message
Martin Kersten is currently offline Martin KerstenFriend
Messages: 306
Registered: July 2009
Senior Member
Hi there,

I would like to ask if there are special
SWT-component methods available for
testing SWT components and plugins.

I noticed that some basic things can be
done by setSelection etc. Is there a way
to trigger events like pressing buttons,
changing focus (beside setFocus), resizing
using an event (or is the event-chain the
same using something like setSize()).

Thanks

Martin (Kersten)
PS: Asked a more basic question about that
in eclipse.tools.jdt some weeks before. This
one is slightly diffrent.
Re: SWT unit test methods [message #66541 is a reply to message #65580] Sat, 07 June 2003 22:22 Go to previous messageGo to next message
Tom Roche is currently offline Tom RocheFriend
Messages: 160
Registered: July 2009
Senior Member
Martin Kersten wrote in eclipse.platform
news://news.eclipse.org:119/bbq99d$90k$1@rogue.oti.com
> I would like to ask if there are special SWT-component methods
> available for testing SWT components and plugins.

(You might wanna ask on eclipse.platform.swt instead, so I'm
cross-posting.) AFAICS currently no, hence

https://bugs.eclipse.org/bugs/show_bug.cgi?id=38438

Note however that work is being done on

https://bugs.eclipse.org/bugs/show_bug.cgi?id=15025

An SWT-ized java.awt.Robot should make a good base for the methods you
describe, given that many of the existing AWT/Swing-based UI-unit-test
tools extend j.a.Robot to provide such functionality.
Re: SWT unit test methods [message #66584 is a reply to message #66541] Sat, 07 June 2003 23:21 Go to previous messageGo to next message
Martin Kersten is currently offline Martin KerstenFriend
Messages: 306
Registered: July 2009
Senior Member
Hi Tom,

> > I would like to ask if there are special SWT-component methods
> > available for testing SWT components and plugins.
>
> (You might wanna ask on eclipse.platform.swt instead, so I'm
> cross-posting.) AFAICS currently no, hence
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=38438
>
> Note however that work is being done on
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=15025
>
> An SWT-ized java.awt.Robot should make a good base for the methods you
> describe, given that many of the existing AWT/Swing-based UI-unit-test
> tools extend j.a.Robot to provide such functionality.

Read the bug reports. The ideas sounds good and I saved the link to abbot.
But as far as I learned a working implementation is not finished.

I also investigated the JFCUnit frame work. It sounds good. But SWT seams to
miss most of the important and required methods. (naming components etc.)

Therefore I ask myself if there is something similar to SWT. Well my
thoughts
would be that for the most important testing cases it would be great to have
a register
/investigation service. So you can access one button of your component. Get
the
trees/tables etc.

On the first shot I think about adding some extra lines to the
initialization code of
the components. I would like to map those components to a string and a
domain.
The domain would be the instance of the logical parent component. So i would
be
able to get the whole component tree of composed components. Just get the
instance
of the parent and ask the 'map' for a mapped button called 'myButton'.

This would violate some basic concepts (never add test code to product
classes etc.)
But it would be a first shot to trigger selections on tree or performing
button clicks
(select).

Q1: Do you think this might proof worth the time?
Q2: Do you know some code I might use (is it implemented someway before?)


Thanks

Martin (Kersten)
Re: SWT unit test methods [message #66666 is a reply to message #66584] Sun, 08 June 2003 03:38 Go to previous message
Tom Roche is currently offline Tom RocheFriend
Messages: 160
Registered: July 2009
Senior Member
<response moved to eclipse.platform.swt>
Previous Topic:What are maintenance builds? . . .
Next Topic:Classloader issue with Eclipse
Goto Forum:
  


Current Time: Sat Aug 17 19:25:58 GMT 2024

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

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

Back to the top