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 61061

Summary: single test case depends on entire "src" folder to compile
Product: java Reporter: wqtnetbeans <wqtnetbeans>
Component: ProjectAssignee: Tomas Zezula <tzezula>
Status: VERIFIED DUPLICATE    
Severity: blocker CC: junit-issues
Priority: P2    
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description wqtnetbeans 2005-07-17 05:02:48 UTC
4.1 final, web with existing sources

To run a single test case for a single class, the Ant is set up such that all
the classes in "src" have to compile before the single test case can be compiled
and run.

This is very inconvenient since often times to run a single test case, you only
need one or several src classes to compile. And while the coding is in progress,
you know not all src classes compile, and you just want to test one or serveral
classes that you know should compile. Because of the dependence on all the src
classes, this is not achievable.
Comment 1 Marian Petras 2005-07-18 08:18:20 UTC
Running tests is determined by the project type - reassigned to module "web".
Comment 2 zikmund 2005-07-18 13:02:04 UTC
The same thing hapens with Web Project and all Java projects too -> reassigning
to Java for evaluation.

BTW: Compiled sources are part of Test Compile class path. From this point of
view I think that it is intentional to compile all sources even for running 1
test case.
Comment 3 Tomas Zezula 2005-09-07 16:24:40 UTC
You are right that compilation of the single unit test may require only a subset
of sources, but the subset is a transitive closure of class dependency. The way
how to calculate such a subset is to use javamake and build and maintain a
dependency database. There is already an enhancement about it (the dependency of
test compilation unit on the source compilation unit is the same as the
dependency of 2 projects).
http://www.netbeans.org/issues/show_bug.cgi?id=36033

*** This issue has been marked as a duplicate of 36033 ***
Comment 4 Marian Mirilovic 2006-06-09 14:55:36 UTC
verified duplicate