Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit testing framework for a Swing UI [closed]

Testing UI is difficult. What do you think is the best unit testing framework for Swing?

like image 751
Itay Maman Avatar asked Apr 04 '10 20:04

Itay Maman


People also ask

Which framework is used for unit testing?

JUnit is an open source framework you can use to write and run tests. It aims to help develop bug-free and reliable code written in Java. JUnit provides test runners that run tests and assertions to test the expected results.

What is unit testing in UI?

Most application users spend all of their time interacting with your program through it's UI, it's user interface. Unit tests are back-end tests, they can check that a calculation is correct, but they can't verify that the results display correctly to your user.

Is Swing is a framework?

Swing is a component-based framework, whose components are all ultimately derived from the JComponent class.

What is swing testing?

The swinging-flashlight test, also known as the swinging light test, is used in medical examinations to identify a relative afferent pupillary defect.


2 Answers

Currently the best in my opinion is FEST.

like image 87
Eugene Ryzhikov Avatar answered Oct 14 '22 00:10

Eugene Ryzhikov


What do you think is the best unit testing framework for Swing?

Good question. I can't help you with that. I can point you to articles about ui testing I have read from Misko Hevery's site

Misko Hevery's tips

  • I would like to point you out to Google's testing guru Misko Hevery's website. He talks a lot about how to write code that is easy to test.
  • For example When reading his excellent slides "How to Write Hard to Test Code" he points out at slides 45/288 that the cost of fixing rendering bugs is relatively low. I think that he is right about that and that you should not be to concerned with having 100% code coverage off your UI.
  • He also has some good tips to over how to test your UI.

    The important thing is to separate the graphical UI from the control logic and data. This can be achieved with the standard Model View Controller design pattern

ObjectMentor

This is a website about testing.I found this interesting article from Michael Featers explaining UI Test Automation Tools are Snake Oil

like image 32
Alfred Avatar answered Oct 13 '22 23:10

Alfred