• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: JUnit and WOA Launching
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JUnit and WOA Launching


  • Subject: Re: JUnit and WOA Launching
  • From: Andrew Lindesay <email@hidden>
  • Date: Mon, 16 Jan 2012 21:47:19 +1300

Hi Ray;

Thanks for your reply.

I would like to test the application from "outside", but in addition, I want to be able to test various algorithms which have been encapsulated in 'helpers' within the application; hence the need to launch the application within the same virtual machine as the tests are running from.

cheers.

On 16/01/12 6:59 PM, Ray Kiddy wrote:

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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden



--
Andrew Lindesay
www.silvereye.co.nz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >JUnit and WOA Launching (From: Andrew Lindesay <email@hidden>)
 >Re: JUnit and WOA Launching (From: Ray Kiddy <email@hidden>)

  • Prev by Date: Re: JUnit and WOA Launching
  • Next by Date: Re: Is there a way to create rules programatically?
  • Previous by thread: Re: JUnit and WOA Launching
  • Next by thread: How to make a dynamic displayNameForProperty?
  • Index(es):
    • Date
    • Thread