JUnit Eclipse Plugin?

Nick Heiner picture Nick Heiner · Dec 26, 2009 · Viewed 174.6k times · Source

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?

Answer

Pascal Thivent picture Pascal Thivent · Dec 26, 2009

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 >.