Of coures it "User Defifen Variables" has to be: "User Defined Variables"
> Hello,
>
> thanks for you suggestion.
>
> sid doesn't contain a constant value. So I (as Sebb suggest) am using a
> "User Defifen Variables" which contains
> Name: sid
> Value: ${__javaScript(Math.random(),)}
>
> When I record a new script there stays HTTP requests with the Parameters:
> Name: sid
> Value: 0.42465319814148805
>
> So it won't insert the value which I want to use.
>
> Thanks for all your help.
>
> Regards,
> Peter.
>
>> Hi,
>>
>> if there is a constant expression in your (recorded?) test plan that
>> needs to be replaced, you can simply use your favourite text editor on
>> the jmx file directly. I'd use sed for this specific task.
>>
>> Note that changing each occurence with the function call will lead to
>> each sampler using a different "sid" value, which may not be what you
>> want. As sebb suggested, use User Defined Variables.
>>
>> If "sid" is what I think it is, it's probably not so random at all, and
>> your test plan should actually use what the application presents instead
>> of generating a random number. You probably want to use a Regular
>> Expression Extractor after one of the first samplers.
>>
>> Cheers,
>> Felix
>>
>> On 10/09/2010 02:34 PM, Peter Peterse wrote:
>>> Hello,
>>>
>>> is there a possibility to define a default value for a variable name?
>>>
>>> I have a webapplication which uses very often the variable sid. The
>>> value is a random number which I want to replace with
>>> ${__javaScript(Math.random(),)}
>>> When I have to change all het random numbers by hand than I have a hell
>>> of a job ;-)
>>>
>>> Thanks for your answers.
>>>
>>> Regards,
>>> Peter Peterse
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>
>> --
>> MPeX.net GmbH / Werner-Voß-Damm 62 / D-12101 Berlin / Germany
>> MPeXnetworks / www.mpexnetworks.de
>> Tel: ++49-30-78097 180 / Fax: ++49-30-78097 181
>>
>> Sitz, Registergericht: Berlin, Amtsgericht Charlottenburg, HRB 76688
>> Geschäftsführer: Lars Bräuer, Gregor Lawatscheck
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]