[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] Weaving into JUnit Plug-in Test with Equinox Aspects?
- From: Heiko Seeberger <heiko.reg@xxxxxxxxxxxxx>
- Date: Wed, 17 Dec 2008 16:08:04 +0100
- Delivered-to: email@example.com
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=LB7IheD5wMkbLyj3cRJICVEAsYPG1E3dVyea5GHmbOPrHbA1QTtA5whBYbCe1CH34+ V/sB5vkxcrXwRKyNcVCpC/oJW3K9Ip8MPQgOemca7yIQFcua1Kjuk1GvmZwY+HadMdyC 840EY4y9HC/8mR/DE04lAUq9oF3ujXbttiqxE=
Are you using a special config.ini file? Or did you just keep the
generated one which is selected by default (I think it is the sessings
tab of the run config)?
In order to set up Equinox Aspects properly you have start several
bundles and - of course - do that in time (weaving has to occour
before the test cases are executed). This is easy done with an OSGi
Framework run configuration where you have a Budles tab where you can
control all that stuff. But in case you are using an Eclipse
Application run configuration or a JUnit Plug-in run configuration you
have to specify all that in a handmade config.ini file.
Please take a look at the CVS. In the test subdirectory you will find
some test projects which make use of such a config.ini.
P.S.: Are some PDE guys listening? Would it be possible to change the
Eclipse Application and JUnit Plug-in run configuration dialogs to
have a full featured Bundles tab instead of that minimalistic Plug-ins
On 17.12.2008, at 15:57, Meyer, Yang wrote:
I have two bundles, "….tracking" and "….tracking.aspects", which are
closely modelled after the Equinox Aspects quickstart demo with its
two bundles "hello" and "hello.aspects". I defined a class
OTTrackingTest in the "tracking" bundle with a method testFoo(),
which I explicitly invoke in the bundle's Activator.start(…) method.
Everything works fine, and my advice is woven in properly.
Now I want JUnit to run all tests in my OTTrackingTest class. So I
made it a subclass of TestCase and created a JUnit Plug-in Test
launch configuration for it. To the launch config I added the
necessary plug-ins and the VM argument telling Equinox about our
Running it indeed runs the tests and shows the progress/results in
the JUnit view -- but no weaving is performed!
I thought this might be because the
"org.eclipse.equinox.weaving.aspectj" bundle is started/activated
too late, so I tried manually starting it from inside my "tracking"
bundle's Activator. But this doesn't work (I guess it's too late for
Does anybody have an idea what I am doing wrong? Or is there some
inherent limitation that makes it impossible to weave aspects into
JUnit Plug-in Tests?
I've been trying to sort it out for almost a day now, and it's
pretty much driving me nuts :-) I'd be very grateful for any
suggestions or pointers!
equinox-dev mailing list