[Yanel-dev] Canoo WebTest best practices: timing, the 'retry' steap and the 'sleep' task (and he 'timedgroup' step)

Michael Wechner michael.wechner at wyona.com
Fri Mar 26 23:25:38 CET 2010


Guillaume Déflache wrote:
> Hi!
>
> Guillaume Déflache schrieb:
>> [...]
>> but *rather do*:
>>
>>     <retry maxcount="10">
>>       <sleep description="Wait a bit for GWT JS to initialize" 
>> seconds="1"/>
>>       <verifyText description="Check policy editor name in page body" 
>> text="Wyona Access Control Policy (GWT) Editor"/>
>>     </retry>
>
> This has been tested on a customer project and seems to work great (it 
> may even have reduce test durations and memory usage).
>
> It was implemented as a more compact 'retry-after-sleep' Ant macro, 
> which may be brought to Yanel for general usage at some point as it is 
> not project-specific at all.

sounds  great :-)

Thanks very much for introducing this.

Michi
>
>
>> P.S.: A further improvement to the recommended method above could be 
>> to make the sleep delay longer after each step, so that we only need 
>> a very small number of steps to get more and more slack WRT delays.
>> Cf. the 'decay' parameter in 
>> http://www.prototypejs.org/api/ajax/periodicalUpdater for a better 
>> explanation of what I have a mind.
>> I think this could be made using Canoo's "#{count}" dynamic property, 
>> but them it would probably be worth factoring that out in a new macro 
>> then to hide and avoid repeating the gory details.
>
> This might now be implemented easily an as extra optional parameter to 
> that macro, or in another similar macro.
>
> HTH,
>    Guillaume



More information about the Yanel-development mailing list