Dr. Greenthumb
Dr. Greenthumb

Reputation: 2316

Add 'Test Packages' folder in Netbeans

I've created a new Netbeans project and noticed that unlike my previous project it's mising the 'Test Packages' folder. This might seem like an easy question, but how can I add this folder?

Here is a screenshot of my 'Projects' window:

enter image description here

Upvotes: 24

Views: 26601

Answers (3)

ddsultan
ddsultan

Reputation: 2307

Just add a folder called "test" in the root (Project) folder and reload the project by right clicking on the project. This worked for me.

Upvotes: 3

james.garriss
james.garriss

Reputation: 13406

Right click on Source Packages, select New > JUnit Test.... Follow the wizard to create the unit test. The Test Packages folder will be created automatically and your unit test will be placed inside. (Verified in NetBeans 8.)

Upvotes: 12

Saul
Saul

Reputation: 18071

Assuming it's a Java project:

  1. Create a new folder: right click the project under "Projects" tab, go to "New" --> "Other.." --> "Other" --> "Folder"

  2. Edit project properties: right click on the project, this time select "Properties"

  3. Under "Project Properties" select category "Sources"

  4. Notice the section "Test Package Folders" --> click "Add Folder"

Upvotes: 24

Related Questions