Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JUnit - how to test application

Reply
Thread Tools

JUnit - how to test application

 
 
Rafal Majda
Guest
Posts: n/a
 
      04-08-2005
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?

Sorry for my english

Rafal
 
Reply With Quote
 
 
 
 
bugbear
Guest
Posts: n/a
 
      04-08-2005
Rafal Majda wrote:
> 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/developerwork...-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
 
Reply With Quote
 
 
 
 
Rafal Majda
Guest
Posts: n/a
 
      04-11-2005
Thanks for answer,
Rafal

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when using junit to test dnsjava related code. eelco.batterink@gmail.com Java 0 06-03-2005 10:12 AM
Using JUnit to test privately contained List? kk_oop@yahoo.com Java 14 03-02-2005 07:30 PM
Where to put JUnit test cases? Ken Java 2 07-16-2004 04:02 AM
Junit Test From Ant--java.lang.LinkageError Tom Koenning Java 0 07-28-2003 07:11 PM
test test test test test test test Computer Support 2 07-02-2003 06:02 PM



Advertisments