Reputation: 2316
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:
Upvotes: 24
Views: 26601
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
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
Reputation: 18071
Assuming it's a Java project:
Create a new folder: right click the project under "Projects" tab, go to "New" --> "Other.." --> "Other" --> "Folder"
Edit project properties: right click on the project, this time select "Properties"
Under "Project Properties" select category "Sources"
Notice the section "Test Package Folders" --> click "Add Folder"
Upvotes: 24