[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] Good support for PDE in build systems anyone?
- From: "Alex Blewitt" <alex.blewitt@xxxxxxxxx>
- Date: Mon, 5 Jun 2006 21:38:12 +0100
- Delivered-to: firstname.lastname@example.org
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ofCHk31mGrR6kBM71HL/x+mc6cyQEuKVxrzPNN/0a4P6DIpi4fh2lqC357KD1pM1fv5Kpq+X70PNwxgxHEggo8CqPlwgkNbzBLCfzf1SZC9veiiinwmCsob6+CcvIQUaw2D/hi9BxOULmPbPwJ9pOROTBfTe/iKbgJh4ViAQw/I=
On 05/06/06, Andrew Niefer <aniefer@xxxxxxxxxx> wrote:
Niclas Hedhman wrote on 06/04/2006 11:52:33 PM:
> Also, how does PDE know what classpath to use for "unit testing" vs
Under Eclipse, the unit testing is generally under a separate project. So a
bundle A.test will depend on bundle A and there is no such thing as a
"testing run" as far as A is concerned. A is built the same for a testing
run as it is for a normal run.
It's possible to have a bundle that incorporates some test code, but
does not export it when doing a 'production' build. Quite a lot of the
time, it's easier to associate test code with source code in the same
bundle/module (or project, in Maven terms) instead of having an
uber-test bundle that tests everything in a feature (e.g. the way
Eclipse is tested). The bundle can be built with or without test code
incorporated (or attached as a fragment).
Another way is to have two separate bundles; and the testing bundle
can depend on the production bundle. However, that often doesn't have
access to certain internals that you may want to test.
I wrote a bundle tester that would scan a bundle for all the XxxTest
classes, and allowed out-of-container testing on those tests that
didn't need an Eclipse/OSGi framework up and running, but ran some
in-container tests that did need an Eclipse/OSGi framework. The
advantage was that a lot of the small unit tests were just exercising
Java functionality, rather than utilising Eclipse APIs, and therefore
many tests could be run without having to bounce an OSGi environment
all the time.
I wrote up my example code on
as well as making it availbale in the RCPApps stuff I demo'd at