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 120566 - JUnit testing fails when Platform chaining.
Summary: JUnit testing fails when Platform chaining.
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-31 00:19 UTC by jamian
Modified: 2007-11-01 18:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Original Proceudre to reproduce issue (3.12 KB, application/octet-stream)
2007-10-31 00:27 UTC, jamian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jamian 2007-10-31 00:19:54 UTC
Our "home grown" NB platform (the TeremianPlatform) is a desktop app built on top of the NB-Platform. Our two other
desktop applications are built on top of the TeremianPlatform (not directly on the native NB-Platform) and hence they
inherit common functionality. By and large this works well for sharing common code between our apps. 

JUnit testing runs without problem in the TeremianPlatform. However, the other apps (that are built on the
TeremianPlatform) cannot run their JUnit tests. The test class fail compilation because "org.junit" is not available.

There is a thread (on nbusers) entitled "JUnit Library Woes on NB6-B2" that led to the issue being created here. In that
email chain there is a workaround in adding the JUnit path to the ANT build scripts.

This is in NB6-Beta2, and has probably been in other NB6 versions. I tried to reproduce on the most recent nightly build
(20071029) but that was throwing NPEs when creating new classes, so I opted for NB6-Beta2. I have a detailed procedure
for recreating the problem from first principles (see link below).

I placed it as P2 because there is a work around, but it is clumsy (especially if you don't know ANT well), and the
current situation would seem completely unacceptable if Netbeans wishes to promote itself as a platform, and enables
pretty easy platform chaining.

The procedure to reproduce the issue is at http://docs.google.com/Doc?id=dffd9xs7_69hgp9qw
Comment 1 jamian 2007-10-31 00:27:06 UTC
Created attachment 52069 [details]
Original Proceudre to reproduce issue
Comment 2 Jesse Glick 2007-11-01 17:47:02 UTC
Please use the component 'ide' if you are unsure where to file an issue. 'platform' is almost never correct.
Comment 3 Jesse Glick 2007-11-01 18:16:47 UTC
Build harness had not been fully updated to reflect the new java1 cluster, where junit-*.jar now live.

It is not a bug that "JUnit" does not appear under Test Libraries; that only appears if the JUnit *module* is present in
your target platform, e.g. if your target platform is an IDE installation. A future rewrite of Libraries and Test
Libraries nodes in this and other project types should make behavior more consistent. You can see that the IDE's
internal editor classpath is correct, because you have code completion etc. on the test file.

Would not normally consider this a P2, since suite chaining is unsupported in general and there is said to be a
workaround; but this is likely a regression from 5.5.

Checking in build.xml;
/shared/data/ccvs/repository/apisupport/harness/release/build.xml,v  <--  build.xml
new revision: 1.30; previous revision: 1.29
done