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

Guillaume Déflache guillaume.deflache at wyona.com
Fri Mar 26 17:48:28 CET 2010


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.


> 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