Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Junit Test With IntelliJ

When I try to create a Junit test for certain classes in my project nothing happens when I hit OK. IntelliJ also doesn't give me the option to select a destination folder. Any suggestions?

enter image description here

enter image description here

like image 802
Joseph hooper Avatar asked Dec 25 '22 12:12

Joseph hooper


1 Answers

It is pretty simple . Just right click on the desired Folder -> Mark Directory as -> Test Source Root

Now for any Code, just right click on the class -> Go to -> Test -> Create New test .

Now click Ok, you will the test is created in the folder which you have marked as test Source Root.

like image 58
Biraj B Choudhury Avatar answered Jan 04 '23 11:01

Biraj B Choudhury