Rafal said:
Hello,
I have got an application like dialog window. There are some buttons,
labels, edit boxes. This application connect with some device by RS232.
This application contain about 30 classes. Somebody tell me how to test
this kind of application?
Tricky. You have need of 3 tools, I suspect, which implies
a rathar nasty learning curve which may not be justified on
such a small project.
You can (and should) test your primitive class using
JUnit. This helps you make and run tests on "stand alone"
classes.
http://www.junit.org/index.htm
Classes such as datalists which support searching are easy
to test this way.
To test your Gui, there is a "layer" over JUnit called
jfcUnit which allows Swing items to be (invisibly, AFAIK)
instantiated, and have events (e.g. clicks and typing)
sent to them. You can then check that correct consquences
have ensued.
http://jfcunit.sourceforge.net/
Finally, if you want to perform stand-alone tests, without
having something at the other end of your rs232 cable (or indeed
even having an rs232 cable) you might want to investigate
MockObjects, essentially very controllable emulators
of real objects.
http://www-106.ibm.com/developerworks/library/j-mocktest.html
Wether all this is justified depends of whether you can re-use
the knowledge and skills gained; I would not bother learning
anything "bigger" than JUnit solely for a 30 class project.
BugBear