Re: How to set up automatic GUI JUnit test?

Discussion in 'Java' started by Arved Sandstrom, Nov 29, 2011.

  1. 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
    (http://qtp-help.blogspot.com/2009/04/selenium-with-junit.html) will
    give you the gist of it.

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

    AHS
     
    Arved Sandstrom, Nov 29, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    1
    Views:
    777
    Guest
    Jun 29, 2004
  2. Tom Koenning
    Replies:
    0
    Views:
    1,456
    Tom Koenning
    Jul 28, 2003
  3. Jacob
    Replies:
    0
    Views:
    395
    Jacob
    Jan 5, 2006
  4. Replies:
    3
    Views:
    1,514
  5. Mark Summerfield
    Replies:
    0
    Views:
    228
    Mark Summerfield
    Jun 3, 2012
Loading...

Share This Page