|PDE Junit Tests with Buckminster for a simple RCP [message #545787]
||Fri, 09 July 2010 07:05
| Philipp Nanz
Registered: February 2010
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 #545825 is a reply to message #545819]
||Fri, 09 July 2010 10:05
| Achim Demelt
Registered: July 2009
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.
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
> 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
Powered by FUDForum
. Page generated in 0.02552 seconds