How do I use JUnit inside of JBuilder?

By Alvin J. Alexander, devdaily.com
  1. Go to www.junit.org and download the latest version (zip) of Junit.
  2. Assuming that it's still distributed as a Zip file, unzip the zip file, and put the Jar file in a place where you keep your other Jar files.
  3. In JBuilder, go to Project|Default Project Properties, then add Junit as a Required Library.
  4. When you finish that process it will be ready to use.
  5. To run the GUI tester, go to Project|Project Properties...|Run, and add this line to your VM Parameters:
      junit.ui.TestRunner
    
  6. At this point you can begin creating your Junit test classes.
  7. When you are ready to run a TestCase, go to Project|Project Properties|Run, then select the "Main class". This is the class that contains your test case, assuming that you only have one test case.

devdaily logo