Home > Articles > Programming > Java

  • Print
  • + Share This
Like this article? We recommend

Getting Started

The first step is to download the latest version of JUnit machine. You can download it from the JUnit Web site.

We assume that you already have the JDK 1.3+ installed on your machine and the correct environment variables set up for JAVA_HOME. The JUnit distribution Zip file extracts files into the directory tree, as shown in Figure 1. Add the junit.jar file, which is in the base directory of the release to the CLASSPATH environment variable.

Figure 1Figure 1 JUnit directory structure.

The framework comes bundled with three different Test runners:

  • junit.textui.TestRunner allows you to run the tests in a batch from the command line.

  • junit.awtui.TestRunner is a GUI test runner based on the awt libraries.

  • junit.swingui.TestRunner is a swing-based GUI test runner.

  • + Share This
  • 🔖 Save To Your Account