Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: How to set up automatic GUI JUnit test?

Thread Tools

Re: How to set up automatic GUI JUnit test?

Arved Sandstrom
Posts: n/a
On 11-11-28 01:28 PM, www wrote:
> Hi:
> We have a JAVA GUI program. The program is already finished, but we
> want to set up one or two JUnit tests for it. Ideally, I hope this
> JUnit test can record my action: click Button A, click Button B, enter
> some words in a field, then click Button "Run". Then compare the files
> in output/ directory against the bench mark files.
> I am completely new to GUI JUnit test, even though I have used JUnit
> test for many years. I have googled and seen a few tools, but I am
> unclear if they can record my action like above after reading their
> user manuals. I am looking for free tools.
> Thank you very much.

One approach is to record a Selenium script, save it as Java "Selenese"
commands, and wrap those commands in a JUnit test method. JUnit setup
and teardown handle the establishment of the Selenium environment.

Something like this
( will
give you the gist of it.

In your test method, after the Selenese, you can do your filesystem checks.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
JUnit - automatic test extraction Jacob Java 0 01-05-2006 07:56 AM
GUI - GUI value passing paul.foreman Java 5 10-25-2004 08:06 AM
Automatic build process + automatic NuNit (2 in 1 solution) ASP .Net 1 06-29-2004 04:15 PM
[PY GUI] interest function in python GUI(wxpython,pyqt) program.wxpython,pyqt ulysses Python 4 10-22-2003 03:28 PM