• 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
unit tests and woapplication bundles, resources, etc.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unit tests and woapplication bundles, resources, etc.


  • Subject: unit tests and woapplication bundles, resources, etc.
  • From: Greg Brown <email@hidden>
  • Date: Fri, 11 Apr 2008 16:08:59 -0400

Hi,

I am having trouble with my testing of my woapp. I have parameters that are in the Properties file, the woapp accesses them through 

System.getProperty("importLogFilename");

BUT, when running with the testng environment in eclipse, all the strings from calls like System.getProperty("importLogFilename") 
come up null. I am guessing it can't find/use the Properties file.

1. For bundle loading to work properly, you need to use a custom Working Directory for the JUnit/TestNG launcher:
${workspace_loc:MyFW/dist/MyFW.framework/Resources/Java}
Apps are similar but a different path.


${workspace_loc:nucptdb/build/nucptdb.woa/Contents/Resources/Java}

2. Again, for bundle loading, add the jars from the built framework / application (can be in the projects in the Eclipse workspace) to the User Entries of the classpath and move above whatever is there. Do the same for all the frameworks that it references.

3. The usual connection dictionary setting classes to set things up and switch prototypes etc.

4. Sometimes I need to call primeApplication, IIRC for component tests:

WOApplication.primeApplication("MyFW", null, "net.foo.bar.appserver.FWApplication");


Same result if I call WOApplication.primeApplication or not.

Where FWApplication is a subclass of WOApplication. You can also leave the last param blank and it will use WOApplication - sometimes that works for simple stuff.


Chuck


Not a BUNDLE of joy.

Greg Brown
email@hidden



 _______________________________________________
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

  • Follow-Ups:
    • Re: unit tests and woapplication bundles, resources, etc.
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Staying with WebObjects
  • Next by Date: Re: rowDiffsForAttributes _dbSnapshot and _newRow missing attributes
  • Previous by thread: Re: My First Deployment^^
  • Next by thread: Re: unit tests and woapplication bundles, resources, etc.
  • Index(es):
    • Date
    • Thread