Automated PDE JUnit Testing With Eclipse 3.3M5
Revision as of 14:33, 25 January 2007 by Codeslave.ca.ibm.com (Talk | contribs) (→History)
This article is a stub. You can help Eclipsepedia by expanding it.
After 3.3M4, Modeling builds no longer ran their JUnit tests, due to changes in the way Eclipse packages its startup jars. The fix is trivial, and will be explained below.
[echo] Running org.eclipse.someproject.tests.AllTests [java] Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/core/launcher/Main
- These changes should apply to anyone using PDE for builds & included JUnit tests.
|runtests||switch from startup.jar to org.eclipse.equinox.launcher_*.jar||
|runtests||switch Main classes||
- These changes may be specific to only Modeling project builds, including EMFT builds.
|relengbuildgtk.sh||don't pass -cp into runtests script to override value set there||
|runtests||remove -noupdate flag (not supported anymore)||
To run tests, you'll need something like this:
$JAVA_HOME/bin/java $Xflags -enableassertions -cp $cp \ org.eclipse.equinox.launcher.Main -ws $ws -os $os -arch $arch \ -application org.eclipse.ant.core.antRunner -data $workspaceDir \ -file test.xml $antTestTarget \ $Dflags -Dws=$ws -Dos=$os -Darch=$arch -D$installmode=true $J2SE15flags \ $properties -logger org.apache.tools.ant.DefaultLogger
The variables noted in the above example can be seen in detail in the runtests shell script.
- FAQ How do I run Eclipse? (including starting eclipse with
java -cp ... org.eclipse....Main)
- Eclipse Program Launcher (including commandline flags)
- Eclipse Runtime Options (including commandline flags)
- Equinox Launcher (history of changes including related Bugzillas)
- Eclipse Test Framework