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.
There should be dependencies correctly set for all projects' tests. Currently it's not possible to run tests for java/project untill building tests for projects/projectapi and ant/project. Don't know about other unsatisfied deps.
Workaround for a couple of cases (not for XTest, for in-IDE testing): committed * Up-To-Date 1.5 ant/project/build.xml committed * Up-To-Date 1.4 apisupport/project/build.xml
Would require some kind of declaration in project.xml for test dependencies - for unit tests as well for other kinds like qa-functional - compile-time deps vs. runtime-only deps Could also be used to remove the need to specify Class-Path extensions explicitly (q.v. issue #52354).
Should also allow you to omit entries from test.unit.run.cp.extra which are modules in the dep list of some module this module deps on. Otherwise you have to manually compute the transitive closure of modules from this one just to get typical unit tests to run, which is no fun.
*** Issue 62668 has been marked as a duplicate of this issue. ***
50HR Target milestone 5.0 -> TBD
*** Issue 72806 has been marked as a duplicate of this issue. ***
I added parsing ability to ParseProjectXML task into testdep_54161 branch. /cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/Attic/TestDepsProject.xml,v done Checking in test/unit/src/org/netbeans/nbbuild/TestDepsProject.xml; /cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/Attic/TestDepsProject.xml,v <-- TestDepsProject.xml new revision: 1.1.2.1; previous revision: 1.1 done RCS file: /cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/Attic/TestDepsTest.java,v done Checking in test/unit/src/org/netbeans/nbbuild/TestDepsTest.java; /cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/Attic/TestDepsTest.java,v <-- TestDepsTest.java new revision: 1.1.2.1; previous revision: 1.1 done RCS file: /cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/Attic/TestDeps.xml,v done Checking in test/unit/src/org/netbeans/nbbuild/TestDeps.xml; /cvs/nbbuild/test/unit/src/org/netbeans/nbbuild/Attic/TestDeps.xml,v <-- TestDeps.xml new revision: 1.1.2.1; previous revision: 1.1 done Checking in antsrc/org/netbeans/nbbuild/ParseProjectXml.java; /cvs/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java,v <-- ParseProjectXml.java new revision: 1.40.18.1; previous revision: 1.40 done
I don't like project.xml structure. It is far from original proposal. I think <test-groups> and <test-group> elements are something new in tests terminology. At least I would use test-types/test-type. Or rather something like this: </module-dependencies> <test-dependencies test-type="unit"> <dependency> <code-name-base>org.openide.util</code-name-base> <compile-dependency/> </dependency>/ <dependency> <code-name-base>org.openide.filesystems</code-name-base> <compile-dependency/> <run-dependency> <recursive/> </run-dependency> </dependency> <dependency> <test/> <code-name-base>org.openide.filesystems</code-name-base> </dependency> </test-dependecies>
I can change it. <test-dependencies test-type="unit"> I am for to move test-type="unit" to element: <test-type>unit</test-type> Why to specify <recursive> only for run-dependency ? <run-dependency> <recursive/> </run-dependency>
> I am for to move test-type="unit" to element: <test-type>unit</test-type> I am not against it. > Why to specify <recursive> only for run-dependency ? It was just an example. It didn't show every possible case.
Test dependencies for test are described in first chapter of http://apisupport.netbeans.org/TestDistAndDep.html document.
Created attachment 31767 [details] diff with changes (available in branch testdep_54161)
Created attachment 31897 [details] unified diff
Created attachment 31898 [details] changes in apisupport/harness
Y01 I can see that the templates/common.xml is now supposed to know something about qa-functional test. Jesse shall decide, but I guess this is wrong, afaik common.xml was supposed to be qa-functional independent and support only unit tests.
Y02 Following references in common.xml are not very nice: + <pathelement path="${nb_all}/jellytools/builds/jelly2-nb.jar"/> + <pathelement location="${nb_all}/jemmy/builds/jemmy.jar"/> and imho shall be avoided. Maybe they are acceptable in projectized.xml, but still not nice, imho.
Y01 I can move tasks for building qa-functional tests to projectized.xml. It is better to build test by netbeans harness than by xtest. Do you agree? The problem can be solved by project natures, BTW. Y02 Ok I will move it to projectized.xml.
Intergrated to trunk: User: pzajac Date: 2006/07/18 13:17:46 Added: nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependenciesPass.properties nbbuild/test/unit/src/org/netbeans/nbbuild/TestDepsTest.java nbbuild/test/unit/src/org/netbeans/nbbuild/ShorterPathsTest.java nbbuild/test/unit/src/org/netbeans/nbbuild/TestDepsProject.xml nbbuild/test/unit/src/org/netbeans/nbbuild/TestDeps.xml nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependenciesTest.java nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependenciesProject.xml nbbuild/test/unit/src/org/netbeans/nbbuild/ShorterPathsTest.xml nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependenciesTest.xml nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependencies.properties nbbuild/test/unit/src/org/netbeans/nbbuild/FixTestDependenciesProjectPass.xml nbbuild/templates/testdist/unit-all-unit.xml nbbuild/templates/testdist/xtest-build.xml nbbuild/templates/testdist/xtest-all-unit.xml nbbuild/templates/testdist/all-unit.properties nbbuild/templates/testdist/unit-unit.xml nbbuild/antsrc/org/netbeans/nbbuild/FixTestDependencies.java nbbuild/antsrc/org/netbeans/nbbuild/ShorterPaths.java Modified: xtest/lib/module_harness.xml nbbuild/templates/xtest.xml nbbuild/templates/xtest-unit.xml nbbuild/templates/projectized.xml nbbuild/templates/common.xml nbbuild/templates/xtest-qa-functional.xml xtest/plugins_src/base/lib/basic_compiler_targets.xml xtest/plugins_src/base/lib/basic_packager_targets.xml apisupport/harness/release/build.xml nbbuild/build.properties nbbuild/default-properties.xml nbbuild/default.xml nbbuild/build.xml nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java apisupport/harness/taskdefs.properties nbbuild/test/build-unit.xml xtest/src/org/netbeans/xtest/harness/MTestExecutor.java Modified: ant/grammar/nbproject/project.xml ant/grammar/nbproject/project.properties core/execution/nbproject/project.xml core/execution/nbproject/project.properties openide/fs/nbproject/project.xml web/jspsyntax/nbproject/project.properties web/jspsyntax/nbproject/project.xml openide/masterfs/nbproject/project.properties openide/masterfs/nbproject/project.xml openide/util/nbproject/project.xml openide/util/nbproject/project.properties openide/compat/nbproject/project.xml diff/nbproject/project.xml ide/test/build-qa-functional.xml core/startup/nbproject/project.xml core/startup/nbproject/project.properties projects/projectapi/nbproject/project.properties projects/projectapi/nbproject/project.xml projects/libraries/nbproject/project.properties projects/libraries/nbproject/project.xml core/output2/nbproject/project.properties core/output2/nbproject/project.xml web/freeform/nbproject/project.xml web/freeform/nbproject/project.properties core/settings/nbproject/project.properties core/settings/nbproject/project.xml xml/multiview/nbproject/project.properties xml/multiview/nbproject/project.xml java/project/nbproject/project.xml java/project/nbproject/project.properties html/editor/nbproject/project.xml html/editor/nbproject/project.properties ant/freeform/nbproject/project.xml ant/freeform/nbproject/project.properties j2ee/ejbfreeform/nbproject/project.properties j2ee/ejbfreeform/nbproject/project.xml ant/nbproject/project.xml ant/nbproject/project.properties core/windows/nbproject/project.properties core/windows/nbproject/project.xml j2ee/ejbapi/nbproject/project.xml java/j2seplatform/nbproject/project.properties java/j2seplatform/nbproject/project.xml java/freeform/nbproject/project.xml java/freeform/nbproject/project.properties openide/loaders/nbproject/project.properties openide/loaders/nbproject/project.xml web/webapi/nbproject/project.xml core/bootstrap/nbproject/project.xml core/bootstrap/nbproject/project.properties java/j2seproject/nbproject/project.properties java/j2seproject/nbproject/project.xml html/editor/lib/nbproject/project.xml html/editor/lib/nbproject/project.properties html/nbproject/project.properties html/nbproject/project.xml xml/text-edit/nbproject/project.properties xml/text-edit/nbproject/project.xml xml/tageditorsupport/nbproject/project.properties xml/tageditorsupport/nbproject/project.xml j2ee/ddapi/nbproject/project.xml j2ee/ddapi/nbproject/project.properties openide/modules/nbproject/project.xml ide/launcher/upgrade/nbproject/project.xml refactoring/test/build-qa-functional.xml ant/project/nbproject/project.xml ant/project/nbproject/project.properties core/favorites/nbproject/project.xml core/favorites/nbproject/project.properties debuggerjpda/nbproject/project.xml autoupdate/nbproject/project.xml db/nbproject/project.properties db/nbproject/project.xml openide/nodes/nbproject/project.xml j2ee/ddloaders/nbproject/project.xml core/nbproject/project.xml core/nbproject/project.properties openide/dialogs/nbproject/project.xml projects/projectui/nbproject/project.xml projects/projectui/nbproject/project.properties web/project/nbproject/project.properties web/project/nbproject/project.xml core/javahelp/nbproject/project.xml openide/options/nbproject/project.xml openide/actions/nbproject/project.xml openide/windows/nbproject/project.xml openide/explorer/nbproject/project.xml openide/execution/nbproject/project.xml tomcatint/tomcat5/nbproject/project.xml j2eeserver/nbproject/project.xml
1) There is an issue 57379 to build jellytools before qa-functional tests are run. It is handled in xtest-qa-functional.xml and it should be added to projectized.xml. 2) There is a bug in parsing. If you have: <test-dependency> <code-name-base>org.openide.windows</code-name-base> <compile-dependency/> </test-dependency> It is parsed both to compilecp and runtimecp properties. But it should be only in compilecp.
1) it's mean to add building of jellytools and jemmy to projectized.xml 2) It is another requirement There are only 2 scenarios now a)runtime + compile dependency <test-dependency> <code-name-base>org.openide.windows</code-name-base> <compile-dependency/> </test-dependency> b)runtime dependency <test-dependency> <code-name-base>org.openide.windows</code-name-base> </test-dependency> Do you really need compile dependency without runtime dependency?
> Do you really need compile dependency without runtime dependency? Yes, for tests executed in IDE mode I need IDE jars on compilation classpath but not on runtime classpath. But I can't think of use case where I need only runtime dependency. I think there should be only compile dependency and compile+runtime.
Test executed in ide mode has only special libraries on classpath. The libraries are not modularized so they are not defined in project.xml. The special librararies are defined in property. The new solution is compatible with the old property based. It works well. What's your real requirement?
For example in module apisupport/refactoring there is defined compilation classpath for qa-functional tests in propect.properties. Now it is possible to move this definition from project.properties to project.xml. But this is only compilation classpath and you cannot define only compilation classpath in project.xml.
The runtime classpath of the apisupport/refactoring is defined by netbeans module system : <property name="xtest.ide.use.classloader" value="org.netbeans.modules.apisupport.refactoring"/> Are you really able to add netbeans modules to runtime classpath of tests in ide mode? I transfered test dependencies only for modules declared in masterconfig.xml. The conversion can be simply done by executing fix-test-dependencies ant target in module.
I still need to review this thoroughly (just haven't had time yet), but one immediate comment: you cannot just add new elements to the existing http://www.netbeans.org/ns/nb-module-project/2.xsd. You must create and publish a /3 version (and fix all parsing code to accept either /2 or /3).
Also a complete description of the new format should be included in apisupport/harness/release/README.
Created attachment 32046 [details] diff between nb-module-project2.xsd and nb-module-project3.xsd
I forgot on the xml schema update. It strange that everything is working with the previous schema version /2. I attached diff between versions /2 and /3. I don't know how to upload the the new version.
Created attachment 32047 [details] new version of diff between nb-module-project2.xsd and nb-module-project3.xsd
What is nbbuild/templates/testdist/all-unit.properties? It looks to be mechanically generated. If so, why is it in CVS?
The all-unit.properties file will be cobiled copied to binary test distribution. It contains all folders with tests in binary tests distribution. Yes, the file can be automatically generated.
I guess this can be considered fixed with blocking issues, most significantly issue #80824 re. schema versioning which I will try to address.