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 135250 - Requiring a separate tests root prevents certain test setups
Summary: Requiring a separate tests root prevents certain test setups
Status: RESOLVED DUPLICATE of bug 60615
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: junit-issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-16 23:22 UTC by rolandk
Modified: 2009-10-19 10:28 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rolandk 2008-05-16 23:22:09 UTC
A way of organizing JUnit tests is to have an static package-visible inner class containing all unit tests for that
particular outer class, and then a Tests class in each package which sets up a suite with all those classes. In this
setup, the tests are integrated with the code and are close to the things that they test.

However, in NetBeans a separate root is required for the test classes, putting them in a different location than the
tests. It is not possible to run tests from the regular source root. This makes it cumbersome to interchange code with
people that uses other IDEs.

Please allow running tests from the source root.

Related, the competitive analysis at <http://junit.netbeans.org/proposed-new-features.html>, section III, contains the
assertion that JUnit is incapable of testing private methods, and that no IDE support that feature. This is in general
not correct. The above setup allows the tests to inspect the internal state of the unit.
Comment 1 Alexei Mokeev 2009-10-19 10:28:46 UTC

*** This issue has been marked as a duplicate of 60615 ***