You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Thavutam, Prashanth" <1t...@toysrus.com> on 2005/08/11 20:23:34 UTC
Using _regexFunction
I have used HTTP Proxy Server to record my application testing. It recorded
everything fine. The problem I am having is with the continuity token that
we use for each request to check if it is a valid request. This is
dynamically generated for each request and kept in session. When I go to
next page, the previous value kept in session is compared with the value
from the request and if they match, the request is processed and a new token
is generated. If they don't match, an error page is displayed.
Obviously, the test failed when I ran it. I am trying to use _regexFunction
to get this value dynamically. I need some guidance on how to create the
function and where to use it.
Below is the source on the html form:
<input type="hidden" name="com.tru.arch.facility.web.ContinuityToken"
value='d7a281f1c83d859b77f476abf9c3ddb5'>
I need to capture this value from the previous response and send it with
next request.
Any help is appreciated.
Prashanth
========================================================================
This email message is for the sole use of the intended recipient (s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, send
an email to EmailAdmin@toysrus.com.
Toys "R" Us, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Using _regexFunction
Posted by hema <he...@yahoo.com>.
Hi,
I understand that you were able to successfully use the URL Rewriting Modifier.
Whether it can be used for web applications using cookies for passing
the session id or it could be used only in case of http url rewriting?
Ur reply is valuable and would be appreciated a lot.
Thanks in Advance,
Hema
Jeff Dean <ch...@gmail.com> wrote:
You can use the HTTP URL Rewriting Modifier. It's a lot
simple than than regular expressions if it matches the way
your application works (for example, see my other
posting from this morning).
-- jeff
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
Re: Using _regexFunction
Posted by Jeff Dean <ch...@gmail.com>.
You can use the HTTP URL Rewriting Modifier. It's a lot
simple than than regular expressions if it matches the way
your application works (for example, see my other
posting from this morning).
-- jeff
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Using _regexFunction
Posted by sebb <se...@gmail.com>.
Note that the Regex Extractor in that case will also be applied to the
second sampler, which may not be desired.
To apply the RE to only a single Sampler, add it as a child of that sampler:
TestPlan
+ Thread Group
+ + Sampler
+ + + Regex Extractor
+ + Sampler
S.
P.S. Presumably a "threat" group is what one uses for stress testing ;-)
On 16/08/05, Christian Baumgartner <ch...@tiscover.com> wrote:
> maybe this will help you further:
>
> http://jakarta.apache.org/jmeter/usermanual/functions.html#__regexFunction
>
> it's not that difficult, maybe this explains it better:
>
> -testplan
> |
> |_threat group
> |
> |_http request (this request creates the value)
> |
> |_regex extractor (here you define a reference name (variable name i.e.:
> haribo) and the regular expression)
> |
> |_http request (next http request that will use the value or should match
> it, pass it via POST/GET)
> you can access the variable above via ${haribo}
>
>
> best regards
> Christian
>
>
> -----Ursprüngliche Nachricht-----
> Von: Thavutam, Prashanth [mailto:1thavutp@toysrus.com]
> Gesendet: Donnerstag, 11. August 2005 19:24
> An: 'JMeter Users List'
> Betreff: Using _regexFunction
>
>
> I have used HTTP Proxy Server to record my application testing. It recorded
> everything fine. The problem I am having is with the continuity token that
> we use for each request to check if it is a valid request. This is
> dynamically generated for each request and kept in session. When I go to
> next page, the previous value kept in session is compared with the value
> from the request and if they match, the request is processed and a new token
> is generated. If they don't match, an error page is displayed.
> Obviously, the test failed when I ran it. I am trying to use _regexFunction
> to get this value dynamically. I need some guidance on how to create the
> function and where to use it. Below is the source on the html form: <input
> type="hidden" name="com.tru.arch.facility.web.ContinuityToken"
> value='d7a281f1c83d859b77f476abf9c3ddb5'>
> I need to capture this value from the previous response and send it with
> next request. Any help is appreciated.
>
> Prashanth
>
>
> ========================================================================
> This email message is for the sole use of the intended recipient (s) and may
> contain confidential and privileged information. Any unauthorized review,
> use, disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and destroy all copies
> of the original message. To reply to our email administrator directly, send
> an email to EmailAdmin@toysrus.com.
> Toys "R" Us, Inc.
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
AW: Language
Posted by Christian Baumgartner <ch...@tiscover.com>.
you have to change the jmeter.properties file if you want another language
than the default vm language of your system.
it's one of the first options in the file:
#Preferred GUI language. Comment out to use the JVM default locale's
language.
#language=en
best regards
Christian
-----Ursprüngliche Nachricht-----
Von: Martins Kipens [mailto:Martins.Kipens@provinzial-online.de]
Gesendet: Mittwoch, 17. August 2005 11:52
An: JMeter Users List
Betreff: Language
Can someone pleas tell me how to change language from German to English? Im
using WinNT (German version) and JMeter 2.0.3
best regards,
martins
---------------------------------------------------------------------
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
Language
Posted by Martins Kipens <Ma...@provinzial-online.de>.
Can someone pleas tell me how to change language from German to English?
I’m using WinNT (German version) and JMeter 2.0.3
best regards,
martins
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
AW: Using _regexFunction
Posted by Christian Baumgartner <ch...@tiscover.com>.
maybe this will help you further:
http://jakarta.apache.org/jmeter/usermanual/functions.html#__regexFunction
it's not that difficult, maybe this explains it better:
-testplan
|
|_threat group
|
|_http request (this request creates the value)
|
|_regex extractor (here you define a reference name (variable name i.e.:
haribo) and the regular expression)
|
|_http request (next http request that will use the value or should match
it, pass it via POST/GET)
you can access the variable above via ${haribo}
best regards
Christian
-----Ursprüngliche Nachricht-----
Von: Thavutam, Prashanth [mailto:1thavutp@toysrus.com]
Gesendet: Donnerstag, 11. August 2005 19:24
An: 'JMeter Users List'
Betreff: Using _regexFunction
I have used HTTP Proxy Server to record my application testing. It recorded
everything fine. The problem I am having is with the continuity token that
we use for each request to check if it is a valid request. This is
dynamically generated for each request and kept in session. When I go to
next page, the previous value kept in session is compared with the value
from the request and if they match, the request is processed and a new token
is generated. If they don't match, an error page is displayed.
Obviously, the test failed when I ran it. I am trying to use _regexFunction
to get this value dynamically. I need some guidance on how to create the
function and where to use it. Below is the source on the html form: <input
type="hidden" name="com.tru.arch.facility.web.ContinuityToken"
value='d7a281f1c83d859b77f476abf9c3ddb5'>
I need to capture this value from the previous response and send it with
next request. Any help is appreciated.
Prashanth
========================================================================
This email message is for the sole use of the intended recipient (s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, send
an email to EmailAdmin@toysrus.com.
Toys "R" Us, Inc.
---------------------------------------------------------------------
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