JCreator and JUnit Integration

Requirements

 

Initial JCreator/JUnit Setup

Setup JUnit Project Path

  1. Load JCreator.
  2. Each lab and assignment will require their own JCreator project. To create a new project, press Ctrl+Shift+N, or navigate to the option through the File menu.
  3. Under "Project Template", select "Empty Project".
  4. Under "Project Paths", enter a project name.
  5. Under "Project ClassPath", select the "Required Libraries" tab. Click "New...".
  6. In the "Name" text box, type JUnit 4.4.
  7. On the Classes tab, add a new archive. Navigate to your junit-4.4.jar file from your JUnit 4.4 installation. Click "Open". Click "OK".
  8. Check the box next to "JUnit 4.4", and click "Finish".

 


JCreator/JUnit Setup For Future Projects

The JUnit project path remains on your machine between projects. The one and only task that needs to be remembered for each subsequent project is to check the "JUnit 4.4" box on the "Project ClassPath" page. No additional setup is required.

 

Running JUnit Tests

  1. Open the desired AllTests.java test file so that it is the currently selected file in JCreator.
  2. Click "Build/Execute File".