[Tsung] looping [was:Re:backend and fullstats]

philippe vanderstraeten phvander at gmail.com
Wed Apr 30 10:13:01 CEST 2008


Hi,

Is there a way to get unconditionnal loop ?
Thanks.

On Tue, Apr 29, 2008 at 4:39 PM, Nicolas Niclausse <nicolas at niclux.org>
wrote:

> Pablo Polvorin ecrivait le 29.04.2008 16:23:
>
> > Hi,
> > yesterday I posted a little patch in the bug tracker
> > that implents both conditional and inconditional
> > looping construct.
> >
> > > I think the problem, with an XML implementation, is
> > > the condition for
> > > repeating (ie finding a value in data received from
> > > host) could be far from
> > > the involved request:
> > >
> > Agree with that. My approach was try to use a "repeat"
> > syntax, and write the condition at the end of the
> > loop:
> > <repeat>    ...   <request>   <dyn_variable name="result"
> > regexp="Result:
> > \(.*\)"/>   <http url="/random" method="GET"
> > version="1.1"></http>  </request>    ...    <until var="result" eq="5"/>
> > </repeat>
> > downside is that now you need two elements for
> > conditional loop: repeat and until (repeat/while is
> > implemented also). <until> or <while> should allways
> > appear at the last element inside a <repeat/>
> > construct
> >
> > patch and additional comments in
> > https://support.process-one.net/browse/TSUN-62
> >
>
> Hello,
>
> thanks for the patch !
>
> It looks ok for me, I'll include it soon.
>
>  translating XML scenarios to
> > > erlang language, compile the resulting code and
> > > execute it inside the
> > > controller ?
> > >
> > don't know, to me it seems as really difficult, far,
> > too far away from what a "little patch" could do :-) .
> > Nicolas?
> >
>
> Yes, seems very complicated ... :/
>
> What could be done i think,  in the case where you need to code a dynamic
> function:
>
> Instead of creating an external file (compile and put in the erlang PATH):
> just add the code in the XML and compile it on the fly during the XML
> parsing.
>
> Sounds useful for anyone ?
>
> --
> Nicolas
> _______________________________________________
> Tsung-users mailing list
> Tsung-users at lists.process-one.net
> https://lists.process-one.net/mailman/listinfo/tsung-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.process-one.net/pipermail/tsung-users/attachments/20080430/5c80e77f/attachment.html


More information about the Tsung-users mailing list