JUnit Eclipse Plugin?
Solution 1
JUnit is part of Eclipse Java Development Tools (JDT). So, either install the JDT via Software Updates or download and install Eclipse IDE for Java Developers (actually, I'd recommend installing Eclipse IDE for Java EE Developers if you want a complete built-in environment for server side development).
You add it to a project by right clicking the project in the Package Explorer and selecting Build Path -> Add Libraries... Then simply select JUnit and click Next >.
Solution 2
It's built in Eclipse since ages. Which Eclipse version are you using? How were you trying to create a new JUnit test case? It should be File > New > Other > Java - JUnit - JUnit Test Case (you can eventually enter Filter text "junit").
Solution 3
You should be able to add the Java Development Tools by selecting 'Help' -> 'Install New Software', there you select the 'Juno' update site, then 'Programming Languages' -> 'Eclipse Java Development Tools'.
After that, you will be able to run your JUnit tests with 'Right Click' -> 'Run as' -> 'JUnit test'.
Solution 4
You do not need to install or update any software for the JUnit. it is the part of Java Development tools and comes with almost most of the latest versions in Eclipse.
Go to your project. Right click onto that->Select buildpath->add library->select JUnit from the list ->select the version you want to work with-> done
build you project again to see the errors gone:)
Solution 5
Junit is included by default with Eclipse (at least the Java EE version I'm sure). You may just need to add the view to your perspective.
Related videos on Youtube
Nick Heiner
JS enthusiast by day, horse mask enthusiast by night. Talks I've Done
Updated on July 09, 2022Comments
-
Nick Heiner almost 2 years
I feel stupid for not being able to find this, but where is the JUnit plugin for Eclipse? I've included the latest
.jar
in my buildpath, but I still don't have the option to create a new test case, run test cases with the green/red bar, etc. I need the plugin for this, right?EDIT: I'm using "Eclipse for PHP Developers". So perhaps that wouldn't include JUnit automatically. Do I have to download Eclipse again, or can I just get that functionality somehow?
-
Nick Heiner over 14 yearsactually, I'm using PHP Eclipse (see above). Can this be fixed, or do I need to download again?
-
BalusC over 14 yearsI am not sure about that, sorry. But if you can't find it anywhere in the list, then I recommend to go get "Eclipse for Java developers" (or "Eclipse for Java EE developers" if you like to play with Java/JSP/Servlet webapps as well) and then add the PHP plugin afterwards.
-
aubreyrhodes over 14 yearsI can't find the Junit package fore eclipse after googleing around a bit, so I think your best bet would just be to download a java version of eclipse.
-
BalusC over 14 yearsJust a note, J2EE is renamed Java EE since a year or three.
-
Devanshu Mevada over 14 years@aubreyrhodes FYI, it's included in the JDT.