This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes  testing SWING app with no user interaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark " testing SWING app with no user interaction " Watch " testing SWING app with no user interaction " New topic

testing SWING app with no user interaction

Ann Darseh

Joined: Sep 15, 2003
Posts: 2
I have a small SWING application, it contains a few text fields and a
button. I want to test this without human interaction. For buttons, I tried the button.doClick() but it did not do anything! And for the text fields, I can't figure out how to do it. I am relatively new to SWING, I would appreciate your help so much.
Chris Brat
Ranch Hand

Joined: May 22, 2003
Posts: 108
Hi there,
there is an automated tester as of 1.3,
it allows screen capture, and automated mouse movement, clicking etc...
unfortunately i havent played around with it yet to give you more information.
if you try it out and like it please let me know.

Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

There are some unit testing frameworks already built for testing Swing GUIs -
jfcUnit and Abbot are both built as extensions to the JUnit unit testing framework to test GUI applications.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: testing SWING app with no user interaction
It's not a secret anymore!