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 195139

Summary: Unable to compile RCP applications with JUnit dependencies
Product: apisupport Reporter: javydreamercsw <javydreamercsw>
Component: HarnessAssignee: Jesse Glick <jglick>
Status: RESOLVED WONTFIX    
Severity: normal CC: anebuzelsky
Priority: P1    
Version: 7.0   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description javydreamercsw 2011-02-07 19:13:45 UTC
[ BUILD # : 7.0 Beta 2 ]
[ JDK VERSION : 1.6.22 ]

Trying to compile an existing suite with dependencies or attemting to add the
dependencies throws an error about being unable to find the junit dependencies.
From the issue below it seems there are some places this needs to be addressed.
Is not clear enough to the user, at least for me, how to fix the issue.

Users upgrading to Beta 2 on their applications will encounter this issue as
long as they have unit testing on their application, which I assume most of
them do.

This seems related to issue 195123.
Comment 1 Jesse Glick 2011-02-07 19:38:07 UTC
JUnit was removed from the IDE and Platform. Running tests requires the org.netbeans.libs.junit4 wrapper module to be present (normally in the platform cluster).

You can install JUnit in your IDE (e.g. by resolving references on a broken j2seproject) so that o.n.l.junit4 is present in your platform cluster, assuming you are compiling against the default platform. If you are using some other platform, you can install org-netbeans-libs-junit4.nbm from an older version of NB, say using the <autoupdate> task.

core-main #a6536dfe3b4b also makes it possible to run basic unit tests just by making sure JUnit 4.8.2 is downloaded to your local Maven repo, though this may not work for functional tests using NbModuleSuite. This trick will not suffice e.g. for the in-IDE classpath, so this is mainly useful for CI jobs using a fixed netbeans.dest.dir.

Refinements to the OOBE of JUnit-based testing are likely before 7.0 FCS, time permitting.