[Tsung] Tsung 1.4.2 and Rails signin

Rodolphe Quiédeville rodolphe at quiedeville.org
Thu Nov 14 11:44:20 CET 2013


andy <at1712 at web.de> writes:

> Hello,
>
> I have some problems testing our RAILS application.
>
> 1.) Following does not work with 1.4.2
>     Should I update to 1.5 ?
>
> #### snip ####
> using 'authenticity_token' :
>
> <setdynvars sourcetype="eval"
>     code="fun({Pid,DynVars})->
>                   {ok,Val}=ts_dynvars:lookup(authenticity_token,DynVars),
>                   edoc_lib:escape_uri(Val)
>           end.">
>     <var name="encoded_token" />
> </setdynvars>
>
> #### snap ####
>
> 2.) With my tsung.xml
>
> #### snip ####
> <request subst="true">
>  <dyn_variable name="redirect" re="Location: (http://.*)\r"/>
>  <http url='/session' version='1.1'
>     contents='utf8=%E2%9C%93&
>     authenticity_token=%%_encoded_token%%&
>     session%5Bemail%5D=%%_username%%&
>     session%5Bpassword%5D=_passwd&
>     session%5Bremember%5D=0&
>     commit=Anmelden'
>      content_type='application/x-www-form-urlencoded' method='POST'>
>   </http>
> </request>
>
> <thinktime random='true' value='15'/>
>
> <repeat name="redirect_loop" max_repeat="5">
>  <request subst="true">
>    <dyn_variable name="redirect" re="Location: (http://.*)\r"/>
>     <http url="%%_redirect%%" method="GET"></http>
>  </request>
>  <until var="redirect" eq=""/>
> </repeat>
>
> #### snap ####
>
> Tsun generates a POST with following parameters
>
>  Parameters:
> {"utf8"=>"✓",
>  "authenticity_token"=>"XRiHa2kP40BM0qLix1ybi7PJibqplvDEAqosDrTw3Jg=",
>  "session"=>{"email"=>"a73 at test.de", "password"=>"[FILTERED]",
>  "remember"=>"0"}, "commit"=>"Anmelden", "locale"=>"session"
> }
>
> I never added "locale=session". Where does it come from?
> How can I suppress this?

Hi,

What is the content of var 'redirect' (first time) in the log ? 

Regards,

-- 
Rodolphe Quiédeville
Expert Tsung - Consulting en performance des SI
Tel : 06 13 79 63 41
http://blog.rodolphe.quiedeville.org


More information about the Tsung-users mailing list