jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Http response message data issue
Date Sun, 26 Jun 2011 14:44:26 GMT
On 26 June 2011 15:24, anie sahu <anie.sahu@gmail.com> wrote:
> Thanks for response sebb-2-2.
> In the file which I attached in my previous post, line no 449, *var
> workID=2346077;*
> I am looking for this(2346077) 7 digit numeric  value. This will be unique
> for each request.
> Regular expression I used in Regular expression extractor is - *Var
> workID=(.?);* to extract above value.

The RE says to match

Var workID=

followed by
. => any single character
? => which may be omitted

followed by ';'

However, the text you want to match is

var workID=2346077;

which uses a lower-case "v", and has a multi-digit id.

So it's not surprising that the id is not extracted.

One way to build an RE is as follows:

1) start with the source text:

var workID=2346077;

2) escape any meta-characters

there are none in this case

3) add capture brackets round the part you want to extract

var workID=(2346077);

4) replace the variable parts of the string with suitable wild-card characters.

In this case, you want to capture the variable digits:

var workID=(\d+);

5) optimise if necessary to avoid back-tracking

Not necessary here

6) Test, and test again using actual data

e.g. Regexp tester from
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#View_Results_Tree

Or ORO web-page:

http://jakarta.apache.org/oro/demo.html

>
> Thanks for response again and ask me more if you need details to help me
> out. For more i am giving http request sequence below
>
> first request, response of which will contain workID -
> *http://ecm-test/livelink/llisapi.dll?func=ll&objId=2053015&objAction=initiate&paneindex=0&viewType=1&nexturl=%2Flivelink%2Fllisapi%2Edll%3Ffunc%3Dll%26objId%3D2047295%26objAction%3Dbrowse%26sort%3Dname*
>
> next request, which uses the workID obtained from first request
>
> *http://ecm-test/livelink/llisapi.dll?func=work.EditTask&workid=2346077&subworkid=2346077&taskid=5&nexturl=http%3A//ecm-test/livelink/llisapi.dll/open/Tracker_Control_Panel*
>
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/Http-response-message-data-issue-tp4525619p4525790.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message