You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Kyle Schmitt <ky...@gmail.com> on 2007/01/19 20:42:04 UTC
Variable substitution for post/get variable names?
Is it possible to do variable substitution for post/get variable names?
That is I have an http sampler, and it passes this query string for example:
GENERATED_LINK_NAME.x=10&GENERATED_LINK_NAME.y=7
I'm using a regex extractor to grab the name of that varible (in this
odd case the value the variable is passed is irrelevant) so I'd like
to pass the query string
${myregexextractedvariable}.x=10&${myregexextractedvariable}.y=7
So.. is it possible?
--Kyle
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Variable substitution for post/get variable names?
Posted by sebb <se...@gmail.com>.
There are a few places where variables are not supported - I'm not
clear exactly where you have used the variable...
On 19/01/07, Kyle Schmitt <ky...@gmail.com> wrote:
> In the title for that sampler I use the ${variablename} just so I'll
> see it in my log, and it's replaced with what it should be. it's
> finding it well enough to insert it there
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Variable substitution for post/get variable names?
Posted by Kyle Schmitt <ky...@gmail.com>.
In the title for that sampler I use the ${variablename} just so I'll
see it in my log, and it's replaced with what it should be. it's
finding it well enough to insert it there
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Variable substitution for post/get variable names?
Posted by sebb <se...@gmail.com>.
If the variable name has not been replaced it means that the variable
has not been defined.
On 19/01/07, Kyle Schmitt <ky...@gmail.com> wrote:
> Umm, looking at that page, it looks like it just covers pulling a
> variable out using a regex and applying it as the value for a get/post
> variable, but not the variable name itself.
>
> Perhaps I didn't word my original post right: I'm trying to do this
> right now, and when I view the log, in the query string, instead of
> having the value my regex finds, it has the string literal
> ${myregexextractedvariable}.x, where the ${} bit hasn't been replaced
> by the string.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Variable substitution for post/get variable names?
Posted by git <gi...@cubicalland.com>.
Dood,
Sorry - I did misunderstand you there.
I've never tried substituting the name.
Sebbaz says it should work. If it does not, then I guess that is a bug.
If that is the case you could try putting the variable into the URL by
hand - but that would be messy.
www.blar.com/blar.html?${myVar}=blar
Cheers
AJ
On Fri, 2007-01-19 at 14:07 -0600, Kyle Schmitt wrote:
> Umm, looking at that page, it looks like it just covers pulling a
> variable out using a regex and applying it as the value for a get/post
> variable, but not the variable name itself.
>
> Perhaps I didn't word my original post right: I'm trying to do this
> right now, and when I view the log, in the query string, instead of
> having the value my regex finds, it has the string literal
> ${myregexextractedvariable}.x, where the ${} bit hasn't been replaced
> by the string.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>
www.cubicalland.com
www.nerds-central.blogspot.com
Re: Variable substitution for post/get variable names?
Posted by Kyle Schmitt <ky...@gmail.com>.
Umm, looking at that page, it looks like it just covers pulling a
variable out using a regex and applying it as the value for a get/post
variable, but not the variable name itself.
Perhaps I didn't word my original post right: I'm trying to do this
right now, and when I view the log, in the query string, instead of
having the value my regex finds, it has the string literal
${myregexextractedvariable}.x, where the ${} bit hasn't been replaced
by the string.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Variable substitution for post/get variable names?
Posted by git <gi...@cubicalland.com>.
Yes,
If you look at the bottom half of the article
http://nerds-central.blogspot.com/2006/08/pushing-envelope-with-jmeter.html
it shows how to do it, with pictures...
Cheers
AJ
On Fri, 2007-01-19 at 13:42 -0600, Kyle Schmitt wrote:
> Is it possible to do variable substitution for post/get variable names?
>
> That is I have an http sampler, and it passes this query string for example:
> GENERATED_LINK_NAME.x=10&GENERATED_LINK_NAME.y=7
>
> I'm using a regex extractor to grab the name of that varible (in this
> odd case the value the variable is passed is irrelevant) so I'd like
> to pass the query string
> ${myregexextractedvariable}.x=10&${myregexextractedvariable}.y=7
>
>
> So.. is it possible?
>
> --Kyle
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>
www.cubicalland.com
www.nerds-central.blogspot.com