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 72971 - support to add "Test" build artifacts from sub-project
Summary: support to add "Test" build artifacts from sub-project
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: Tomas Zezula
Depends on:
Reported: 2006-02-23 15:39 UTC by jportway
Modified: 2011-08-31 14:06 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description jportway 2006-02-23 15:39:23 UTC
The "Libraries" GUI should allow me to choose whether I want to import the "test" build artefacts from 
one project into the "Test" classpath of another project.

At the moment when you at a dependency on a sub-project to the "Compile Tests" section of the 
Libraries properties only the actual final build artefacts of the sub-project get added to your classpath. 
However it's common to create useful utility classes for testing purposes in the Tests source code, 
which may be re-used by sub-projects. For instance, in my current application I have a "networking" 
sub-project which defines basic networking protocols, and provides a base class for actual network 
"message" classes. Other projects import my networking sub-project and define concrete "message" 
classes from the base class. In order to test these concrete message classes I should be able to define a 
class in the "Tests" section of my networking project which provides a bas class for testing concrete 
message classes, which the other projects could then import and use for writing tests. However, as far 
as I can tell it's not possible to import test classes from a sub-project, so I either have to put this test 
class in my "Source packages" folder, so it can be shared (ugh), or copy and paste the base test class 
into every project I'm writing (even worse).