You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by ope <op...@yahoo.com> on 2004/06/18 02:39:33 UTC

Unable to get __regexFunction to work

I am trying to use the __regexFunction but can't get
it work the way that I want.  Either I am
misunderstanding the way that it works (most likely)
or the function doesn't work.

What I am trying to do is create a regex function that
will match a SessionID found in returned web pages
while recording a session.  What I have done is
created a User Defined Variable in the Test Plan.  The
Name of the variable is sessionid and I have put the
following __regexFunction in for the Value:
${__regexFunction(SessionID=(.*)&,$1$,1,,NOSESSIONID,getSessionId)}

The SessionID will be found in a string that looks
something like this:
screen=startScreen&SessionID=123456789&objectID=4321

The I start the HTTP Proxy Server in the WorkBench and
record my test.  After running the test and stopping
the proxy server I take a look in my recorded session
and the sessionids have not been replaced with a
${sessionid} variable.  I have some other user defined
variables in the Test Plan that have hard coded values
and they have all been replaced with the variable as
expected.

How can I use the __regexFunction to parse my recorded
session and replace all instances of the actual
session id with a variable?  Is this possible in the
way that I am trying to do it?


	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

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