Re: Setting url to launch after build
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.