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.
Currently for all our projects the class NbTestCase is missing in our unit test dependencies. The module NB JUnit is not in our unit test dependencies. This was not the case before. Will the change fixing this be done on apisupport side (to add the said module automatically) or should all of our projects be updated to explicitly list this dependency?
Richard is on vacation. Jesse, please take this one.
Caused by http://hg.netbeans.org/main-silver/rev/3e27593d8860 Jesse, did you sent out some notification that we should change all our projects? Quoting from the commit log: "In the meantime, project will likely show error badges on test roots. Probably the only way module owners will ever be reminded to fix their metadata." If we are supposed to do something it would be good if we knew about it. Commit log is nice but a more explicit message explaining how exactly we should change our tests classpath would be nice. By exactly I mean whether it is enough to just add NB Junit library or some other (e.g. Insane). If the message went somewhere I apologize for not noticing (but nobody from my team noticed it as well).
Yes you need to update your libraries. This was actually true in NB 6.5 but enforcement was too weak - the warning in build log was apparently ignored. For performance reasons relating to classpath scanning it was becoming intolerable to use the default dependencies for so many modules. For unit tests, you must add JUnit 4; if you use NB JUnit then you must add that too (add as recursive so INSANE appears too). For functional tests, the same applies but you will generally need to add also some variant of jellytools, etc. Noting on nbdev.
What exactly "was true in 6.5"? After your commit our unit tests started to appear with wrong error badges which was not the case before the commit. I will update our modules ...
Could you please elaborate on "For performance reasons relating to classpath scanning it was becoming intolerable to use the default dependencies for so many modules."? I assume that vast majority of project owner will simply add dependencies on junit4+nbjunit+insane, because this combination seems to always work. I doubt anyone will invest time into checking whether a particular dependency is really required, as that would take too long for 50+ modules.
Your deps were supposed to be updated as of NB 6.5 and that is when the warning appeared during the build. As I said previously, the simplification in apisupport.project was in 6.8 dev builds, so now the compatibility code exists only in nbbuild. Regarding performance - this is significant for functional tests, for which XTest defaulted to adding a bunch of Jelly-related dependencies which you do not necessarily need. Modules which used defaulted dependencies thus sucked in an enormous transitive dependency tree (filed separately in java/source) that made classpath scanning unnecessarily slow, e.g. scanning a large subset of the java cluster when you merely opened a module from platform. Checking whether NB JUnit is required is essentially free. Just add JUnit 4 as a dep. If error badges disappear, you are done. If they remain, add NB JUnit (and set recursive) and they should then disappear. Upgrading a module this way takes a minute at the most.
*** Issue 173256 has been marked as a duplicate of this issue. ***
*** Issue 173396 has been marked as a duplicate of this issue. ***
Integrated into 'main-golden', will be available in build *200910061401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/f94515626bf8 User: Jesse Glick <jglick@netbeans.org> Log: Provide polite UI for adding JUnit 4 (and optionally NB JUnit) test dependencoes. See #171616.