jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Frank>
Subject Re: default variable value
Date Mon, 11 Oct 2010 06:59:24 GMT

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.


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:
> For additional commands, e-mail:

-- GmbH / Werner-Voß-Damm 62 / D-12101 Berlin / Germany
MPeXnetworks /
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:
For additional commands, e-mail:

View raw message