Results 1 to 4 of 4
  1. #1
    mwildam's Avatar
    mwildam is offline Member
    Join Date
    Aug 2007
    Posts
    72
    Rep Power
    0

    Default [SOLVED] Best practice for creating test classes

    I am quite new to java using NetBeans 6.1 with JDK 1.6 and for some of the functions I created I want to write test classes to run automated tests to check consistence when I do some changes.

    I read something about this topic getting confused about different approaches depending on the jdk version / netbeans version used and however found very different looking examples on the net.

    Now I am very confused how to continue. Any hint would be helpful,

    Thanks,

    Martin.
    Greetings, Martin Wildam.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  3. #3
    mwildam's Avatar
    mwildam is offline Member
    Join Date
    Aug 2007
    Posts
    72
    Rep Power
    0

    Default

    Yes, I am thinking about JUnit - there are several versions 3.8.2 and 4.1 for instance - both seem to work completely different and I wonder why NetBeans 6.1 still uses 3.8.2. Is the 4.1 stable enough for example?

    Further it seems that there are several approaches - using single testing classes or testing suites. I am confused about the possibilities and don't know what the best practice is here - as I also found different samples on the web looking completely different.
    Greetings, Martin Wildam.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    NetBeans 6.1 use JUnit 4.1 and working extremely well. I already using that combination.

    There are lots of options available in JUnit test. Best approach I think is use the test suites. Main idea there is, test the whole application at once, or as a single application.

Similar Threads

  1. I need help on a practice code for java
    By Sageinquisitor in forum New To Java
    Replies: 12
    Last Post: 07-13-2010, 05:00 PM
  2. Best practice of IF loop with NOT
    By sathishranganathan in forum Advanced Java
    Replies: 13
    Last Post: 05-29-2008, 01:11 PM
  3. Creating inner classes
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-17-2008, 12:07 AM
  4. Replies: 0
    Last Post: 04-05-2008, 01:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •