Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » -> JFace and SWT component testing
-> JFace and SWT component testing [message #46062] Sat, 31 May 2003 17:04 Go to next message
Eclipse UserFriend
Hi there,

I try to add automated tests to my JFace and SWT
based Plugin-Components. Therefore I would like to
know:

Q1: Can anyone give me any advice or suggestion?
Q2: How does your component testing works?


Thanks for reading,

Martin (Kersten)
Re: -> JFace and SWT component testing [message #48053 is a reply to message #46062] Tue, 03 June 2003 23:01 Go to previous messageGo to next message
Eclipse UserFriend
Martin,

Have you seen

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt- ui-home/plugins/org.eclipse.jdt.junit/index.html

I've been meaning to try it, but haven't yet had a chance. Let me know
if this helps you. Good luck,

David Saff

Martin Kersten wrote:
> Hi there,
>
> I try to add automated tests to my JFace and SWT
> based Plugin-Components. Therefore I would like to
> know:
>
> Q1: Can anyone give me any advice or suggestion?
> Q2: How does your component testing works?
>
>
> Thanks for reading,
>
> Martin (Kersten)
>
>
Re: -> JFace and SWT component testing [message #48301 is a reply to message #48053] Wed, 04 June 2003 02:28 Go to previous messageGo to next message
Eclipse UserFriend
Hi David,

I use JUnit all the time for every method I write (test-first way).
(You may try it too, it gives you more speed and selfconfidence (my xp)).

But I am looking for ways to test SWT/JFace components. By checking the
SWT/JFace implementations
I noticed setSelection(..) and setFocus methods I think
a suitable test case would be like:
setUp: - set up environment
- set up component
- implement a test interface (package/protected)
test: Trigger the methods of the test interface or
setSelection etc.
tearDown: - tear down the component/environment

But before I try this I would like to know if someone
can shorten my voyage by providing me shortcuts ;)


Bye

Martin (Kersten)

"David Saff" <saff@mit.edu> schrieb im Newsbeitrag
news:bbjndg$q8d$3@rogue.oti.com...
> Martin,
>
> Have you seen
>
>
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt- ui-home/plugins/org.eclipse.jdt.junit/index.html
>
> I've been meaning to try it, but haven't yet had a chance. Let me know
> if this helps you. Good luck,
>
> David Saff
>
> Martin Kersten wrote:
> > Hi there,
> >
> > I try to add automated tests to my JFace and SWT
> > based Plugin-Components. Therefore I would like to
> > know:
> >
> > Q1: Can anyone give me any advice or suggestion?
> > Q2: How does your component testing works?
> >
> >
> > Thanks for reading,
> >
> > Martin (Kersten)
> >
> >
>
Re: -> JFace and SWT component testing [message #48823 is a reply to message #48301] Wed, 04 June 2003 10:45 Go to previous messageGo to next message
Eclipse UserFriend
Martin,

I apologize for my confusion. I also am an avid Junit user, but haven't
yet used Junit on my graphical plugins, because of the need to get
components from the Workbench. The link I forwarded seemed to provide a
way to do that. Once you get the components, you're right, there's
still work to be done, and I don't know of a tool that makes it quicker.
Good luck,

David Saff

Martin Kersten wrote:
> Hi David,
>
> I use JUnit all the time for every method I write (test-first way).
> (You may try it too, it gives you more speed and selfconfidence (my xp)).
>
> But I am looking for ways to test SWT/JFace components.
Re: -> JFace and SWT component testing [message #49004 is a reply to message #48823] Wed, 04 June 2003 13:18 Go to previous messageGo to next message
Eclipse UserFriend
Hi David,

> I apologize for my confusion. I also am an avid Junit user, but haven't
> yet used Junit on my graphical plugins, because of the need to get
> components from the Workbench. The link I forwarded seemed to provide a
> way to do that. Once you get the components, you're right, there's
> still work to be done, and I don't know of a tool that makes it quicker.

Well I read about a Swing Testing Framework some time
ago. It head some nice features like recording events
and providing a easier Swing testing by offering
something like skripted events. So you just create
statements like: mouse.click(Component) etc.

Therefore I wondered if something like that exists in swt.
Well I will also check out some tests of the Eclipse
plugins. Maybe there are a lot of things to learn ;)

> Good luck,
Well I hope there isn't much luck involved... ;-)

Martin (Kersten)

>
> David Saff
>
> Martin Kersten wrote:
> > Hi David,
> >
> > I use JUnit all the time for every method I write (test-first way).
> > (You may try it too, it gives you more speed and selfconfidence (my
xp)).
> >
> > But I am looking for ways to test SWT/JFace components.
>
Re: -> JFace and SWT component testing [message #52211 is a reply to message #49004] Fri, 06 June 2003 23:42 Go to previous message
Eclipse UserFriend
Martin Kersten wrote:
> Well I read about a Swing Testing Framework some time ago. It head
> some nice features like recording events and providing a easier
> Swing testing by offering something like skripted events. So you
> just create statements like: mouse.click(Component) etc.

Actually, there are several nice whitebox (or unit-test) GUI test
automation frameworks: see

http://www.superlinksoftware.com/cgi-bin/jugwiki.pl?TestingG UIs

> Therefore I wondered if something like that exists in swt.

Unfortunately there is nothing at the moment. Note that this is
probably due to neglect, not infeasibility. There is a blackbox (or
function-test) tool for SWT, Rational XDE Tester (formerly known as
RobotJ). Being blackbox, it lacks JUnit integration, but it does
demonstrate that SWT can be automated.

I'm part of a group that is attempting to extend one of the tools
listed above to handle SWT/JFace. If you'd like to learn more about
the effort, or about the issues involved, check out

http://groups.yahoo.com/group/java-gui-testing/

If you'd like to help out, please let me know.
Previous Topic:ClassPathContainer enhancement suggestion
Next Topic:[ANN] Eclipse Checkstyle v3.1 is available for download
Goto Forum:
  


Current Time: Sat Jul 05 05:46:12 EDT 2025

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

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

Back to the top