jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Massimo Forno" <Massimo.Fo...@deltatre.com>
Subject RE: Regular Expression
Date Tue, 20 Jun 2006 16:07:09 GMT
Hi, 
Let me send the Request where I need to extract the Id and the
successive post I send:

Request:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html
xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
<head>
<title> </title>
</head>
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<form id="__cmsNavigateForm" name="__cmsNavigateForm"
method="post"><input type="hidden" id="__cmsPageId" name="__cmsPageId"
value="765" /><input type="hidden" id="isTab" name="isTab" value="1"
/><input type="hidden" id="__cmsStartPageId" name="__cmsStartPageId"
value="107" /><input type="hidden" id="__cmsParamNames"
name="__cmsParamNames"
value="CurrentResourceID,CurrentResourceBindingID,isTab,isModal"
/><input type="hidden" id="CurrentResourceID" name="CurrentResourceID"
value="-1" />

.......


Then JMeter send:

POST http://localhost:9000/SBS/EDS/Person/List.htmx

POST data:
__cmsPageId=765&__cmsStartPageId=107&__cmsPageBack=0&__cmsActionTarget=&
__cmsAction=datasaved&CurrentResourceID=${PersonID}&isTab=0&isModal=1&__
cmsParamNames=CurrentResourceBindingID%2CCurrentResourceBindingID%2CCurr
entResourceID%2CCurrentResourceID%2CisTab%2CisModal&__cmsTmpParamsNames=
&__cmsParamPass=1

And my Reg Ex is: name=\"CurrentResourceID\" value=\"(\d+)

Thanks, 
Massimo



-----Original Message-----
From: Layton, Andrew [mailto:andrew.layton@atosorigin.com] 
Sent: Tuesday, June 20, 2006 5:56 PM
To: JMeter Users List
Subject: RE: Regular Expression

Check for a space after the RE - if you copied and pasted the RE might
be very slightly different.

I have tested this RE ... :-)

A Layton 

-----Original Message-----
From: Massimo Forno [mailto:Massimo.Forno@deltatre.com] 
Sent: 20 June 2006 16:39
To: JMeter Users List
Subject: RE: Regular Expression

Hi, 

Unfortunatly, I get the same result.

Any other idea?

-----Original Message-----
From: Layton, Andrew [mailto:andrew.layton@atosorigin.com]
Sent: Tuesday, June 20, 2006 5:11 PM
To: JMeter Users List
Subject: RE: Regular Expression

Try this lot: 

Name: PersonID

ReferenceName: PersonID

Regular Expression: name=\"ResourceID\" value=\"(\d+)

Template: $1$

Match N0. : 1

I presume that Resource ID will only be numeric.

HtH
Andrew Layton
Test Automation Consultant
-----Original Message-----
From: Massimo Forno [mailto:Massimo.Forno@deltatre.com]
Sent: 20 June 2006 15:18
To: JMeter Users List
Subject: Regular Expression

Hi, 

 

I'd like to know if I'm working correctly with RegEx.

 

I've to get an ID form the HTT Response and HTTP the code is (
name="ResourceID" value="300187") and the value changes every time the
request is performed.

 

I've been defined a Post Processor --> Regular Expression Extractor as
follow:

 

Name: PersonID

ReferenceName: PersonID

Regular Expression: name="ResourceID" value="(.+?)"

Template: $0$

Match N0. : 0

Default Value:

 

and I've inserted that element as a child of the sampler getting the
Response where I'd like to extract the ID.

 

The problem is that in the next sampler (the following) using as a Post
parameter for ResourceID the reference name ${PersonID} ,  JMeter send
as a parameter the Reference name (${PersonID) instead of the value.

 

Thank for the help,

Massimo.

 


_______________________________________________________

This e-mail and the documents attached are confidential and intended
solely for the addressee; it may also be privileged. If you receive this
e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin
group liability cannot be triggered for the message content. Although
the sender endeavours to maintain a computer virus-free network, the
sender does not warrant that this transmission is virus-free and will
not be liable for any damages resulting from any virus transmitted. 
_______________________________________________________

---------------------------------------------------------------------
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


---------------------------------------------------------------------
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