[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[equinox-dev] Weaving into JUnit Plug-in Test with Equinox Aspects?
|
Hello,
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 weaving hook.
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 that here?).
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!
Thanks!
Yang