Install JUnit in Eclipse

Let’s see, How can you install JUnit in Eclipse. In order to compile, run and execute the Unit Test cases using JUnit in Eclipse. First, you need to configure JUnit in your eclipse IDE.

As a prerequisite, you must have installed at least Java

jdk 6 (Download Java from here!).

There are few standard steps to setup the JUnit in Eclipse. Please follow the below-mentioned steps to set up the JUnit in Eclipse if already not configured.


1. Download the latest JUnit Click to Download  and click on the junit.jar and hamcrest-core.jar links to download the jar files.

Install JUnit

2. Now to click the jar files, you need to click on the text jar. Download the both jar files JUnit and hamcrest jar files.

Install JUnit


3. keep both of the files in a directory. Now open the Eclipse and Now right click on your project and mouse hover on the Build path and click on the Configure build path… 

Install JUnit


4. Now click on the button “Add External JARs..” and select the both of the downloaded JARs to add jars.

Now click on the OK button, present in the bottom of the page.

Install JUnit


Congratulation, you have configured JUnit successfully. You can see added JUnit jar files in the Reference Libraries folder.

Install JUnit

We are now ready to start developing and running JUnit in Eclipse IDE.

Note: If you don’t have Eclipse Helios version or another version which comes with JUnit 4 plugin, you should download the plugin separately and install it in Eclipse.

Selenium Tutorial:

If you liked this video, then please subscribe to our YouTube Channel for more video tutorials.

0 Comment

Leave a Reply