Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Eclipse JUnit Plug-in Test
Eclipse JUnit Plug-in Test [message #65801] Fri, 26 June 2009 13:28 Go to next message
Flavio Donze is currently offline Flavio DonzeFriend
Messages: 211
Registered: July 2009
Location: Switzerland
Senior Member
Hello pde team

Right now I'm creating a JUnit Plug-in Lanuch for my server environment.
Doing that, I noticed a few things.

First, since I want to test a server application I don't need any UI
plug-ins. The org.eclipse.test plug-in, actually the UITestApplication
class has dependencies on org.eclipse.ui.ide.application and
org.eclipse.ui. They then have a whole dependency tree on other UI
plug-ins.
This does not affect my tests I just think it's kind of ugly.
So I was wondering if maybe the plug-in should be split up in
org.eclipse.test and org.eclipse.test.ui? What do you think of this?

Second, the launch seems to ignore my start levels if I don't set the
"Auto-Start" to "true". Even though the "Default Auto-Start" option is set
to "true".
Launching in Headless Mode, Test runner JUnit 3.
Is this an intended behavior or should I file a bug report?

cheers
flavio


Prozessmanagement und Qualitätsmanagement Software QMS/IMS
https://www.scodi.ch
Re: Eclipse JUnit Plug-in Test [message #66497 is a reply to message #65801] Thu, 02 July 2009 14:55 Go to previous messageGo to next message
Flavio Donze is currently offline Flavio DonzeFriend
Messages: 211
Registered: July 2009
Location: Switzerland
Senior Member
Is this the wrong newsgroup for this issue or are most of the pde people
on holiday since Galileo was released :-).


Prozessmanagement und Qualitätsmanagement Software QMS/IMS
https://www.scodi.ch
Re: Eclipse JUnit Plug-in Test [message #480121 is a reply to message #65801] Thu, 13 August 2009 23:29 Go to previous messageGo to next message
Benjamin Wolff is currently offline Benjamin WolffFriend
Messages: 136
Registered: July 2009
Senior Member
hi,

an answer from the PDE team would be really intereseting indeed Smile)

greetings,
ben

[Updated on: Tue, 25 August 2009 14:22]

Report message to a moderator

Re: Eclipse JUnit Plug-in Test [message #480123 is a reply to message #66497] Thu, 13 August 2009 23:25 Go to previous messageGo to next message
Benjamin Wolff is currently offline Benjamin WolffFriend
Messages: 136
Registered: July 2009
Senior Member
hi,

an answer to this by the PDE team would be very interesting indeed :P

greetings,
-ben

[Updated on: Tue, 25 August 2009 14:22]

Report message to a moderator

Re: Eclipse JUnit Plug-in Test [message #485416 is a reply to message #480121] Fri, 11 September 2009 16:29 Go to previous messageGo to next message
Flavio Donze is currently offline Flavio DonzeFriend
Messages: 211
Registered: July 2009
Location: Switzerland
Senior Member
Hello,

Nobody has an answer to my questions?

greets
flavio


Prozessmanagement und Qualitätsmanagement Software QMS/IMS
https://www.scodi.ch
Re: Eclipse JUnit Plug-in Test [message #486433 is a reply to message #65801] Thu, 17 September 2009 15:44 Go to previous messageGo to next message
Curtis Windatt is currently offline Curtis WindattFriend
Messages: 166
Registered: July 2009
Senior Member
1) All of the PDE launching code is part of UI currently. There is work being done to improve this, but is coming slowly:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278845
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278844

2) Depending on what build you are using, your problem may have been fixed, see:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=285727
Re: Eclipse JUnit Plug-in Test [message #528277 is a reply to message #65801] Mon, 19 April 2010 22:12 Go to previous messageGo to next message
Flavio Donze is currently offline Flavio DonzeFriend
Messages: 211
Registered: July 2009
Location: Switzerland
Senior Member
Hey Curtis

I just took a look at our JUnit Plug-in Test Launch and I noticed that I still have a lot of Eclipse UI bundles in the launch. I'm testing a osgi server environment and don't need an eclipse workbench. So I decided to remove those dependencies.

Now I end up with a Validation error "org.eclipse.ui.ide.workbench is missing". If I remove all the bundles I still end up with this message.

You linked me to the following bugs:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278845
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278844
which both are resolved since 2009. I'm using Eclipse 3.6M6. Are the changes not in this release or what's up with this dependency?
Is this a separate issue, should I file a Bug?

BTW I'm using [No Application] Headless Mode, JUnit 4 and "Run in UI thread" is deselected.

greets
Flavio


Prozessmanagement und Qualitätsmanagement Software QMS/IMS
https://www.scodi.ch
Re: Eclipse JUnit Plug-in Test [message #528489 is a reply to message #528277] Tue, 20 April 2010 17:15 Go to previous messageGo to next message
Curtis Windatt is currently offline Curtis WindattFriend
Messages: 166
Registered: July 2009
Senior Member
Trying the following steps I don't see any problems:

1) Create a new test plug-in with a test case that requires org.eclipse.debug.core
2) Create a new JUnit launch config
3) On the plug-ins tab, change to selected plug-ins only, deselect all, check org.eclipse.debug.core, select required.
4) Hit the validate button
No problems are detected, no ui plug-ins are required.

I don't understand your steps well enough to reproduce. If you believe the behaviour is wrong, feel free to file a bug against PDE UI with the simplest steps you can reproduce with.
Re: Eclipse JUnit Plug-in Test [message #528505 is a reply to message #528489] Tue, 20 April 2010 18:24 Go to previous messageGo to next message
Flavio Donze is currently offline Flavio DonzeFriend
Messages: 211
Registered: July 2009
Location: Switzerland
Senior Member
hey Curtis

Tried your steps. Yes there are no Validation error but all the ui plugins are selected as well.

If you choose "Headless Mode" as application.
And deselect all bundles, you get the mentioned validation error.

I'm just wondering, shouldn't that be solved after the two bugs were fixed?

greets
flavio


Prozessmanagement und Qualitätsmanagement Software QMS/IMS
https://www.scodi.ch
Re: Eclipse JUnit Plug-in Test [message #528521 is a reply to message #528277] Tue, 20 April 2010 19:30 Go to previous messageGo to next message
Curtis Windatt is currently offline Curtis WindattFriend
Messages: 166
Registered: July 2009
Senior Member
It looks like there is a bug here. If you use an application that does not require the workbench (such as the core ant runner), the workbench is not required by validate. However, using Headless Application, the workbench is required (which is a bug).

I have filed a bug report:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=309860
Re: Eclipse JUnit Plug-in Test [message #534176 is a reply to message #528521] Tue, 18 May 2010 10:01 Go to previous messageGo to next message
Flavio Donze is currently offline Flavio DonzeFriend
Messages: 211
Registered: July 2009
Location: Switzerland
Senior Member
Hey Curtis

I updated to the latest Helios Milestone release. The "required" dependency on "org.eclipse.ui.ide.workbench" is gone.

I removed all the UI bundles and launched the JUnit Test. Now I don't get any feedback in the JUnit Result View?

So I did a simple test (the steps that you describe below) and get the following exception:

Caused by: java.lang.NoClassDefFoundError: org/eclipse/ui/testing/ITestHarness
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:580)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:469)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:580)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:469)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(Bund leLoader.java:338)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:232)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1192)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:174)
... 16 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.ui.testing.ITestHarness
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
... 51 more

What do you think about it? Bug?

greets
Flavio


Prozessmanagement und Qualitätsmanagement Software QMS/IMS
https://www.scodi.ch
Re: Eclipse JUnit Plug-in Test [message #598907 is a reply to message #65801] Thu, 02 July 2009 14:55 Go to previous messageGo to next message
Flavio Donze is currently offline Flavio DonzeFriend
Messages: 211
Registered: July 2009
Location: Switzerland
Senior Member
Is this the wrong newsgroup for this issue or are most of the pde people
on holiday since Galileo was released :-).


Prozessmanagement und Qualitätsmanagement Software QMS/IMS
https://www.scodi.ch
Re: Eclipse JUnit Plug-in Test [message #600674 is a reply to message #66497] Thu, 13 August 2009 23:25 Go to previous messageGo to next message
Benjamin Wolff is currently offline Benjamin WolffFriend
Messages: 136
Registered: July 2009
Senior Member
hi,

an answer to this by the PDE team would be very interesting indeed :P

greetings,
-ben
Re: Eclipse JUnit Plug-in Test [message #600679 is a reply to message #65801] Thu, 13 August 2009 23:29 Go to previous messageGo to next message
Benjamin Wolff is currently offline Benjamin WolffFriend
Messages: 136
Registered: July 2009
Senior Member
hi,

an answer from the PDE team would be really intereseting indeed :))

greetings,
ben
Re: Eclipse JUnit Plug-in Test [message #601535 is a reply to message #600679] Fri, 11 September 2009 16:29 Go to previous messageGo to next message
Flavio Donze is currently offline Flavio DonzeFriend
Messages: 211
Registered: July 2009
Location: Switzerland
Senior Member
Hello,

Nobody has an answer to my questions?

greets
flavio


Prozessmanagement und Qualitätsmanagement Software QMS/IMS
https://www.scodi.ch
Re: Eclipse JUnit Plug-in Test [message #601666 is a reply to message #65801] Thu, 17 September 2009 15:44 Go to previous messageGo to next message
Curtis Windatt is currently offline Curtis WindattFriend
Messages: 166
Registered: July 2009
Senior Member
1) All of the PDE launching code is part of UI currently. There is work being done to improve this, but is coming slowly:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278845
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278844

2) Depending on what build you are using, your problem may have been fixed, see:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=285727
Re: Eclipse JUnit Plug-in Test [message #605625 is a reply to message #65801] Mon, 19 April 2010 22:12 Go to previous messageGo to next message
Flavio Donze is currently offline Flavio DonzeFriend
Messages: 211
Registered: July 2009
Location: Switzerland
Senior Member
Hey Curtis

I just took a look at our JUnit Plug-in Test Launch and I noticed that I still have a lot of Eclipse UI bundles in the launch. I'm testing a osgi server environment and don't need an eclipse workbench. So I decided to remove those dependencies.

Now I end up with a Validation error "org.eclipse.ui.ide.workbench is missing". If I remove all the bundles I still end up with this message.

You linked me to the following bugs:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278845
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278844
which both are resolved since 2009. I'm using Eclipse 3.6M6. Are the changes not in this release or what's up with this dependency?
Is this a separate issue, should I file a Bug?

BTW I'm using [No Application] Headless Mode, JUnit 4 and "Run in UI thread" is deselected.

greets
Flavio


Prozessmanagement und Qualitätsmanagement Software QMS/IMS
https://www.scodi.ch
Re: Eclipse JUnit Plug-in Test [message #605634 is a reply to message #528277] Tue, 20 April 2010 17:15 Go to previous messageGo to next message
Curtis Windatt is currently offline Curtis WindattFriend
Messages: 166
Registered: July 2009
Senior Member
Trying the following steps I don't see any problems:

1) Create a new test plug-in with a test case that requires org.eclipse.debug.core
2) Create a new JUnit launch config
3) On the plug-ins tab, change to selected plug-ins only, deselect all, check org.eclipse.debug.core, select required.
4) Hit the validate button
No problems are detected, no ui plug-ins are required.

I don't understand your steps well enough to reproduce. If you believe the behaviour is wrong, feel free to file a bug against PDE UI with the simplest steps you can reproduce with.
Re: Eclipse JUnit Plug-in Test [message #605639 is a reply to message #605634] Tue, 20 April 2010 18:24 Go to previous messageGo to next message
Flavio Donze is currently offline Flavio DonzeFriend
Messages: 211
Registered: July 2009
Location: Switzerland
Senior Member
hey Curtis

Tried your steps. Yes there are no Validation error but all the ui plugins are selected as well.

If you choose "Headless Mode" as application.
And deselect all bundles, you get the mentioned validation error.

I'm just wondering, shouldn't that be solved after the two bugs were fixed?

greets
flavio


Prozessmanagement und Qualitätsmanagement Software QMS/IMS
https://www.scodi.ch
Re: Eclipse JUnit Plug-in Test [message #605641 is a reply to message #528277] Tue, 20 April 2010 19:30 Go to previous messageGo to next message
Curtis Windatt is currently offline Curtis WindattFriend
Messages: 166
Registered: July 2009
Senior Member
It looks like there is a bug here. If you use an application that does not require the workbench (such as the core ant runner), the workbench is not required by validate. However, using Headless Application, the workbench is required (which is a bug).

I have filed a bug report:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=309860
Re: Eclipse JUnit Plug-in Test [message #605810 is a reply to message #528521] Tue, 18 May 2010 10:01 Go to previous message
Flavio Donze is currently offline Flavio DonzeFriend
Messages: 211
Registered: July 2009
Location: Switzerland
Senior Member
Hey Curtis

I updated to the latest Helios Milestone release. The "required" dependency on "org.eclipse.ui.ide.workbench" is gone.

I removed all the UI bundles and launched the JUnit Test. Now I don't get any feedback in the JUnit Result View?

So I did a simple test (the steps that you describe below) and get the following exception:

Caused by: java.lang.NoClassDefFoundError: org/eclipse/ui/testing/ITestHarness
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:580)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:469)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:580)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:469)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(Bund leLoader.java:338)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:232)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1192)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:174)
... 16 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.ui.testing.ITestHarness
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
... 51 more

What do you think about it? Bug?

greets
Flavio


Prozessmanagement und Qualitätsmanagement Software QMS/IMS
https://www.scodi.ch
Previous Topic:Javadoc attachment, org.eclipse.pde.core.javadoc, and zip
Next Topic:'Platform filter did not match' warning - what is it good for?
Goto Forum:
  


Current Time: Thu Apr 18 22:39:17 GMT 2024

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

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

Back to the top