Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[buckminster-dev] Re: Executing JUnit tests with headless Buckminster

Hi Achim,
I've been down the same path as you regarding this and made the same conclusions. This is something that needs to be fixed in the JDT and PDE plug-ins. I think timing wise it's good timing that you bring it up now. The 3.5.0/Galileo release is due in a couple of weeks and the code is more or less locked down at this point which means that most teams are now looking forward. What should be included in 3.6?

I see three major bullets for Buckminster:
1. Even deeper integration with P2
2. Unified efforts with the PDE build team
3. A good story around testing

The issues you bring up here fits very well.

Personally, I don't think it would matter much if it is your or I who files the bugzilla. The fact that a request comes from the community of users instead of the project team can sometimes be advantageous and I will of course back you up. If you offer to help, even better.

I'm CC'ing this mail to Chris Anizchyk and Andrew Niefer (they both work with PDE). Advice and hints from you guys on how to progress with this are very welcome.

Kind Regards,
Thomas Hallgren


Achim Demelt wrote:
Hi Thomas,

Over the weekend I have experimented with running JUnit tests from headless Buckminster. I wrote a new headless command that launches tests from within the workspace in a separate VM. On the positive side, everything went fine and I was able to run tests defined in the workspace. On the negative side, I basically duplicated code from JDT's JUnit plug-in.

I'd love to reuse jdt.junit code, but unfortunately the JDT team has chosen *not* to separate the JUnit launching part from the UI part. Installing a whole bunch of UI stuff into headless Buckminster didn't seem like a good idea to me. So I went for copying a stripped down version of the JUnit execution code because the actual amount of code needed was relatively small.

Then I started looking into PDE JUnit testing, and that's where things are beginning to get ugly. Again, PDE's JUnit launching code is happily coexisting with UI code in the same plug-in. Launching an equinox runtime to execute JUnit plug-in tests is not exactly a walk in the park, so I doubt that code duplication is a viable approach here.

Ultimately, I would want to be able to read JUnit launch configurations from a file and execute them in Buckminster headless. This way, the user can specify VM args, equinox configurations, etc. for his tests. But this requires Buckminster to understand all parameters of JDT's and PDE's launch configurations.

In my eyes, the only reasonable way for a solid JUnit integration in headless Buckminster would be to reuse JDT's and PDE's JUnit launching code. This would require the JDT and PDE teams to separate their core code from their UI code and put it into separate bundles. I guess there's no way this is going to happen if *I* file a bugzilla, even if I attach a patch.

Thomas, what's your view on this? Do you see alternatives? Would you be able to persuade the JDT/PDE teams to do such a refactoring?

Cheers,
 Achim




Back to the top