• 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: Setting url to launch after build
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting url to launch after build


  • Subject: Re: Setting url to launch after build
  • From: Thomas Lewis <email@hidden>
  • Date: Fri, 2 Jul 2004 12:15:49 -0500

This seems to work partly... The problem is that "Action" is added to any action passed to performActionNamed(). Since WOUnitTest's action is uta and not utaAction this won't work. If I could find out how to override performActionNamed() this will work.

On Jul 1, 2004, at 6:09 PM, Colin Clark wrote:

Hi Thomas,

To load the WOUnitTest runner page by default when the application starts up, you'll need to do two things:

1. Change the application's default request handler to the DirectAction request handler. One possible place to do this in your Application's constructor:
WORequestHandler daHandler = requestHandlerForKey(directActionRequestHandlerKey());
setDefaultRequestHandler(daHandler);


2. Next, you'll want to ensure that your default direct action returns the WOUnitTest runner action. This should be put into your DirectAction.defaultAction() method. The "uta" action is the WOUnitTest DA for accessing the "all tests" runner.
return performActionNamed("uta");

That's it. Obviously, you'll want to make sure you take this code out before deployment so your users don't automatically see the unit test runner page.


Realistically, you probably won't want to link to the WOUnitTest framework at all when you're building your application for deployment, since it isn't a great idea to leave in an action in that can allow users to run your unit tests on a deployed application!

I hope that helps,

Colin
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Setting url to launch after build
      • From: Colin Clark <email@hidden>
References: 
 >Re: Setting url to launch after build (From: Colin Clark <email@hidden>)

  • Prev by Date: Re: Core Data (was Re: Any WWDC News)
  • Next by Date: JNDI authentication (cross-post w/ Omni)
  • Previous by thread: Re: Setting url to launch after build
  • Next by thread: Re: Setting url to launch after build
  • Index(es):
    • Date
    • Thread