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.

Bug 270478

Summary: NGTest unit tests do not compile/run correctly when building a NetBeans Module
Product: projects Reporter: cwhjones
Component: Ant ProjectAssignee: Tomas Stupka <tstupka>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description cwhjones 2017-04-24 15:34:39 UTC
Attempting to add an NGTest based unit test to a NetBeans Module project seems to work except that when the test is compiled it reports a warning :-
"No processor claimed any of these annotations : org.testng.annotations.{which ever are used in the test}"

 Scanning the .jar files I can not find a javax.annotation.processing.Processor file in the META-INF/services directory.

 This does not seem to matter if this is a new project in NetBEans 8.2, running the test there works despite the compiler warning. But if the test(s) were created in an earlier NetBeans execution fails either with missing dependencies (of JUnit4 ?) or further references to the org.testng.annotations classes.  

In my case I moved from a 7 series Netbeans to 8.1 and then to 8.2 
The Java version is 1.8.0_131

 As an illustration create a new 'FeedReader Application' 'Feed Reader Bean' sample project and add an NGTest to org.netbeans.feedreader.nodes.EntryBeanNode. Compiling the new EntryBeanNodeNGTest.java generates the warnings.