JUnit - how to test application

Discussion in 'Java' started by Rafal Majda, Apr 8, 2005.

  1. Rafal Majda

    Rafal Majda Guest

    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
     
    Rafal Majda, Apr 8, 2005
    #1
    1. Advertising

  2. Rafal Majda

    bugbear Guest

    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/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
     
    bugbear, Apr 8, 2005
    #2
    1. Advertising

  3. Rafal Majda

    Rafal Majda Guest

    Thanks for answer,
    Rafal
     
    Rafal Majda, Apr 11, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom Koenning
    Replies:
    0
    Views:
    1,466
    Tom Koenning
    Jul 28, 2003
  2. Ken
    Replies:
    2
    Views:
    3,955
    news.rcn.com
    Jul 16, 2004
  3. Replies:
    14
    Views:
    811
    Andrew McDonagh
    Mar 2, 2005
  4. Replies:
    0
    Views:
    706
  5. Phlip
    Replies:
    0
    Views:
    849
    Phlip
    Sep 22, 2005
Loading...

Share This Page