[Tsung] Dynamic Variables

Nicolas Niclausse nicolas at niclux.org
Sat Dec 15 12:36:11 CET 2007


Gus Miraglia a écrit :
> I am currently using tsung-1.2.1 on my fedora linux box.  I can perform
> dynamic substitutions with my own erlang module, but as soon as I try to
> create a dynamic variable I get the following error no matter what I do. 
> 
> 532- fatal: {failed_validation,{element,
>                                    dyn_variable,
>                                    isnt_comprise_in_the_rule}}
> ["Config Error, aborting !
> ",{fatal,{{failed_validation,{element,dyn_variable,isnt_comprise_in_the_rule}},{file,"/home/Gus/.tsung/tsung.xml"},{line,319},{col,1}}}]
> 
> 
> Currently all I have added to my config file is the following line.
> 
> <dyn_variable name="referurl"></dyn_variable>
> 
> where referurl is just a hidden item in my html form.  An entire session
> block that throws this error is shown below:
> 
> <sessions>
>   <session name="http-example" probability="100" type="ts_http">
>     <request>
>      <http url="http://localhost/items.html
> <http://localhost/items.html>" method="GET" version="1.1"></http>
>      <dyn_variable name="referurl"></dyn_variable>       
>     </request>  
>   </session>
>  </sessions>
> 
> Any ideas as to what could be causing this?  Am I missing something simple?

There is an error in the manual, sorry about that (already fixed in
svn):  <dyn_variable> should be placed before <http>

Your example is also wrong, i guess it's just a typo in your mail

this should work:

<request>
      <dyn_variable name="referurl"></dyn_variable>
      <http url="http://localhost/items.html" method="GET"
version="1.1"></http>
</request>

--
Nicolas


More information about the Tsung-users mailing list