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 - NGTest unit tests do not compile/run correctly when building a NetBeans Module
Summary: NGTest unit tests do not compile/run correctly when building a NetBeans Module
Status: NEW
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Stupka
Depends on:
Reported: 2017-04-24 15:34 UTC by cwhjones
Modified: 2017-04-24 15:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
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 generates the warnings.