This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
It is not possible to generate JUnit tests for sources in the folders -> Other Sources -> Generated Sources If a source file in those folders is selected directly then JUnit is absent from the right click Tools menu. If Project right click menu, New -> JUnit -> "Test for Existing class" is selected. Then the JUnit wizard does not offer Other Sources or Generated Sources folders to be selected when Browse is choosen. A Specific example of the need for this is with Code Generated for jaxb2 binding from a schema. I want to write JUnit tests to validate my schema.
Steps to recreate 1) Create Maven project. 2) Download schema e.g. http://examples.oreilly.com/9780596002527/examples/first.xsd 3) Place Schema into Other Sources. 4) Select Project, Right click -> New -> JAXB Bind New Schema 5) Select Schma from Other Sources and finish. 6) Build. 7) Attempt to Create Unit JUnit test for ObjectFactory.java
AFAICT this was never supported. At least as far back as 7.1 that I checked. Marking as enhancement. Thank you for reporting