Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » Automating plugin tests -
Automating plugin tests - [message #598581] Tue, 05 April 2005 14:36
Eclipse UserFriend
Originally posted by:

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
( 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
and confused..)

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 nitResultFormatter,mytests.xml
-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,
-Peter Graves
Previous Topic:Plugin
Next Topic:Automating plugin tests -
Goto Forum:

Current Time: Sat Apr 13 20:40:48 GMT 2024

Powered by FUDForum. Page generated in 0.03637 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top