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 开发者_Python百科easy question, but how can I add this folder?
Here is a screenshot of my 'Projects' window:
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"
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.)
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.
精彩评论