You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Mark Lybarger <ma...@wideopenwest.com> on 2004/02/17 06:30:12 UTC

wiki page - parameterize tests

i'm fairly new to JMeter.

on the wiki, http://nagoya.apache.org/wiki/apachewiki.cgi?JMeterFAQ,  
under /How do I parameterize my JMeter test cases?, /item 2 says to 
"Click the Add button to add the following user defined variables to the 
Test Plan node:". i think that should read:
"Click the Add button to add a Pre Processor > User Parameter  to the 
Test Plan node. Click  Add Variable to add the folowing variables/values 
to the User Parameter list.

i'm also extremely interested in the section that follows, the dynamic 
parameters.  unfortunately, being a java junkie, i don't have much 
experience with perl regular expressions.  is there perhaps a collection 
of usage of these regular expressions with JMeter?  one thing that i can 
think of is, say you have a hidden input form element that contains a 
value that you need to grab:

<input type="hidden" name="HiddenVarYouCantSee" value="IChangePerRequest" />
<input type="hidden" name="SecondHidden" value="IChangePerRequest" />
<input type="hidden" name="ThirdHidden" value="IChangePerRequest" />


how would i grab the value(s) here? yes, there's other hidden variables 
on the form that i don't care about.  i only know the name of the ones 
that i do care about.

thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: wiki page - parameterize tests

Posted by Mark Lybarger <ma...@wideopenwest.com>.
Mark Lybarger wrote:

> i'm fairly new to JMeter.
>
> on the wiki, http://nagoya.apache.org/wiki/apachewiki.cgi?JMeterFAQ,  
> under /How do I parameterize my JMeter test cases?, /item 2 says to 
> "Click the Add button to add the following user defined variables to 
> the Test Plan node:". i think that should read:
> "Click the Add button to add a Pre Processor > User Parameter  to the 
> Test Plan node. Click  Add Variable to add the folowing 
> variables/values to the User Parameter list.
>
> i'm also extremely interested in the section that follows, the dynamic 
> parameters.  unfortunately, being a java junkie, i don't have much 
> experience with perl regular expressions.  is there perhaps a 
> collection of usage of these regular expressions with JMeter?  one 
> thing that i can think of is, say you have a hidden input form element 
> that contains a value that you need to grab:
>
> <input type="hidden" name="HiddenVarYouCantSee" 
> value="IChangePerRequest" />
> <input type="hidden" name="SecondHidden" value="IChangePerRequest" />
> <input type="hidden" name="ThirdHidden" value="IChangePerRequest" />
>
>
> how would i grab the value(s) here? yes, there's other hidden 
> variables on the form that i don't care about.  i only know the name 
> of the ones that i do care about.

n/m a little searching on the mail archives turned up the answer. 
something along the lines of:
<input type="hidden" name="SecondHidden" value="(\w*)" />
will give it back, though i've only tried out the number example someone 
else posted a while back for hidden variables. these take a little bit 
of work to get down.



>
> thanks!
>
>
> ---------------------------------------------------------------------
> 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: wiki page - parameterize tests

Posted by Mark Lybarger <ma...@wideopenwest.com>.
I'll definately take a look at these and perhaps see about using the wiki. 

In the Component reference, the Http Request section, maybe some more 
could be added to the mime type.   I had a form which was multipart and 
the parameters weren't coming through b/c i didn't set the recording 
(actually, i used the proxy to originally grab the page, and _it_ didn't 
pick up that the form enctype was multipart/form-data.  Though even if 
it were in the doc, i probably would have missed it. 

Using the proxy to grab all your form data and requests, etc is VERY 
nice to save some work, but you still have to realize that you have to 
tweak the tests a bit.

Mark Lassau wrote:

> Mark Lybarger wrote:
>
>> i'm fairly new to JMeter.
>>
>> on the wiki, http://nagoya.apache.org/wiki/apachewiki.cgi?JMeterFAQ,  
>> under /How do I parameterize my JMeter test cases?, /item 2 says to 
>> "Click the Add button to add the following user defined variables to 
>> the Test Plan node:". i think that should read:
>> "Click the Add button to add a Pre Processor > User Parameter  to the 
>> Test Plan node. Click  Add Variable to add the folowing 
>> variables/values to the User Parameter list.
>>
>> i'm also extremely interested in the section that follows, the 
>> dynamic parameters.  unfortunately, being a java junkie, i don't have 
>> much experience with perl regular expressions.  is there perhaps a 
>> collection of usage of these regular expressions with JMeter?  one 
>> thing that i can think of is, say you have a hidden input form 
>> element that contains a value that you need to grab:
>>
>> <input type="hidden" name="HiddenVarYouCantSee" 
>> value="IChangePerRequest" />
>> <input type="hidden" name="SecondHidden" value="IChangePerRequest" />
>> <input type="hidden" name="ThirdHidden" value="IChangePerRequest" />
>>
>>
>> how would i grab the value(s) here? yes, there's other hidden 
>> variables on the form that i don't care about.  i only know the name 
>> of the ones that i do care about.
>>
>> thanks!
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
> Send this value with your request (and so on...)
> ${__regexFunction(<input type="hidden" name="HiddenVarYouCantSee" 
> value="(.*)" />,$1$,1,,,)}
>
> I'd suggest you read through the whole user manual
> http://jakarta.apache.org/jmeter/usermanual/index.html
> before using JMeter.
> Glance over the stuff you think you aren't interested in.
> Some of the info you want is not necessarily were you would first look.
>
> I found chapter 13 
> <http://jakarta.apache.org/jmeter/usermanual/component_reference.html>, 
> "Component Reference", the most useful, although at first glance you 
> would think it is a reference to look up one at a time later.
>
> see 
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#__regexFunction 
>
> to figure out the regex voodoo above.
>
>
>
> ---------------------------------------------------------------------
> 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: wiki page - parameterize tests

Posted by Mark Lassau <ml...@bisinfo.com.au>.
Mark Lybarger wrote:

> i'm fairly new to JMeter.
>
> on the wiki, http://nagoya.apache.org/wiki/apachewiki.cgi?JMeterFAQ,  
> under /How do I parameterize my JMeter test cases?, /item 2 says to 
> "Click the Add button to add the following user defined variables to 
> the Test Plan node:". i think that should read:
> "Click the Add button to add a Pre Processor > User Parameter  to the 
> Test Plan node. Click  Add Variable to add the folowing 
> variables/values to the User Parameter list.
>
> i'm also extremely interested in the section that follows, the dynamic 
> parameters.  unfortunately, being a java junkie, i don't have much 
> experience with perl regular expressions.  is there perhaps a 
> collection of usage of these regular expressions with JMeter?  one 
> thing that i can think of is, say you have a hidden input form element 
> that contains a value that you need to grab:
>
> <input type="hidden" name="HiddenVarYouCantSee" 
> value="IChangePerRequest" />
> <input type="hidden" name="SecondHidden" value="IChangePerRequest" />
> <input type="hidden" name="ThirdHidden" value="IChangePerRequest" />
>
>
> how would i grab the value(s) here? yes, there's other hidden 
> variables on the form that i don't care about.  i only know the name 
> of the ones that i do care about.
>
> thanks!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
Send this value with your request (and so on...)
${__regexFunction(<input type="hidden" name="HiddenVarYouCantSee" 
value="(.*)" />,$1$,1,,,)}

I'd suggest you read through the whole user manual
http://jakarta.apache.org/jmeter/usermanual/index.html
before using JMeter.
Glance over the stuff you think you aren't interested in.
Some of the info you want is not necessarily were you would first look.

I found chapter 13 
<http://jakarta.apache.org/jmeter/usermanual/component_reference.html>, 
"Component Reference", the most useful, although at first glance you 
would think it is a reference to look up one at a time later.

see 
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#__regexFunction
to figure out the regex voodoo above.



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org