|Automating plugin tests - org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitR [message #598581]
||Tue, 05 April 2005 14:36
Originally posted by: simon_martin.uk.ibm.com|
I am reposting the following problem from Peter Graves as I have the
identical problem. Unfortunately he received no replies to his posting.
Have I got something wrong in my test.xml setup?
Thanks for your help,
I am trying to automate the running of junit plugin tests, and am trying
to steal as much from automated test framework used by the eclipse core
tests (org.eclipse.test) as I can.
Currently I have a set of junit tests that I can launch from the ide and
all is well. I then ran through org.eclipse.test/library.xml and stole
the command line it uses to launch eclipse to just run the junit tests.
When ever I run the tests (see command line below) I am getting a
NoClassDefFoundError: junit/framework/TestListener. It looks like this
is coming from when it's trying to load the results formatter
in org.eclipse.test.EclipseTestRunner.CreateFormatter. Both my plugin
and org.eclipse.test depend on org.junit, but org.apache.ant does not.
Now, I have a workaround which is to add an import of org.junit in the
requires section of the org.apache.ant plugins plugin.xml . But this
seems like it must be the wrong answer, as the eclipse core tests seem
to be able to run without this change.
Seeing as the org.apache.ant plugin seems to use classes from org.junit
should it not be importing that? Is there something wrong with the way
I am going about this? (I am a new convert from C so I may just be dazed
Command line I am using to run the unit tests:
java -cp startup.jar org.eclipse.core.launcher.Main -application
org.eclipse.test.uitestapplication -dev bin -data cdt-workspace
-testPluginName org.eclipse.cdt.ui.tests -classname
org.eclipse.cdt.core.model.tests.AllCoreTests -noupdate -os win32 -ws
win32 -arch x86
Any help would be greatly appreciated,
Powered by FUDForum
. Page generated in 0.37050 seconds