Community
Participate
Working Groups
Created attachment 147097 [details] Test plug-ins. Test execution corrupts classpath. In the attached projects, when executing /a/a1.testsuite, the referenced test suite in project b cannot access code referenced on its classpath in the plug-in's manifest. In this case, the code that plug-in b is referencing in its generated JUnit test class is in org.eclipse.hyades.test.core, referenced by org.eclipse.hyades.test.tools.core (referenced by both projects). During execution of the TPTP JUnit test, the classpaths of the plug-ins are corrupted.
Requires a new test case. Requires adding /org.eclipse.hyades.test.core.tests/junit/util/Test.Util.EMFUtil.Test.testsuite to /org.eclipse.hyades.test.core.tests/junit/AllTests.testsuite.
After a preliminary investigation, the org.eclipse.hyades.test.core plug-in is not on the classpath for the artifact (manually or automatically created). It appears that adding a test asset to a new artifact does not set the CLASSPATH general property correctly. For more information, see org.eclipse.hyades.test.core.util.ArtifactUtil.calculateClasspath(TPFTestSuite, CFGArtifact). In addition, when adding a folder to a test plug-in's classpath, the folder is periodically not added to the artifact when adding a test asset from the test plug-in's to the artifact. For example, run /org.eclipse.hyades.tests/BVT/AllBVTJUnitTests.testsuite without a deployment. Work-around: Manually create a deployment/artifact/location and add the missing entries as CLASSPATH general properties to the artifact. (In reply to comment #1) > Requires a new test case. > > Requires adding > /org.eclipse.hyades.test.core.tests/junit/util/Test.Util.EMFUtil.Test.testsuite > to /org.eclipse.hyades.test.core.tests/junit/AllTests.testsuite. Done. Leveraged the work-around to resolve the issue with the BVTs.
After additional debugging, the dependencies were not added to the artifact's CLASSPATH general property since they were not reexported. When test suites references test suites/cases located in another plug-in project, the dependencies must be reexported in the referenced plug-in project's manifest (see http://help.eclipse.org/galileo/topic/org.eclipse.pde.doc.user/guide/tools/editors/manifest_editor/dependencies.htm) when running the referencing test suite. Corrected the offending test plug-in the the Test Project test bucket.
Opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=289521 to update the Test Project documentation on deployments.
Closing.