Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Eclipse Testing Framework
Eclipse Testing Framework [message #79963] Mon, 07 August 2006 06:13 Go to next message
Darren Hurt is currently offline Darren Hurt
Messages: 91
Registered: July 2009
Member
This may not be the correct place to post this, as it refers to the Eclipse
Testing Framework
for testing plug-ins rather than TPTP.
However, I thought I'd give it a try.

I am trying to use the Eclipse Testing Framework to run tests on a plug-in I
have written.
I am using Eclipse 3.1.1.

I have taken the proper versions of the various plug-ins and feature

The relevent features and plug-ins have the following structure in my
eclipse
eclipse
features
org.eclipse.test_3.1.0
plugins
org.eclipse.test
org.eclipse.test.performance.win32_3.1.0
org.eclipse.test.performance_3.1.0
org.eclipse.test.source_3.1.0
myplugin
myplugin.tests

(they are all 3.1.0 versions, but the foldername for org.eclipse.test does
not include the version due to the ugly reference to the library.xml in the
tests.xml files).

My tests are contained in a seperate plug-in of their own (myplugin.tests)
that depends on the plug-in of mine that they are testing (myplugin).

My plug-in has its own tests.xml file (see bottom of this message).

I have tried invoking my tests in two seperate ways (as indicated in the
testframework.html document)

java -jar startup.jar -application org.eclipse.test.uitestapplication -dev
bin -testlistener org.eclipse.test.XMLTestListener -testpluginname
myplugin.tests-classname myplugin.AllTests

java -jar startup.jar -application org.eclipse.ant.core.antRunner -buildfile
plugins\mypluins.tests\test.xml -Declipse-home=%ECLIPSE_HOME%.

I get strange results with both approaches.
With the first approach I get class not found exceptions that are different
each time I try to run it.
With the second approach I get a stack trace as below.

My plugin does have the correct classpath and runs ok.
Also, I'm pretty sure my test plug-in has the correct dependencies (it only
depends on the org.junit plug-in and the plug-in i'm testing).

Does anyone have any idea what I am doing wrong, and more to the point, what
I need to do to make this work?




[java] org.osgi.framework.BundleException: The activator
org.eclipse.ui.internal.WorkbenchPlugin for bundle org.eclipse.ui.workbench
is invalid
[java] at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:149)
[java] at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:965)
[java] at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:313)
[java] at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:264)
[java] at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:116)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
[java] at
org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(SingleSourcePackage.java:37)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:386)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
[java] at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[java] at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302 )
[java] at java.lang.ClassLoader.defineClass0(Native Method)
[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
[java] at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(DefaultClassLoader.java:370)
[java] at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClassLoader.java:233)
[java] at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(DefaultClassLoader.java:343)
[java] at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(DefaultClassLoader.java:235)
[java] at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(AbstractClassLoader.java:183)
[java] at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(EclipseClassLoader.java:141)
[java] at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:122)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:389)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
[java] at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:275)
[java] at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
[java] at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1248)
[java] at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:152)
[java] at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:142)
[java] at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:129)
[java] at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 48)
[java] at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:222)
[java] at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
[java] at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at
org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
[java] at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
[java] at org.eclipse.core.launcher.Main.run(Main.java:973)
[java] at org.eclipse.core.launcher.Main.main(Main.java:948)
[java] Caused by: java.lang.NoClassDefFoundError:
org/eclipse/swt/SWTError
[java] at java.lang.Class.getDeclaredConstructors0(Native Method)
[java] at
java.lang.Class.privateGetDeclaredConstructors(Class.java:16 10)
[java] at java.lang.Class.getConstructor0(Class.java:1922)
[java] at java.lang.Class.newInstance0(Class.java:278)
[java] at java.lang.Class.newInstance(Class.java:261)
[java] at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:144)
[java] ... 43 more
[java] Root exception:
[java] java.lang.NoClassDefFoundError: org/eclipse/swt/SWTError
[java] at java.lang.Class.getDeclaredConstructors0(Native Method)
[java] at
java.lang.Class.privateGetDeclaredConstructors(Class.java:16 10)
[java] at java.lang.Class.getConstructor0(Class.java:1922)
[java] at java.lang.Class.newInstance0(Class.java:278)
[java] at java.lang.Class.newInstance(Class.java:261)
[java] at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:144)
[java] at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:965)
[java] at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:313)
[java] at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:264)
[java] at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:116)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
[java] at
org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(SingleSourcePackage.java:37)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:386)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
[java] at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[java] at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302 )
[java] at java.lang.ClassLoader.defineClass0(Native Method)
[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
[java] at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(DefaultClassLoader.java:370)
[java] at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClassLoader.java:233)
[java] at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(DefaultClassLoader.java:343)
[java] at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(DefaultClassLoader.java:235)
[java] at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(AbstractClassLoader.java:183)
[java] at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(EclipseClassLoader.java:141)
[java] at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:122)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:389)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
[java] at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:275)
[java] at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
[java] at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1248)
[java] at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:152)
[java] at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:142)
[java] at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:129)
[java] at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 48)
[java] at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:222)
[java] at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
[java] at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at
org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
[java] at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
[java] at org.eclipse.core.launcher.Main.run(Main.java:973)
[java] at org.eclipse.core.launcher.Main.main(Main.java:948)

[java] !ENTRY org.eclipse.osgi 2006-08-04 17:18:37.549
[java] !MESSAGE Application error
[java] !STACK 1
[java] org.eclipse.core.runtime.CoreException[1]:
java.lang.NoClassDefFoundError: org/eclipse/ui/testing/ITestHarness
[java] at java.lang.ClassLoader.defineClass0(Native Method)
[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
[java] at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(DefaultClassLoader.java:370)
[java] at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClassLoader.java:233)
[java] at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(DefaultClassLoader.java:343)
[java] at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(DefaultClassLoader.java:235)
[java] at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(AbstractClassLoader.java:183)
[java] at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(EclipseClassLoader.java:141)
[java] at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:122)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:389)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
[java] at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[java] at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:275)
[java] at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
[java] at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1248)
[java] at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:152)
[java] at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:142)
[java] at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:129)
[java] at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 48)
[java] at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:222)
[java] at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
[java] at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at
org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
[java] at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
[java] at org.eclipse.core.launcher.Main.run(Main.java:973)
[java] at org.eclipse.core.launcher.Main.main(Main.java:948)

[java] !ENTRY org.eclipse.osgi 2006-08-04 17:18:37.674
[java] !MESSAGE Bundle
update@plugins/org.eclipse.core.resources.win32_3.1.0.jar [52] was not
resolved.

[java] !ENTRY org.eclipse.osgi 2006-08-04 17:18:37.706
[java] !MESSAGE Bundle
update@plugins/org.eclipse.swt.win32.win32.x86_3.1.1.jar [214] was not
resolved.

[java] !ENTRY org.eclipse.osgi 2006-08-04 17:18:37.706
[java] !MESSAGE Bundle update@plugins/org.eclipse.ui.win32_3.1.0.jar
[234] was not resolved.

[java] !ENTRY org.eclipse.osgi 2006-08-04 17:18:37.721
[java] !MESSAGE Bundle
update@plugins/org.eclipse.update.core.win32_3.1.0.jar [240] was not
resolved.
[java] Java Result: 13

cleanup:

run:



<?xml version="1.0" encoding="UTF-8"?>

<project name="testsuite" default="run" basedir=".">
<property name="eclipse-home" value="${basedir}/../../" />
<property name="plugin-name" value="myplugin.tests"/>
<property name="library-file"
value="${eclipse-home}/plugins/org.eclipse.test/library.xml "/>

<target name="init">
<tstamp/>
<delete>
<fileset dir="${eclipse-home}" includes="org*.xml"/>
</delete>
</target>

<target name="suite">
<property name="myfolder" value="${eclipse-home}/myfolder"/>
<delete dir="${myfolder}" quiet="true"/>
<ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
<property name="data-dir" value="${myfolder}"/>
<property name="plugin-name" value="${plugin-name}"/>
<property name="classname" value="myplugin.tests.AllTests"/>
</ant>
</target>

<target name="cleanup">
</target>

<target name="run" depends="init,suite,cleanup">
<ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
<property name="includes" value="org*.xml"/>
<property name="output-file" value="${plugin-name}.xml"/>
</ant>
</target>

<!-- This target runs the performance test suites. -->
<target name="performance">
</target>
</project>
Re: Eclipse Testing Framework [message #80927 is a reply to message #79963] Thu, 17 August 2006 10:16 Go to previous messageGo to next message
Marco Maniscalco is currently offline Marco Maniscalco
Messages: 9
Registered: July 2009
Junior Member
it's funny, I gut exactly the same problem. It only comes up wen using
some swt/ui dependencies. "core-test" works great for me. but I have big
trouble using "ui-test". for some reasons the workspace doesn't get
initialized.
Re: Eclipse Testing Framework [message #80969 is a reply to message #80927] Thu, 17 August 2006 11:18 Go to previous messageGo to next message
Marco Maniscalco is currently offline Marco Maniscalco
Messages: 9
Registered: July 2009
Junior Member
I'm proud to present my solution :-)
You have to add all relevant dependencies such as

org.eclipse.core.runtime,
org.eclipse.ui.ide,
org.eclipse.jdt.junit,
org.junit,
org.eclipse.ui,
<and your own>

and the second step is using the classloader directly instead of the
test.xml ant script.

java -jar startup.jar -application org.eclipse.test.uitestapplication -dev
bin
formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter
-testpluginname testUser -classname test.AllTests

worked great for me. on the shell the result of the junit test in xml
format is shown. the only problem is, that the XML printer uses crazy html
encoding so that a conversion is useful. the other possibility is using
the plain printer instead.

hope this helps
Re: Eclipse Testing Framework [message #98098 is a reply to message #79963] Mon, 07 May 2007 07:49 Go to previous message
Paul Slauenwhite is currently offline Paul Slauenwhite
Messages: 970
Registered: July 2009
Senior Member
Darren,
Please post your question to the Eclipse project (eclipse.platform)
newsgroup since the Eclipse Testing Framework is part of the Eclipse
Platform.

Paul
"Darren Hurt" <darren.hurt@coexis.com> wrote in message
news:eb73nr$a4j$1@utils.eclipse.org...
> This may not be the correct place to post this, as it refers to the
> Eclipse Testing Framework
> for testing plug-ins rather than TPTP.
> However, I thought I'd give it a try.
>
> I am trying to use the Eclipse Testing Framework to run tests on a plug-in
> I
> have written.
> I am using Eclipse 3.1.1.
>
> I have taken the proper versions of the various plug-ins and feature
>
> The relevent features and plug-ins have the following structure in my
> eclipse
> eclipse
> features
> org.eclipse.test_3.1.0
> plugins
> org.eclipse.test
> org.eclipse.test.performance.win32_3.1.0
> org.eclipse.test.performance_3.1.0
> org.eclipse.test.source_3.1.0
> myplugin
> myplugin.tests
>
> (they are all 3.1.0 versions, but the foldername for org.eclipse.test does
> not include the version due to the ugly reference to the library.xml in
> the
> tests.xml files).
>
> My tests are contained in a seperate plug-in of their own (myplugin.tests)
> that depends on the plug-in of mine that they are testing (myplugin).
>
> My plug-in has its own tests.xml file (see bottom of this message).
>
> I have tried invoking my tests in two seperate ways (as indicated in the
> testframework.html document)
>
> java -jar startup.jar -application org.eclipse.test.uitestapplication -dev
> bin -testlistener org.eclipse.test.XMLTestListener -testpluginname
> myplugin.tests-classname myplugin.AllTests
>
> java -jar startup.jar -application
> org.eclipse.ant.core.antRunner -buildfile
> plugins\mypluins.tests\test.xml -Declipse-home=%ECLIPSE_HOME%.
>
> I get strange results with both approaches.
> With the first approach I get class not found exceptions that are
> different
> each time I try to run it.
> With the second approach I get a stack trace as below.
>
> My plugin does have the correct classpath and runs ok.
> Also, I'm pretty sure my test plug-in has the correct dependencies (it
> only
> depends on the org.junit plug-in and the plug-in i'm testing).
>
> Does anyone have any idea what I am doing wrong, and more to the point,
> what
> I need to do to make this work?
>
>
>
>
> [java] org.osgi.framework.BundleException: The activator
> org.eclipse.ui.internal.WorkbenchPlugin for bundle
> org.eclipse.ui.workbench
> is invalid
> [java] at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:149)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:965)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:313)
> [java] at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:264)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:116)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
> [java] at
> org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(SingleSourcePackage.java:37)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:386)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
> [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> [java] at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302 )
> [java] at java.lang.ClassLoader.defineClass0(Native Method)
> [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(DefaultClassLoader.java:370)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClassLoader.java:233)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(DefaultClassLoader.java:343)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(DefaultClassLoader.java:235)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(AbstractClassLoader.java:183)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(EclipseClassLoader.java:141)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:122)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:389)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
> [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:275)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
> [java] at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1248)
> [java] at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:152)
> [java] at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:142)
> [java] at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:129)
> [java] at
> org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 48)
> [java] at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:222)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> [java] at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> [java] at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> [java] at java.lang.reflect.Method.invoke(Method.java:324)
> [java] at
> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
> [java] at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> [java] at org.eclipse.core.launcher.Main.run(Main.java:973)
> [java] at org.eclipse.core.launcher.Main.main(Main.java:948)
> [java] Caused by: java.lang.NoClassDefFoundError:
> org/eclipse/swt/SWTError
> [java] at java.lang.Class.getDeclaredConstructors0(Native Method)
> [java] at
> java.lang.Class.privateGetDeclaredConstructors(Class.java:16 10)
> [java] at java.lang.Class.getConstructor0(Class.java:1922)
> [java] at java.lang.Class.newInstance0(Class.java:278)
> [java] at java.lang.Class.newInstance(Class.java:261)
> [java] at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:144)
> [java] ... 43 more
> [java] Root exception:
> [java] java.lang.NoClassDefFoundError: org/eclipse/swt/SWTError
> [java] at java.lang.Class.getDeclaredConstructors0(Native Method)
> [java] at
> java.lang.Class.privateGetDeclaredConstructors(Class.java:16 10)
> [java] at java.lang.Class.getConstructor0(Class.java:1922)
> [java] at java.lang.Class.newInstance0(Class.java:278)
> [java] at java.lang.Class.newInstance(Class.java:261)
> [java] at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:144)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:965)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:313)
> [java] at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:264)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:116)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
> [java] at
> org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(SingleSourcePackage.java:37)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:386)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
> [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> [java] at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302 )
> [java] at java.lang.ClassLoader.defineClass0(Native Method)
> [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(DefaultClassLoader.java:370)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClassLoader.java:233)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(DefaultClassLoader.java:343)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(DefaultClassLoader.java:235)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(AbstractClassLoader.java:183)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(EclipseClassLoader.java:141)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:122)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:389)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
> [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:275)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
> [java] at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1248)
> [java] at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:152)
> [java] at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:142)
> [java] at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:129)
> [java] at
> org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 48)
> [java] at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:222)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> [java] at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> [java] at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> [java] at java.lang.reflect.Method.invoke(Method.java:324)
> [java] at
> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
> [java] at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> [java] at org.eclipse.core.launcher.Main.run(Main.java:973)
> [java] at org.eclipse.core.launcher.Main.main(Main.java:948)
>
> [java] !ENTRY org.eclipse.osgi 2006-08-04 17:18:37.549
> [java] !MESSAGE Application error
> [java] !STACK 1
> [java] org.eclipse.core.runtime.CoreException[1]:
> java.lang.NoClassDefFoundError: org/eclipse/ui/testing/ITestHarness
> [java] at java.lang.ClassLoader.defineClass0(Native Method)
> [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(DefaultClassLoader.java:370)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClassLoader.java:233)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(DefaultClassLoader.java:343)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(DefaultClassLoader.java:235)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(AbstractClassLoader.java:183)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(EclipseClassLoader.java:141)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:122)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:389)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
> [java] at
> org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
> [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:275)
> [java] at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
> [java] at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1248)
> [java] at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:152)
> [java] at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:142)
> [java] at
> org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:129)
> [java] at
> org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 48)
> [java] at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:222)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
> [java] at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> [java] at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> [java] at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> [java] at java.lang.reflect.Method.invoke(Method.java:324)
> [java] at
> org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
> [java] at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> [java] at org.eclipse.core.launcher.Main.run(Main.java:973)
> [java] at org.eclipse.core.launcher.Main.main(Main.java:948)
>
> [java] !ENTRY org.eclipse.osgi 2006-08-04 17:18:37.674
> [java] !MESSAGE Bundle
> update@plugins/org.eclipse.core.resources.win32_3.1.0.jar [52] was not
> resolved.
>
> [java] !ENTRY org.eclipse.osgi 2006-08-04 17:18:37.706
> [java] !MESSAGE Bundle
> update@plugins/org.eclipse.swt.win32.win32.x86_3.1.1.jar [214] was not
> resolved.
>
> [java] !ENTRY org.eclipse.osgi 2006-08-04 17:18:37.706
> [java] !MESSAGE Bundle update@plugins/org.eclipse.ui.win32_3.1.0.jar
> [234] was not resolved.
>
> [java] !ENTRY org.eclipse.osgi 2006-08-04 17:18:37.721
> [java] !MESSAGE Bundle
> update@plugins/org.eclipse.update.core.win32_3.1.0.jar [240] was not
> resolved.
> [java] Java Result: 13
>
> cleanup:
>
> run:
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <project name="testsuite" default="run" basedir=".">
> <property name="eclipse-home" value="${basedir}/../../" />
> <property name="plugin-name" value="myplugin.tests"/>
> <property name="library-file"
> value="${eclipse-home}/plugins/org.eclipse.test/library.xml "/>
>
> <target name="init">
> <tstamp/>
> <delete>
> <fileset dir="${eclipse-home}" includes="org*.xml"/>
> </delete>
> </target>
>
> <target name="suite">
> <property name="myfolder" value="${eclipse-home}/myfolder"/>
> <delete dir="${myfolder}" quiet="true"/>
> <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
> <property name="data-dir" value="${myfolder}"/>
> <property name="plugin-name" value="${plugin-name}"/>
> <property name="classname" value="myplugin.tests.AllTests"/>
> </ant>
> </target>
>
> <target name="cleanup">
> </target>
>
> <target name="run" depends="init,suite,cleanup">
> <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
> <property name="includes" value="org*.xml"/>
> <property name="output-file" value="${plugin-name}.xml"/>
> </ant>
> </target>
>
> <!-- This target runs the performance test suites. -->
> <target name="performance">
> </target>
> </project>
>
>
>
>
>
Previous Topic:testing framework problems
Next Topic:How to add attachments (files) to a test execution log
Goto Forum:
  


Current Time: Wed Aug 27 17:22:56 EDT 2014

Powered by FUDForum. Page generated in 0.01780 seconds