Re: WOUnitTest pattern?
Re: WOUnitTest pattern?
- Subject: Re: WOUnitTest pattern?
- From: Wolfram Stebel <email@hidden>
- Date: Sat, 13 May 2006 17:36:42 +0200
- Thread-topic: WOUnitTest pattern?
Am 13.05.2006 16:54 Uhr schrieb "Anjo Krank" unter <email@hidden>:
> OTTOMH, either move the actual methods to test elsewhere ie, don't do
> nextPage.setValue(context().stringFormValueForKey("foo")) but instead
> create a method that takes all needed info as parameters and test
> this, or (preferably) create a request with the URL parameters you
> want and create the DA manually, then call the methods you want to test.
I intended to create requests and execute them.
But i dont know how...
pseudo code:
r = new WORequest
r.setDAParam (a)
r. perform
or the like...
Any snippet available?
>
> It would greatly depend on your DAs (eg if they need a session etc)
> if you can really test them in a meaningful way, though... just out
> of curiosity, what *would* you want to test? I can hardly imagine
> what I had in a DA, short of if the parameter names were spelled
> correctly that would make a meaningful test.
- Most important to test that programm changes simply have the same result
afterwards
- Second to test variants of calls
- Third to test correct parameter supply
- Fourth to simplify testing of a set of DirectActions
- Fifth to test the robustnes of DA's to wrong input (When someone creates
it's DA-calls manually)
Am i wrong?
Regards
Wolfram
>
> Cheers, Anjo
>
> Am 13.05.2006 um 16:23 schrieb Wolfram Stebel:
>
>> Hi all,
>>
>> is there some nice pattern how to test DirectActions with unit
>> testing?
>> The "problem" starts with how to call the direct actions with
>> parameters
>> from unit test.
>> Any help is appreciated!
>>
>> regards
>>
>> Wolfram
_______________________________________________
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