Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Troubles with "java.lang.NoClassDefFoundError: junit/framework/TestListener" in headless m
Troubles with "java.lang.NoClassDefFoundError: junit/framework/TestListener" in headless m [message #34738] Thu, 07 May 2009 09:15 Go to next message
Eclipse User
Originally posted by: samuel.judith.anyware-tech.com

Hi everybody,

I try to get my product working with swtbot headless.

My generated product contains org.junit3.8 and unhappily I has
systematically the following message:
Exception in thread "WorkbenchTestable" java.lang.NoClassDefFoundError:
junit/framework/TestListener
[java] at java.lang.ClassLoader.defineClass1(Native Method)
[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
[java] at
....
[java] at
org.eclipse.swtbot.eclipse.junit3.headless.EclipseTestRunner .createFormatter(Unknown
Source)
[java] at
org.eclipse.swtbot.eclipse.junit3.headless.EclipseTestRunner .createAndStoreFormatter(Unknown
Source)
[java] at
org.eclipse.swtbot.eclipse.junit3.headless.EclipseTestRunner .run(Unknown
Source)
[java] at
org.eclipse.swtbot.eclipse.junit3.headless.UITestApplication .runTests(Unknown
Source)
[java] at
org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Work benchTestable.java:68)
[java] at java.lang.Thread.run(Thread.java:619)

Does someone has an idea to give me please ?

Thanks much,
Samuel
Re: Troubles with "java.lang.NoClassDefFoundError: junit/framework/TestListener" [message #35030 is a reply to message #34738] Fri, 08 May 2009 01:00 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
What version of eclipse/swtbot are you using ? Did you delete the junit4
headless feature from the target eclipse ? You should only have the junit3
plugins from swtbot. http://wiki.eclipse.org/SWTBot/Ant talks about
headless builds, read the setup section carefully, also turning on
-consoleLog and -debug as part of the command line argument may provide
more information.

If all else fails, as a workaround: You can make your test plugins depend
on junit 4.x and use the junit4 headless runner while keeping your tests
the same. JUnit 3 headless framework has not changed at all since the last
time I used it so this will need some investigation.

-- Ketan

Samuel JUDITH wrote:

> Hi everybody,

> I try to get my product working with swtbot headless.

> My generated product contains org.junit3.8 and unhappily I has
> systematically the following message:
> Exception in thread "WorkbenchTestable" java.lang.NoClassDefFoundError:
> junit/framework/TestListener
> [java] at java.lang.ClassLoader.defineClass1(Native Method)
> [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> [java] at
> ....
> [java] at
>
org.eclipse.swtbot.eclipse.junit3.headless.EclipseTestRunner .createFormatter(Unknown
> Source)
> [java] at
>
org.eclipse.swtbot.eclipse.junit3.headless.EclipseTestRunner .createAndStoreFormatter(Unknown
> Source)
> [java] at
> org.eclipse.swtbot.eclipse.junit3.headless.EclipseTestRunner .run(Unknown
> Source)
> [java] at
>
org.eclipse.swtbot.eclipse.junit3.headless.UITestApplication .runTests(Unknown
> Source)
> [java] at
>
org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Work benchTestable.java:68)
> [java] at java.lang.Thread.run(Thread.java:619)

> Does someone has an idea to give me please ?

> Thanks much,
> Samuel
Re: Troubles with "java.lang.NoClassDefFoundError: junit/framework/TestListener" [message #35064 is a reply to message #35030] Fri, 08 May 2009 05:20 Go to previous messageGo to next message
Eclipse User
Originally posted by: samuel.judith.anyware-tech.com

Hi Ketan,

I use eclipse 3.4.2 and the following swtbot features are installed:
- org.eclipse.swtbot_2.0.0.204-dev
- org.eclipse.swtbot.eclipse_2.0.0.204-dev
- org.eclipse.swtbot.eclipse.test_2.0.0.204-dev

I have well deleted the junit4 headless plugins from the plugins directory.

I will test with junit4 and I will inform you.

Thanks a lot,
Samuel



Ketan Padegaonkar a écrit :
> What version of eclipse/swtbot are you using ? Did you delete the junit4
> headless feature from the target eclipse ? You should only have the
> junit3 plugins from swtbot. http://wiki.eclipse.org/SWTBot/Ant talks
> about headless builds, read the setup section carefully, also turning on
> -consoleLog and -debug as part of the command line argument may provide
> more information.
>
> If all else fails, as a workaround: You can make your test plugins
> depend on junit 4.x and use the junit4 headless runner while keeping
> your tests the same. JUnit 3 headless framework has not changed at all
> since the last time I used it so this will need some investigation.
>
> -- Ketan
>
> Samuel JUDITH wrote:
>
>> Hi everybody,
>
>> I try to get my product working with swtbot headless.
>
>> My generated product contains org.junit3.8 and unhappily I has
>> systematically the following message:
>> Exception in thread "WorkbenchTestable"
>> java.lang.NoClassDefFoundError: junit/framework/TestListener
>> [java] at java.lang.ClassLoader.defineClass1(Native Method)
>> [java] at
>> java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>> [java] at
>> ....
>> [java] at
> org.eclipse.swtbot.eclipse.junit3.headless.EclipseTestRunner .createFormatter(Unknown
>
>> Source)
>> [java] at
> org.eclipse.swtbot.eclipse.junit3.headless.EclipseTestRunner .createAndStoreFormatter(Unknown
>
>> Source)
>> [java] at
>> org.eclipse.swtbot.eclipse.junit3.headless.EclipseTestRunner .run(Unknown
>> Source)
>> [java] at
> org.eclipse.swtbot.eclipse.junit3.headless.UITestApplication .runTests(Unknown
>
>> Source)
>> [java] at
> org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Work benchTestable.java:68)
>
>> [java] at java.lang.Thread.run(Thread.java:619)
>
>> Does someone has an idea to give me please ?
>
>> Thanks much,
>> Samuel
>
Re: Troubles with "java.lang.NoClassDefFoundError: junit/framework/TestListener" in headle [message #551744 is a reply to message #34738] Mon, 09 August 2010 08:39 Go to previous messageGo to next message
Tilak Sharma is currently offline Tilak Sharma
Messages: 48
Registered: July 2009
Member
I am facing the same exception: java.lang.NoClassDefFoundError: junit/framework/TestListener. I am using Eclipse 3.5.

Please help me resolve this issue, as I am stuck badly.

My test plugin depends on:
org.eclipse.ui,
org.eclipse.core.runtime,
org.junit4;bundle-version="4.5.0",
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.swtbot.eclipse.core,
org.eclipse.swtbot.junit4_x,
org.hamcrest,
org.apache.log4j,
org.eclipse.swtbot.swt.finder,
org.eclipse.swtbot.eclipse.finder,
org.eclipse.core.resources,
org.eclipse.ant.core,
org.eclipse.core.runtime.compatibility,
org.eclipse.swtbot.eclipse.junit4.headless;bundle-version="2.0.0 "


Complete stack trace is :
[java] Exception in thread "WorkbenchTestable" java.lang.NoClassDefFoundError: junit/framework/TestListener
[java] at java.lang.ClassLoader.defineClass1(Native Method)
[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
[java] at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:183)
[java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:576)
[java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:546)
[java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:477)
[java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:465)
[java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:445)
[java] at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:211)
[java] at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:376)
[java] at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:452)
[java] at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:405)
[java] at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:393)
[java] at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:105)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
[java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
[java] at java.lang.ClassLoader.defineClass1(Native Method)
[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
[java] at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:183)
[java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:576)
[java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:546)
[java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:477)
[java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:465)
[java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:445)
[java] at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:211)
[java] at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:376)
[java] at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadCla ss(SingleSourcePackage.java:33)
[java] at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:440)
[java] at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:405)
[java] at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:393)
[java] at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:105)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
[java] at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner .createFormatter(EclipseTestRunner.java:455)
[java] at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner .createAndStoreFormatter(EclipseTestRunner.java:437)
[java] at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner .run(EclipseTestRunner.java:179)
[java] at org.eclipse.swtbot.eclipse.junit4.headless.UITestApplication .runTests(UITestApplication.java:115)
[java] at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Work benchTestable.java:71)
[java] at java.lang.Thread.run(Thread.java:595)
Re: Troubles with "java.lang.NoClassDefFoundError: junit/framework/TestListener" in headle [message #551788 is a reply to message #551744] Mon, 09 August 2010 10:23 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
Since this pops up very frequently, I've documented this here:

http://goo.gl/e4Br

Please go through the instructions and let us know about your progress.

--
Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot

On 8/9/10 5:39 AM, Tilak wrote:
> I am facing the same exception: java.lang.NoClassDefFoundError:
> junit/framework/TestListener. I am using Eclipse 3.5.
> Please help me resolve this issue, as I am stuck badly.
>
> My test plugin depends on:
> org.eclipse.ui,
> org.eclipse.core.runtime,
> org.junit4;bundle-version="4.5.0",
> org.eclipse.ui,
> org.eclipse.core.runtime,
> org.eclipse.swtbot.eclipse.core,
> org.eclipse.swtbot.junit4_x,
> org.hamcrest,
> org.apache.log4j,
> org.eclipse.swtbot.swt.finder,
> org.eclipse.swtbot.eclipse.finder,
> org.eclipse.core.resources,
> org.eclipse.ant.core,
> org.eclipse.core.runtime.compatibility,
> org.eclipse.swtbot.eclipse.junit4.headless;bundle-version="2.0.0 "
>
>
> Complete stack trace is : [java] Exception in thread "WorkbenchTestable"
> java.lang.NoClassDefFoundError: junit/framework/TestListener
> [java] at java.lang.ClassLoader.defineClass1(Native Method)
> [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> [java] at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def
> ineClass(DefaultClassLoader.java:183)
> [java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC
> lass(ClasspathManager.java:576)
> [java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla
> ssImpl(ClasspathManager.java:546)
> [java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc
> alClassImpl(ClasspathManager.java:477)
> [java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc
> alClass_LockClassLoader(ClasspathManager.java:465)
> [java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc
> alClass(ClasspathManager.java:445)
> [java] at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin
> dLocalClass(DefaultClassLoader.java:211)
> [java] at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass
> (BundleLoader.java:376)
> [java] at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter
> nal(BundleLoader.java:452)
> [java] at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund
> leLoader.java:405)
> [java] at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund
> leLoader.java:393)
> [java] at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa
> dClass(DefaultClassLoader.java:105)
> [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> [java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
> [java] at java.lang.ClassLoader.defineClass1(Native Method)
> [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> [java] at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def
> ineClass(DefaultClassLoader.java:183)
> [java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC
> lass(ClasspathManager.java:576)
> [java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla
> ssImpl(ClasspathManager.java:546)
> [java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc
> alClassImpl(ClasspathManager.java:477)
> [java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc
> alClass_LockClassLoader(ClasspathManager.java:465)
> [java] at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc
> alClass(ClasspathManager.java:445)
> [java] at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin
> dLocalClass(DefaultClassLoader.java:211)
> [java] at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass
> (BundleLoader.java:376)
> [java] at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadCla
> ss(SingleSourcePackage.java:33)
> [java] at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter
> nal(BundleLoader.java:440)
> [java] at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund
> leLoader.java:405)
> [java] at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund
> leLoader.java:393)
> [java] at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa
> dClass(DefaultClassLoader.java:105)
> [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> [java] at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner
> .createFormatter(EclipseTestRunner.java:455)
> [java] at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner
> .createAndStoreFormatter(EclipseTestRunner.java:437)
> [java] at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner
> .run(EclipseTestRunner.java:179)
> [java] at org.eclipse.swtbot.eclipse.junit4.headless.UITestApplication
> .runTests(UITestApplication.java:115)
> [java] at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Work
> benchTestable.java:71)
> [java] at java.lang.Thread.run(Thread.java:595)
Re: Troubles with "java.lang.NoClassDefFoundError: junit/framework/TestListener" in headle [message #551924 is a reply to message #551744] Tue, 10 August 2010 04:10 Go to previous messageGo to next message
Tilak Sharma is currently offline Tilak Sharma
Messages: 48
Registered: July 2009
Member
Hi Ketan,

Thanks for the quick reply! I checked all the steps given in the wiki.

Everything was as per the trouble shooting tips mentioned there, except : I have both org.eclipse.jdt.junit4.runtime_1.1.0.v20090513-2000.jar and org.junit4_4.5.0.v20090423 in my eclipse plugins directory. Removing the jdt junit runtime plugin also doesn't help.

I face the above exception only when I include the formatter:
formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,${eclipse-home}/${classname}.xml
formatter=org.apache.tools.ant.taskdefs.optional.junit.Plain JUnitResultFormatter.

I am able to launch workbench and see my tests running if I dont have this formatter inside the library xml. It is just that it generates an empty report.

Why doesn't the formatter gets loaded when the org.eclipse.equinox.launcher is loaded?

Below is my ant script in library.xml to launch the workbench:
<java fork="true" dir="." timeout="${timeout}" jvm="${jvm}" logError="true" classname="org.eclipse.core.launcher.Main" output="${junit-report-output}/${classname}.txt">
<classpath>
<fileset dir="${eclipse-home}/plugins">
<include name="org.eclipse.equinox.launcher_*.jar" />
<!-- <include name="junit.jar" />
<include name="org.hamcrest.core_*.jar"/> -->
</fileset>
</classpath>
<arg line="${launcher-arg-line}" />
<jvmarg line="${jvm-arg-line}" />
<sysproperty key="PLUGIN_PATH" value="${plugin-path}" />
</java>

I tried passing the junit.jar to the classpath as well, but in vain.

Please let me know how to avoid the exception and generate report successfully.

Thanks in anticipation,
Tilak
Re: Troubles with "java.lang.NoClassDefFoundError: junit/framework/TestListener" in headle [message #552053 is a reply to message #551924] Tue, 10 August 2010 11:52 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
Unfortunately you're in a grey area where it's hard for anyone to
diagnose any issue for you over email.

I just put another wiki page together for you to diagnose what could be
wrong http://wiki.eclipse.org/SWTBot/OSGi_Console

Let us know how it goes.

--
Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot


On 8/10/10 1:10 AM, Tilak wrote:
> Hi Ketan,
>
> Thanks for the quick reply! I checked all the steps given in the wiki.
> Everything was as per the trouble shooting tips mentioned there, except
> : I have both org.eclipse.jdt.junit4.runtime_1.1.0.v20090513-2000.jar
> and org.junit4_4.5.0.v20090423 in my eclipse plugins directory. Removing
> the jdt junit runtime plugin also doesn't help.
>
> I face the above exception only when I include the formatter:
> formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU
> nitResultFormatter,${eclipse-home}/${classname}.xml
> formatter=org.apache.tools.ant.taskdefs.optional.junit.Plain
> JUnitResultFormatter.
>
> I am able to launch workbench and see my tests running if I dont have
> this formatter inside the library xml. It is just that it generates an
> empty report.
>
> Why doesn't the formatter gets loaded when the
> org.eclipse.equinox.launcher is loaded?
>
> Below is my ant script in library.xml to launch the workbench:
> <java fork="true" dir="." timeout="${timeout}" jvm="${jvm}"
> logError="true" classname="org.eclipse.core.launcher.Main"
> output="${junit-report-output}/${classname}.txt">
> <classpath>
> <fileset dir="${eclipse-home}/plugins">
> <include name="org.eclipse.equinox.launcher_*.jar" />
> <!-- <include name="junit.jar" />
> <include name="org.hamcrest.core_*.jar"/> -->
> </fileset>
> </classpath>
> <arg line="${launcher-arg-line}" />
> <jvmarg line="${jvm-arg-line}" />
> <sysproperty key="PLUGIN_PATH" value="${plugin-path}" />
> </java>
>
> I tried passing the junit.jar to the classpath as well, but in vain.
>
> Please let me know how to avoid the exception and generate report
> successfully.
>
> Thanks in anticipation,
> Tilak
Re: Troubles with "java.lang.NoClassDefFoundError: junit/framework/TestListener" in headle [message #552227 is a reply to message #552053] Wed, 11 August 2010 07:17 Go to previous message
Tilak Sharma is currently offline Tilak Sharma
Messages: 48
Registered: July 2009
Member
Hi Ketan,

After eclipse is launched through ant, in the osgi prompt I gave the following commands:

osgi> ss org.eclipse.swtbot

Framework is launched.

id State Bundle
412 RESOLVED org.eclipse.swtbot.ant.optional.junit4_2.0.0.595-dev-e35
Master=114
413 RESOLVED org.eclipse.swtbot.eclipse.core_2.0.0.595-dev-e35
414 RESOLVED org.eclipse.swtbot.eclipse.finder_2.0.0.595-dev-e35
415 RESOLVED org.eclipse.swtbot.eclipse.gef.finder_2.0.0.595-dev-e35
416 RESOLVED org.eclipse.swtbot.eclipse.junit4.headless_2.0.0.595-dev-e35
417 RESOLVED org.eclipse.swtbot.eclipse.spy_2.0.0.595-dev-e35
418 RESOLVED org.eclipse.swtbot.eclipse.ui_2.0.0.595-dev-e35
419 RESOLVED org.eclipse.swtbot.go_2.0.0.595-dev-e35
420 RESOLVED org.eclipse.swtbot.junit4_x_2.0.0.595-dev-e35
421 RESOLVED org.eclipse.swtbot.swt.finder_2.0.0.595-dev-e35

osgi> ProviderTracker: New service detected...
ProviderTracker: Added service org.eclipse.persistence.jpa.osgi.PersistenceProviderOSGi


osgi> ss ant

Framework is launched.

id State Bundle
114 ACTIVE org.apache.ant_1.7.1.v20090120-1145
Fragments=412
133 ACTIVE org.eclipse.ant.core_3.2.100.v20090520
134 RESOLVED org.eclipse.ant.ui_3.4.1.v20090901_r351
180 ACTIVE org.eclipse.emf.ant_2.4.0.v200906151043
402 ACTIVE org.eclipse.persistence.antlr_1.1.2.v20090612-r4475
412 RESOLVED org.eclipse.swtbot.ant.optional.junit4_2.0.0.595-dev-e35
Master=114

osgi> diag org.eclipse.swtbot.swt.finder
reference:file:/C:/SonicInstall8.1_142/Workbench8.1/eclipse/ plugins/org.eclipse.swtbot.swt.finder_2.0.0.595-dev-e35.jar [421]
No unresolved constraints.


My scenario is:

Our product has lot of eclipse plugins, out of which I have written a test plugin for one of them.

From the ant script I pass the eclipse-home = <eclipse under product>.

I made sure that this eclipse has all the required swtbot plugins and my new test plugin.

Now when run my ant script for swtbot with the formatter, I see the exception: "Exception in thread "WorkbenchTestable" java.lang.NoClassDefFoundError: junit/framework/TestListener".

I saw the code inside EclipseTestRunner:
EclipseTestRunner.class.getClassLoader().loadClass(classname ); where the classname is the formatter's classname.

How to have the junit.framework.TestListener to be loaded in the same class loader as EclipseTestRunner?

As I have mentioned earlier, I am able to run the swtbot tests through ant. But, once I give the formatter, I see this exception.

Please help me out as I am stuck badly.

Thanks in anticipation,
Tilak
Previous Topic:SWTBot and active Eclipse window
Next Topic:Contract Job Offered - SWTBOT Tester/Developer
Goto Forum:
  


Current Time: Mon Jul 28 14:38:25 EDT 2014

Powered by FUDForum. Page generated in 0.02740 seconds