Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: JUnit Testing

  1. #1
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default JUnit Testing

    Hello everyone,

    I just started a new job and in order to help me familiarize myself with the currently existing project, they are getting me to do some JUnit Testing. I'm brand new to JUnit Testing and they have supplied me with lots of information about it, but just reading the information by itself is never as useful as actually doing it. So I wanted to know if anyone had any tips or suggestions for someone who is new to JUnit Testing to help me get started.

    Any advice is helpful.

    Cheers.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: JUnit Testing

    JUnit testing is fairly easy once you understand the in's and out's. In my view it is a more flexible way of using assertions, so if you have never used assertions perhaps familiarize yourself with these.
    Programming With Assertions
    Next, get familiar with the API. Depending upon which version you are using, knowing a bit about injections might help
    Annotations (The Java™ Tutorials > Learning the Java Language > Classes and Objects)
    There are tons of tutorials out there, and Eclipse has a built in JUnit framework that makes creating and running test cases much easier

Similar Threads

  1. How do I add Junit package
    By IHeartProgramming in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 14th, 2012, 10:22 PM
  2. Junit for DAO class
    By tcstcs in forum Java Theory & Questions
    Replies: 4
    Last Post: January 11th, 2012, 02:21 AM
  3. JUnit problems
    By degude in forum Java SE APIs
    Replies: 8
    Last Post: September 19th, 2011, 05:54 AM
  4. Junit and TestNG which one is best?
    By jammychen in forum Java Theory & Questions
    Replies: 0
    Last Post: November 7th, 2010, 05:32 AM
  5. JUnit test for ER
    By raphytaffy in forum What's Wrong With My Code?
    Replies: 3
    Last Post: September 20th, 2010, 09:26 PM