Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate automatically a jUnit class from a java class

I just want to know if there is a tool or a function on right click to generate automatically a jUnit class when we've created a basic java class ?

Because I think I've already done this... But I can not remember how.

IDE: Eclispe Mars.

Thanks !

like image 883
Majestic Avatar asked Nov 16 '25 05:11

Majestic


1 Answers

Just select a class and go for : New->JUnit test case

Eclipse will ask you to checkbox all methods you want to test, and give you a nice configuration wizard, import junit etc...

like image 107
Yann TM Avatar answered Nov 18 '25 19:11

Yann TM



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!