You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by weili3 <we...@cisco.com> on 2008/02/21 06:06:16 UTC

regular expression in JMeter

Hi,
 
    I come to a problem while using JMeter to test our web application.
    JMeter supports GET/POST method to send parameters with the request, and
the parameters are key-value pairs. E.g., in the login page, we have to set
username and password.
    In our application, field name for setting password is
"xxxxxxxx_password" where "xxxxxxxx"represents random string generated by
the server. To match this format, I think regular expression is the best
choice.
    So, Do JMeter support regular expression in specifying field name?
 
   Thanks for your help
 
HTTP Request

Re: 答复: regular expression in JMeter

Posted by sebb <se...@gmail.com>.
Read about variables here:

http://jakarta.apache.org/jmeter/usermanual/functions.html

and Regular Expression Extractor here:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor


On 21/02/2008, weili3 <we...@cisco.com> wrote:
>
>  Thanks for your reply. Can you tell me  some more details?
>
>  The scenario is: I need to specify the filed name for request
>  parameter(screenshot in the attachment). The random field name generated by
>  server may be aaaa_password for the first time, and be bbbb_password for the
>  second time. Whatever, the format is XXXX_password.
>  So, can I use regular expression in specifying the field name, like
>  /password/ or something else?
>
>  -----邮件原件-----
>  发件人: mahesh kumar [mailto:pmkumar@gmail.com]
>  发送时间: Thursday, February 21, 2008 2:22 PM
>  收件人: JMeter Users List
>  主题: Re: regular expression in JMeter
>
>
>  Yes...Jmeter support regular expressions.....we need to capture the specific
>  random from the response of the previous request. for this use regular
>  expression extractor...
>
>  On Thu, Feb 21, 2008 at 10:36 AM, weili3 <we...@cisco.com> wrote:
>
>  >  Hi,
>  >
>  >     I come to a problem while using JMeter to test our web application.
>  >     JMeter supports GET/POST method to send parameters with the
>  > request, and the parameters are key-value pairs. E.g., in the login
>  > page, we have to set username and password.
>  >     In our application, field name for setting password is
>  > "xxxxxxxx_password" where "xxxxxxxx"represents random string generated
>  > by the server. To match this format, I think regular expression is the
>  > best choice.
>  >     So, Do JMeter support regular expression in specifying field name?
>  >
>  >    Thanks for your help
>  >
>  > [image: HTTP Request]
>  >
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>

答复: regular expression in JMeter

Posted by weili3 <we...@cisco.com>.
Thanks for your reply. Can you tell me  some more details?

The scenario is: I need to specify the filed name for request
parameter(screenshot in the attachment). The random field name generated by
server may be aaaa_password for the first time, and be bbbb_password for the
second time. Whatever, the format is XXXX_password.
So, can I use regular expression in specifying the field name, like
/password/ or something else?

-----邮件原件-----
发件人: mahesh kumar [mailto:pmkumar@gmail.com] 
发送时间: Thursday, February 21, 2008 2:22 PM
收件人: JMeter Users List
主题: Re: regular expression in JMeter

Yes...Jmeter support regular expressions.....we need to capture the specific
random from the response of the previous request. for this use regular
expression extractor...

On Thu, Feb 21, 2008 at 10:36 AM, weili3 <we...@cisco.com> wrote:

>  Hi,
>
>     I come to a problem while using JMeter to test our web application.
>     JMeter supports GET/POST method to send parameters with the 
> request, and the parameters are key-value pairs. E.g., in the login 
> page, we have to set username and password.
>     In our application, field name for setting password is 
> "xxxxxxxx_password" where "xxxxxxxx"represents random string generated 
> by the server. To match this format, I think regular expression is the 
> best choice.
>     So, Do JMeter support regular expression in specifying field name?
>
>    Thanks for your help
>
> [image: HTTP Request]
>


Re: regular expression in JMeter

Posted by mahesh kumar <pm...@gmail.com>.
Yes...Jmeter support regular expressions.....we need to capture the specific
random from the response of the previous request. for this use regular
expression extractor...

On Thu, Feb 21, 2008 at 10:36 AM, weili3 <we...@cisco.com> wrote:

>  Hi,
>
>     I come to a problem while using JMeter to test our web application.
>     JMeter supports GET/POST method to send parameters with the request,
> and the parameters are key-value pairs. E.g., in the login page, we have
> to set username and password.
>     In our application, field name for setting password is
> "xxxxxxxx_password" where "xxxxxxxx"represents random string generated by
> the server. To match this format, I think regular expression is the best
> choice.
>     So, Do JMeter support regular expression in specifying field name?
>
>    Thanks for your help
>
> [image: HTTP Request]
>