On Jan 12, 2012, at 1:38 PM, Andrew Lindesay wrote:

> Hello;
> 
> A colleague and I are trying something at the moment; trying to launch a WOA 
> from a thread within a JUnit test running out of Eclipse.
> 
> We had some problems with the runtime not finding the main bundle (of course) 
> and added the .woa in the "${workspacehome}/build" directory. The problem is 
> that now seems to be not finding components' classes which are clearly in;
> 
> ${workspacehome}/build/XYZ.woa/Contents/Resources/Java/...
> 
> We're launching the WOA with;
> 
> XYZApplication.main(args);
> 
> Has anybody tried this before? :)
> 
> Regards;
> 
> -- 
> Andrew Lindesay

Wow. And I thought I had tried some weird things. This is ... interesting. But 
weird.

I suspect that the problem in this chain is junit. How junit sets up its 
classpath can be a bother. But then I do not run junit tests from eclipse. I 
run them from ant. Or I invoke the tests directly in my woa.

It may seem strange but I suspect you would have more luck with starting with a 
java command-line invocation that launches you WOA. I assume your tests are 
trying to launch that so that they can be clients of the app, yes? So, can your 
tests access the WOA when it is launched on the command-line?

You can, within java, construct an exec call which invokes java. You can, 
within java, construct an exec call which invokes java which launched your WOA. 
You will have more control of the setup of the wo app if you launch it that 
way. Then, can you have your junit test run the code that launches your woa?

This could work, no? Now you are making me wonder if I can do this from ant for 
Project Wonder testing....

cheers - ray

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to