Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Struggling to install/add JUnit plugin in Netbeans IDE 8.0.2

I am new to Netbeans and I am trying to install JUnit in the IDE. I have searched multiple places and can not find a clear answer. I am running Windows8 with the latest updates and Netbeans 8.0.2. I have downloaded the jar file for JUnit opened Tools => Plugins then Downloaded tab. I select the jar file but nothing happens. I have also tried to run the jar file from commandline and double clicked it and nothing happens. I am looking to expand my skills sets by practicing using JUnit so any help would be appreciated.

thank you.

like image 917
Joe Avatar asked Mar 16 '23 00:03

Joe


2 Answers

It is installed by default. To see that it is installed goto Tools -> Plugins -> Installed and search for JUnit. If it is not there, check Tools -> Plugins -> Available Plugins before trying your own download.

To use select any java file in the projects directory, right-click Tools -> Create/Update Tests. This will create a stub test file under Test Packages under your Project in the projects tab. Select the project and right-click for Test to run all the tests or select any file and right-click for the Test File option.

like image 120
WillShackleford Avatar answered Mar 27 '23 00:03

WillShackleford


I have not used Netbeans for many years now. However, a quick search shows that during the installation process, there is an option of installing JUnit along with Netbeans. The default option(checked) is Install JUnit.

If by any chance, the second option(Do not install JUnit) got checked, you may want to re-install Netbeans again.

enter image description here

like image 25
Sandeep Chatterjee Avatar answered Mar 27 '23 02:03

Sandeep Chatterjee