19

I am writing a Java Desktop Application (SWING) using Netbeans IDE 6.9. I want to do automated GUI testing. All I know about testing is JUnit tests which won't apply for my GUI application. Is there a particular testing framework I can use for testing the GUI application, are there good ones out there? Which ones are easy to use (I need to do testing but I don't have a lot of time for that, however, I don't want to ignore that). My application is basically one frame, with three to 4 tabs (not a big one), my tests shouldn't be complicated, so is there a simple framework that will let me test my application fast and in a strong way to find bugs?

Thanks

Sergii Pozharov
  • 17,366
  • 4
  • 29
  • 30
Saher Ahwal
  • 9,015
  • 32
  • 84
  • 152
  • have a look at: http://stackoverflow.com/questions/1137448/selenium-is-to-web-ui-testing-as-is-to-windows-application-ui-testing – sebastiangeiger Mar 24 '11 at 12:20

4 Answers4

12

I recommend the following open source tools (we are using them on our Java Swing applications):

  • UISpec4J - Non visual testing tool, very good for unit testing/TDD for the GUI application
  • Abbot - Is good for functional testing. Also have record & playback

You can use both or either one of them

From the commercial tools in my opinion the best is IBM Rational Functional Tester - it supports Java applications very well. However it is expensive and is focused on the record & replay approach which is not very reliable.

Sergii Pozharov
  • 17,366
  • 4
  • 29
  • 30
  • 1
    None of the two you mentioned appears [here](https://en.wikipedia.org/wiki/List_of_GUI_testing_tools). I would consider both projects dead. – malat Oct 14 '16 at 09:48
  • 1
    @malat Considered that the answer is more than 5 years old it is likely to happen – Sergii Pozharov Oct 15 '16 at 15:48
  • Thanks for the suggestions. I am surprised to see there's no driver to support testing Java GUI applications with Appium. Oracle is a big company, they can easily spend some money on this. – Naeem A. Malik Nov 04 '20 at 09:20
8

You can try "fest".

http://code.google.com/p/fest/

bugs_
  • 3,544
  • 4
  • 34
  • 39
  • FEST is indeed a very good UI testing library (although it doesn't have a recording feature yet). One important thing to do to make its use easier (probably the same for other testing libs) is to explicitly uniquely name each component in your UI. – jfpoilpret Mar 25 '11 at 07:45
3

QF-test

StanislavL
  • 56,971
  • 9
  • 68
  • 98
-5

Try Selenium or Watij.

Both frameworks open a web-page in browser and manipulate page elements. They can click a page element, enter data to input field, get a text or HTML of a specified element, etc. Watij in addition to that can emulate javascript events directly.

Nikita Barsukov
  • 2,957
  • 3
  • 32
  • 39