jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sandeep Rao" <>
Subject regexFunction
Date Tue, 17 Jun 2003 03:51:38 GMT

Hi all,

I have been browsing this list for sometime and found good help in
getting started with jmeter. This is my first post and this is regarding
the regexFunction. I will appreciate if you can help me get the solution
to my problem.

Response to my first http request is in xml format and I want to parse
it and get hold of one parameter - SessionID - and use it for my second
http request. Here is the response format of first http request:

<?xml version="1.0"?>

I want to get hold of the string 'D49DD65185E94BDFBBFD2E4D872F334965'
from the above response. Following is the structure of my test plan

- First http request
-- Response assertion
- Assertion results
- Second http request

In the Response assertion I have put in the following:


and in the Second http request I have added a parameter as follows:
SessionID  = ${SessionIDF}

Problem I have is that with the above format for the regex the assertion
fails with the following message:

first http request details
	Test failed, expected to contain: null

And of course, my second http request goes with the following parameter:

If I change the parameter value in second request to 
SessionID  = ${SessionIDF_g1}
it still doesn't work. It sends the request with value as

I did some tweaking and found some unexpected results. I changed the
regex function to as follows:


Note that the template value has changed from $1$ to $0$. When I test it
again the assertion for first request passes without any failures. But
my second request is sent with following parameters:

This is not what I want. I only want the actual sessionid =

I know this is supposed to work and perhaps I am doing something wrong.
Can someone please help me resolve this?

Thanks a ton,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message