Nov 17, 2011

Junit test in eclipse

You can run a bunch of tests to verify the correctness of the implemented methods in a java class using Junit test. In order to do that, you have to write some junit test code in your program. Here goes the steps:
  • step 1: Download the junit jar file (e.g., you can download this one.)
  • step 2: Add the junit in your project path. (e.g., I already shown in another post how to that.)
  • step 3: Follow the example here to get an idea.
  • step 4: To gain more experience, try this exercise (from the class that I am TAing).

No comments:

Down with the Dictatorship!

    "Let them hate me, so that fear me" - Caligula 41AD