Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #10296 > unrolled thread
| Started by | www <xsli2@yahoo.com> |
|---|---|
| First post | 2011-11-28 09:28 -0800 |
| Last post | 2011-11-29 10:21 -0800 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.lang.java.programmer
How to set up automatic GUI JUnit test? www <xsli2@yahoo.com> - 2011-11-28 09:28 -0800
Re: How to set up automatic GUI JUnit test? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-28 20:14 -0400
Re: How to set up automatic GUI JUnit test? www <xsli2@yahoo.com> - 2011-11-29 10:21 -0800
| From | www <xsli2@yahoo.com> |
|---|---|
| Date | 2011-11-28 09:28 -0800 |
| Subject | How to set up automatic GUI JUnit test? |
| Message-ID | <90f60a4c-3429-4718-adea-4ad163c4dd66@u5g2000vbd.googlegroups.com> |
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.
[toc] | [next] | [standalone]
| From | Arved Sandstrom <asandstrom3minus1@eastlink.ca> |
|---|---|
| Date | 2011-11-28 20:14 -0400 |
| Message-ID | <KtVAq.18378$ov2.5423@newsfe10.iad> |
| In reply to | #10296 |
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
[toc] | [prev] | [next] | [standalone]
| From | www <xsli2@yahoo.com> |
|---|---|
| Date | 2011-11-29 10:21 -0800 |
| Message-ID | <e2b738bb-0e44-4094-a6c2-54f8aaeadcf7@g7g2000vbd.googlegroups.com> |
| In reply to | #10318 |
On Nov 28, 7:14 pm, Arved Sandstrom <asandstrom3min...@eastlink.ca> wrote: > 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 Thank you very, very much. It looks a great tool for my task. I will study it. Just for other people's reference, I also found another tool, called "Marathon"(http://www.marathontesting.com/). I am studying it now too. I am so glad there are a few free tools available.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web