Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » PDE Junit Tests with Buckminster for a simple RCP(How to get the target platform right)
PDE Junit Tests with Buckminster for a simple RCP [message #545787] Fri, 09 July 2010 07:05 Go to next message
Philipp Nanz is currently offline Philipp NanzFriend
Messages: 46
Registered: February 2010
Member
Just a heads-up for everyone who wants to get his RCP build augmented with Junit Plugin-Tests.

I haven't seen this documented anywhere but there is a feature for that purpose that should be added to the target platform (and its much better than messing around with the JUnit bundles directly because you get loads of problems):

It's called org.eclipse.pde.junit.runtime.addon and can be found in the Helios update site


  • add that as an included feature to your site.p2 feature
  • create an import cquery/mspec for this feature
  • call the mspec during the target platform materialization in hudson


Now your JUnit command should work.
Re: PDE Junit Tests with Buckminster for a simple RCP [message #545809 is a reply to message #545787] Fri, 09 July 2010 08:44 Go to previous messageGo to next message
Achim Demelt is currently offline Achim DemeltFriend
Messages: 160
Registered: July 2009
Senior Member
Philipp,

Thanks for sharing that information. Can you elaborate why you need this
feature and why your tests didn't run without it? As I understand it, this
feature contains a couple of runtime bundles that PDE adds to the Equinox
environment when running the tests. If these bundles are not contained in
the target platform, PDE has a fallback mechanism to look them up in the
host, i.e. the Buckminster headless installation. We do, however, ship these
bundles in our Bucky features, so I would have expected the tests to run
even without the additional org.eclipse.pde.junit.runtime.addon in your TP.

Cheers,
Achim


Philipp Nanz wrote:

> Just a heads-up for everyone who wants to get his RCP build augmented with
> Junit Plugin-Tests.
>
> I haven't seen this documented anywhere but there is a feature for that
> purpose that should be added to the target platform (and its much better
> than messing around with the JUnit bundles directly because you get loads
> of problems):
>
> It's called org.eclipse.pde.junit.runtime.addon and can be found in the
> Helios update site
>
>
> add that as an included feature to your site.p2 feature
> create an import cquery/mspec for this feature
> call the mspec during the target platform materialization in hudson
>
>
> Now your JUnit command should work.
Re: PDE Junit Tests with Buckminster for a simple RCP [message #545819 is a reply to message #545787] Fri, 09 July 2010 09:40 Go to previous messageGo to next message
Philipp Nanz is currently offline Philipp NanzFriend
Messages: 46
Registered: February 2010
Member
Hi Achim,

as far as I remember from the top of my head, I started without any Junit stuff in the Hudson target platform.

That gave me NoClassDefFound Errors or something like that on build, with the tests not compiling (makes sense I guess, as again the target platform didn't know anything about JUnit).

Then I tried resolving custom bundles in there, i.e. Junit from Spring EBR etc.

Build suceeded then (the tests compiled), but the Junit command returned immediately with "no tests to run" or something along those lines.

Then I discovered that feature being mentioned in some Eclipse bugzilla entry, and it fixed my problems Smile

Not sure if I'm overlooking something here, but as it seems to me you really need Junit in your target platform for it to work - and apparently it needs to be exactly the one used in PDE
Re: PDE Junit Tests with Buckminster for a simple RCP [message #545825 is a reply to message #545819] Fri, 09 July 2010 10:05 Go to previous message
Achim Demelt is currently offline Achim DemeltFriend
Messages: 160
Registered: July 2009
Senior Member
Hi Philipp,

Yes, you do need JUnit in your TP for compiling the tests. Maybe the problem
was that you used JUnit from the Spring EBR. The JDT/PDE JUnit runtime
requires a bundle named "org.junit" in version 4.7.0 or higher. If that
couldn't be resolved, you'll end up with that "no tests to run" error.

If you have some time to spare, I'd appreciate if you can make another test
and include the org.junit bundles from Helios to your TP instead of the
..addon feature. My guess is that everything will run just fine, then.

Cheers,
Achim


Philipp Nanz wrote:

> Hi Achim,
>
> as far as I remember from the top of my head, I started without any Junit
> stuff in the Hudson target platform.
>
> That gave me NoClassDefFound Errors or something like that on build, with
> the tests not compiling (makes sense I guess, as again the target platform
> didn't know anything about JUnit).
>
> Then I tried resolving custom bundles in there, i.e. Junit from Spring EBR
> etc.
>
> Build suceeded then (the tests compiled), but the Junit command returned
> immediately with "no tests to run" or something along those lines.
>
> Then I discovered that feature being mentioned in some Eclipse bugzilla
> entry, and it fixed my problems :)
>
> Not sure if I'm overlooking something here, but as it seems to me you
> really need Junit in your target platform for it to work - and apparently
> it needs to be exactly the one used in PDE
Previous Topic:Strange resolution for SDK bundles
Next Topic:No component named org.eclipse.equinox.launcher.motif.hpux.PA_RISC
Goto Forum:
  


Current Time: Fri Apr 19 07:24:47 GMT 2024

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

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

Back to the top