Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do you need to do Unit testing in Java with Eclipse?

I've recently been lifted out of the .Net world into the Java world and I miss my unit tests.

Using Visual Studio I used NUnit and TestDriven.net to run my unit tests.

What is a comparable system for Java Using Eclipse?

I'm looking specifically for the plugins that will get me going, or a guide on how to do it.

I'm aware that JUnit is what NUnit was initially based on, but I want to know the best way to integrate it into Eclipse as there seem to be a few plugins that do this and I don't have the time to play around with them all.

UPDATE

Okay I didn't know that JUnit was built into the IDE. Are there any plugins that make using JUnit any easier?

like image 982
Omar Kooheji Avatar asked Nov 28 '22 12:11

Omar Kooheji


1 Answers

Using JUnit with eclipse is actually very easy. Just go to File->New... and select JUnit Test Case. Eclipse will handle adding the JUnit library and all of the imports.

like image 57
pkaeding Avatar answered Dec 05 '22 10:12

pkaeding