You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by pascal NICOLAS <pa...@yahoo.fr> on 2006/01/08 18:25:51 UTC

Get dynamic variable (sessionID)

Hi All,
I'm a beginner with Jmeter and I would like to
simulate some users on the jsp application.
I created my project with proxy but when I execute it,
my application returns errors for some requests.
The error appears when my request uses a dynamic
parameter.
My jsp application is a portal environment and we need
to manage sessionID for each user and others specific
session variable. the application regenerates these
variables dynamicly and I can't put them "in hard" in
the project.

It seems that we can collect dynamic variable with
regular expression but I don't find the good way or
syntax to collect them.


Example:
request 1 : connection to portal - generate unique
sessionID for my user.
request 2 : need to use this sessionID value to use
correctly the web application.

Can you help me on this point ?
Regards,
pascal.


	

	
		
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com

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


Re: Get dynamic variable (sessionID)

Posted by giridharan kesavan <gi...@gmail.com>.
Have you tried using "HTTP URL Re-writing Modifier"
You can mention the Session Argument name, so that it extracts the session
value
and passes as an arguement to every request jmeter places.

Hope this Helps.

Rgds,
Giri

On 1/10/06, pascal NICOLAS <pa...@yahoo.fr> wrote:
>
> I don't find solution to get correctly my variable.
> I must write bad something in my project.
> I use Jmeter 2.1.1.
>
>
> The request /Portal/syndication.do  returns this html
> string (html code of View Result Tree) :
> <html>
> <head>
> <meta http-equiv="refresh"
>
> content="0;url=/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=3c7f76115d775182:1006d75:108afbf3964:-77b4&com.sas.bip.sessionid=3c7f76115d775182:1006d75:108afbf3964:-77b4&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29">
> </head>
> </html>
>
> I put my regular expression as child of this request.
> Ref Name : sessionID
> RegExp :
>
> &com.sas.bip.sessionid=([a-zA-Z0-9]+:[a-zA-Z0-9.]+:[a-zA-Z0-9.]+:[-a-zA-Z0-9.]+)&
> Template : $1$
> Default : NOTHING
>
> I validated my regular expression in "Vi" and
> "RegexSR" and it works.
> but in Jmeter, no way !!
> I don't understand why.
>
> Do I put the RE extractor at the good place (child of
> request  /Portal/syndication.do) ?
> How can I validate the "good" regular expression for
> Jmeter ?
>
> The html code is in the header tag. Is it a problem ?
>
> Thanks in advance,
> pascal.
>
> --- Noam Paz <no...@db.com> a écrit:
>
> >
> >
> >
> >
> >
> > Pascal,
> > you can log the value to jmeter.log.
> > Another suggestion: since you extract the value, you
> > are probably to send it in a later request.
> > Use a "View Results Tree"-listener und uncheck the
> > "Log Errors Only" flag.
> > Choosing the "Request" tab you see the requests'
> > parameter.
> > Hope that helps
> >
> > Best regards / Viele Grüße
> >
> > Noam Paz
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >              pascal NICOLAS <pa...@yahoo.fr>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >              09.01.2006 15:38
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >                                  To
> >
> >
> >
> >
> >
> >
> >
> >                                     JMeter Users
> > List <jm...@jakarta.apache.org>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >                                  cc
> >
> >
> >
> >                                       Please respond
> > to
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >                     "JMeter Users List"
> > <jm...@jakarta.apache.org>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >                                          Subject
> >
> >
> >
> >
> >
> >
> >
> >                                     Re: Get dynamic
> > variable (sessionID)
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> === message truncated ===
>
>
>
>
>
>
>
>
> ___________________________________________________________________________
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez sur http://fr.messenger.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Get dynamic variable (sessionID)

Posted by pascal NICOLAS <pa...@yahoo.fr>.
Amazing !!
Your RE extractor works fine.
Thanks you for your help,
Pascal. 

--- sebb <se...@gmail.com> a écrit :

> On 10/01/06, pascal NICOLAS <pa...@yahoo.fr>
> wrote:
> > I don't find solution to get correctly my
> variable.
> > I must write bad something in my project.
> > I use Jmeter 2.1.1.
> >
> >
> > The request /Portal/syndication.do  returns this
> html
> > string (html code of View Result Tree) :
> > <html>
> > <head>
> > <meta http-equiv="refresh"
> >
>
content="0;url=/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=3c7f76115d775182:1006d75:108afbf3964:-77b4&com.sas.bip.sessionid=3c7f76115d775182:1006d75:108afbf3964:-77b4&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29">
> > </head>
> > </html>
> >
> > I put my regular expression as child of this
> request.
> > Ref Name : sessionID
> > RegExp :
> >
>
&com.sas.bip.sessionid=([a-zA-Z0-9]+:[a-zA-Z0-9.]+:[a-zA-Z0-9.]+:[-a-zA-Z0-9.]+)&
> 
> This is different from the previous RE you posted,
> where you were
> looking for saspfs_sessionid.
> 
> Also, the "." characters should really be escaped:
> 
> com\.sas\.bip\.sessionid
> 
> Not sure why you are including "." in the character
> classes; the
> example does not have "." in the session id.
> 
> You could try:
> 
> com\.sas\.bip\.sessionid=([-a-z0-9:]+)
> 
> > Template : $1$
> > Default : NOTHING
> >
> > I validated my regular expression in "Vi" and
> > "RegexSR" and it works.
> > but in Jmeter, no way !!
> > I don't understand why.
> >
> > Do I put the RE extractor at the good place (child
> of
> > request  /Portal/syndication.do) ?
> 
> Yes, so long as that is the request that generates
> the response.
> 
> > How can I validate the "good" regular expression
> for
> > Jmeter ?
> >
> > The html code is in the header tag. Is it a
> problem ?
> 
> No, it is still part of the body of the page.
> 
> Make sure you set the "Response Field to check" as
> Body, and not Headers.
> "Headers" refers to the HTTP headers (e.g.
> Set-Cookie, Content-Type).
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> 
> 



	

	
		
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com

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


Re: Get dynamic variable (sessionID)

Posted by sebb <se...@gmail.com>.
On 10/01/06, pascal NICOLAS <pa...@yahoo.fr> wrote:
> I don't find solution to get correctly my variable.
> I must write bad something in my project.
> I use Jmeter 2.1.1.
>
>
> The request /Portal/syndication.do  returns this html
> string (html code of View Result Tree) :
> <html>
> <head>
> <meta http-equiv="refresh"
> content="0;url=/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=3c7f76115d775182:1006d75:108afbf3964:-77b4&com.sas.bip.sessionid=3c7f76115d775182:1006d75:108afbf3964:-77b4&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29">
> </head>
> </html>
>
> I put my regular expression as child of this request.
> Ref Name : sessionID
> RegExp :
> &com.sas.bip.sessionid=([a-zA-Z0-9]+:[a-zA-Z0-9.]+:[a-zA-Z0-9.]+:[-a-zA-Z0-9.]+)&

This is different from the previous RE you posted, where you were
looking for saspfs_sessionid.

Also, the "." characters should really be escaped:

com\.sas\.bip\.sessionid

Not sure why you are including "." in the character classes; the
example does not have "." in the session id.

You could try:

com\.sas\.bip\.sessionid=([-a-z0-9:]+)

> Template : $1$
> Default : NOTHING
>
> I validated my regular expression in "Vi" and
> "RegexSR" and it works.
> but in Jmeter, no way !!
> I don't understand why.
>
> Do I put the RE extractor at the good place (child of
> request  /Portal/syndication.do) ?

Yes, so long as that is the request that generates the response.

> How can I validate the "good" regular expression for
> Jmeter ?
>
> The html code is in the header tag. Is it a problem ?

No, it is still part of the body of the page.

Make sure you set the "Response Field to check" as Body, and not Headers.
"Headers" refers to the HTTP headers (e.g. Set-Cookie, Content-Type).

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


Re: Get dynamic variable (sessionID)

Posted by pascal NICOLAS <pa...@yahoo.fr>.
I don't find solution to get correctly my variable.
I must write bad something in my project. 
I use Jmeter 2.1.1.


The request /Portal/syndication.do  returns this html
string (html code of View Result Tree) :
<html>
<head>
<meta http-equiv="refresh"
content="0;url=/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=3c7f76115d775182:1006d75:108afbf3964:-77b4&com.sas.bip.sessionid=3c7f76115d775182:1006d75:108afbf3964:-77b4&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29">
</head>
</html>

I put my regular expression as child of this request.
Ref Name : sessionID
RegExp :
&com.sas.bip.sessionid=([a-zA-Z0-9]+:[a-zA-Z0-9.]+:[a-zA-Z0-9.]+:[-a-zA-Z0-9.]+)&
Template : $1$
Default : NOTHING

I validated my regular expression in "Vi" and
"RegexSR" and it works.
but in Jmeter, no way !!
I don't understand why.

Do I put the RE extractor at the good place (child of
request  /Portal/syndication.do) ?
How can I validate the "good" regular expression for
Jmeter ?

The html code is in the header tag. Is it a problem ?

Thanks in advance,
pascal.

--- Noam Paz <no...@db.com> a écrit :

> 
> 
> 
> 
> 
> Pascal,
> you can log the value to jmeter.log.
> Another suggestion: since you extract the value, you
> are probably to send it in a later request.
> Use a "View Results Tree"-listener und uncheck the
> "Log Errors Only" flag.
> Choosing the "Request" tab you see the requests'
> parameter.
> Hope that helps
> 
> Best regards / Viele Grüße
> 
> Noam Paz
> 
> 
> 
> 
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                       
>              pascal NICOLAS <pa...@yahoo.fr>    
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                       
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                       
>              09.01.2006 15:38                       
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                  To
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                     JMeter Users
> List <jm...@jakarta.apache.org>               
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                           
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                  cc
>                                                     
>                                                     
>                                                     
>                                       Please respond
> to                                                  
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                       
>                                                     
>                                                     
>                                                     
>                     "JMeter Users List"
> <jm...@jakarta.apache.org>                    
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                          Subject
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                     Re: Get dynamic
> variable (sessionID)                                
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                        
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>                                                     
>  
=== message truncated ===



	

	
		
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com

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


Re: Get dynamic variable (sessionID)

Posted by Noam Paz <no...@db.com>.




Pascal,
you can log the value to jmeter.log.
Another suggestion: since you extract the value, you are probably to send it in a later request.
Use a "View Results Tree"-listener und uncheck the "Log Errors Only" flag.
Choosing the "Request" tab you see the requests' parameter.
Hope that helps

Best regards / Viele Grüße

Noam Paz




                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
             pascal NICOLAS <pa...@yahoo.fr>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
             09.01.2006 15:38                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              To 
                                                                                                                                                                                                                                                                                                                                                                                                                       JMeter Users List <jm...@jakarta.apache.org>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           cc 
                                                                                                                                                                                                     Please respond to                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                   "JMeter Users List" <jm...@jakarta.apache.org>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Subject 
                                                                                                                                                                                                                                                                                                                                                                                                                       Re: Get dynamic variable (sessionID)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              




OK.
I'm going to test it.
Is there a way to validate the result of RE extractor
?
I don't find element to do it.
Pascal.
--- sebb <se...@gmail.com> a écrit :

> Unless there can be more than occurrence of
> saspfs_sessionid on the
> page, I suggest simplifying the expression as
> follows:
>
>
&saspfs_sessionid=([a-zA-Z0-9]+:[a-zA-Z0-9.]+:[a-zA-Z0-9.]+:[-a-zA-Z0-9.]+)&
>
> Make sure that the RE extractor is added as a child
> of the Sampler
> that retrieves the page with the sessionid in it.
>
> If it is added at the same level as the sampler, it
> will be activated
> after every sample at the same level:
>
>
http://jakarta.apache.org/jmeter/usermanual/build-test-plan.html#scoping_rules
>
> The sessionId will be overwritten with NOTHING if a
> later sample does
> not match the RE.
>
> S.
> On 09/01/06, pascal NICOLAS <pa...@yahoo.fr>
> wrote:
> > Hi All,
> > I added a Regular Expression Extractor to get the
> > value of my sessionID.
> > The request which generates the sessionID returns
> this
> > html code :
> > /**************************/
> > <html><head>
> > <meta http-equiv="refresh"
> >
>
content="0;url=/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=3c7f76115d775182:1006d75:108af7146f1:-7d94&com.sas.bip.sessionid=3c7f76115d775182:1006d75:108af7146f1:-7d94&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29">
> > </head></html>
> > /**************************/
> >
> > To get the value of variable saspfs_sessionid, I
> added
> > the follow Regular Expression extractor :
> > Ref Name : sessionID
> >
> > Regular Expression:
> > <meta http-equiv="refresh"
> >
>
content="0;url=/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=([a-zA-Z0-9]+:[a-zA-Z0-9.]+:[a-zA-Z0-9.]+:[-a-zA-Z0-9.]+)&com.sas.bip.sessionid=3c7f76115d775182:1006d75:108af7146f1:-7d94&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29">
> >
> > Template : $1$
> > Default Value : NOTHING
> >
> > I modified requests which use this variable with
> > ${sessionID} variable.
> > but When I validate the request, I have it :
> > Query data:
> >
>
_program=SIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29&_action=strip&_debug=&_odsdest=&_odsstyle=&_gopt_device=
> > Referer:
> >
>
http://midbv:7001/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=NOTHING&com.sas.bip.sessionid=NOTHING&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29
> > Host: midbv:7001
> > ../..
> >
> > The value NOTHING is in the request, not my result
> > value of the regular expression.
> >
> > I'm validating my regular expression in RegexSR
> tool
> > and it works correctly.
> >
> > How can I get correctly the value of variable  ?
> > Pascal.
> >
> > --- pascal NICOLAS <pa...@yahoo.fr> a écrit:
> >
> > > Hi All,
> > > I'm a beginner with Jmeter and I would like to
> > > simulate some users on the jsp application.
> > > I created my project with proxy but when I
> execute
> > > it,
> > > my application returns errors for some requests.
> > > The error appears when my request uses a dynamic
> > > parameter.
> > > My jsp application is a portal environment and
> we
> > > need
> > > to manage sessionID for each user and others
> > > specific
> > > session variable. the application regenerates
> these
> > > variables dynamicly and I can't put them "in
> hard"
> > > in
> > > the project.
> > >
> > > It seems that we can collect dynamic variable
> with
> > > regular expression but I don't find the good way
> or
> > > syntax to collect them.
> > >
> > >
> > > Example:
> > > request 1 : connection to portal - generate
> unique
> > > sessionID for my user.
> > > request 2 : need to use this sessionID value to
> use
> > > correctly the web application.
> > >
> > > Can you help me on this point ?
> > > Regards,
> > > pascal.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
___________________________________________________________________________
> > >
> > > Nouveau : téléphonez moins cher avec Yahoo!
> > > Messenger ! Découvez les tarifs exceptionnels
> pour
> > > appeler la France et l'international.
> > > Téléchargez sur http://fr.messenger.yahoo.com
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > jmeter-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> >
> >
> >
> >
> >
> >
>
___________________________________________________________________________
> > Nouveau : téléphonez moins cher avec Yahoo!
> Messenger ! Découvez les tarifs exceptionnels pour
> appeler la France et l'international.
> > Téléchargez sur http://fr.messenger.yahoo.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
>
>







___________________________________________________________________________
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com

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




--

Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


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


Re: Get dynamic variable (sessionID)

Posted by pascal NICOLAS <pa...@yahoo.fr>.
OK.
I'm going to test it.
Is there a way to validate the result of RE extractor
?
I don't find element to do it.
Pascal.
--- sebb <se...@gmail.com> a écrit :

> Unless there can be more than occurrence of
> saspfs_sessionid on the
> page, I suggest simplifying the expression as
> follows:
> 
>
&saspfs_sessionid=([a-zA-Z0-9]+:[a-zA-Z0-9.]+:[a-zA-Z0-9.]+:[-a-zA-Z0-9.]+)&
> 
> Make sure that the RE extractor is added as a child
> of the Sampler
> that retrieves the page with the sessionid in it.
> 
> If it is added at the same level as the sampler, it
> will be activated
> after every sample at the same level:
> 
>
http://jakarta.apache.org/jmeter/usermanual/build-test-plan.html#scoping_rules
> 
> The sessionId will be overwritten with NOTHING if a
> later sample does
> not match the RE.
> 
> S.
> On 09/01/06, pascal NICOLAS <pa...@yahoo.fr>
> wrote:
> > Hi All,
> > I added a Regular Expression Extractor to get the
> > value of my sessionID.
> > The request which generates the sessionID returns
> this
> > html code :
> > /**************************/
> > <html><head>
> > <meta http-equiv="refresh"
> >
>
content="0;url=/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=3c7f76115d775182:1006d75:108af7146f1:-7d94&com.sas.bip.sessionid=3c7f76115d775182:1006d75:108af7146f1:-7d94&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29">
> > </head></html>
> > /**************************/
> >
> > To get the value of variable saspfs_sessionid, I
> added
> > the follow Regular Expression extractor :
> > Ref Name : sessionID
> >
> > Regular Expression:
> > <meta http-equiv="refresh"
> >
>
content="0;url=/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=([a-zA-Z0-9]+:[a-zA-Z0-9.]+:[a-zA-Z0-9.]+:[-a-zA-Z0-9.]+)&com.sas.bip.sessionid=3c7f76115d775182:1006d75:108af7146f1:-7d94&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29">
> >
> > Template : $1$
> > Default Value : NOTHING
> >
> > I modified requests which use this variable with
> > ${sessionID} variable.
> > but When I validate the request, I have it :
> > Query data:
> >
>
_program=SIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29&_action=strip&_debug=&_odsdest=&_odsstyle=&_gopt_device=
> > Referer:
> >
>
http://midbv:7001/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=NOTHING&com.sas.bip.sessionid=NOTHING&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29
> > Host: midbv:7001
> > ../..
> >
> > The value NOTHING is in the request, not my result
> > value of the regular expression.
> >
> > I'm validating my regular expression in RegexSR
> tool
> > and it works correctly.
> >
> > How can I get correctly the value of variable  ?
> > Pascal.
> >
> > --- pascal NICOLAS <pa...@yahoo.fr> a écrit:
> >
> > > Hi All,
> > > I'm a beginner with Jmeter and I would like to
> > > simulate some users on the jsp application.
> > > I created my project with proxy but when I
> execute
> > > it,
> > > my application returns errors for some requests.
> > > The error appears when my request uses a dynamic
> > > parameter.
> > > My jsp application is a portal environment and
> we
> > > need
> > > to manage sessionID for each user and others
> > > specific
> > > session variable. the application regenerates
> these
> > > variables dynamicly and I can't put them "in
> hard"
> > > in
> > > the project.
> > >
> > > It seems that we can collect dynamic variable
> with
> > > regular expression but I don't find the good way
> or
> > > syntax to collect them.
> > >
> > >
> > > Example:
> > > request 1 : connection to portal - generate
> unique
> > > sessionID for my user.
> > > request 2 : need to use this sessionID value to
> use
> > > correctly the web application.
> > >
> > > Can you help me on this point ?
> > > Regards,
> > > pascal.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
___________________________________________________________________________
> > >
> > > Nouveau : téléphonez moins cher avec Yahoo!
> > > Messenger ! Découvez les tarifs exceptionnels
> pour
> > > appeler la France et l'international.
> > > Téléchargez sur http://fr.messenger.yahoo.com
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > jmeter-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> >
> >
> >
> >
> >
> >
>
___________________________________________________________________________
> > Nouveau : téléphonez moins cher avec Yahoo!
> Messenger ! Découvez les tarifs exceptionnels pour
> appeler la France et l'international.
> > Téléchargez sur http://fr.messenger.yahoo.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
> 
> 



	

	
		
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com

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


Re: Get dynamic variable (sessionID)

Posted by sebb <se...@gmail.com>.
Unless there can be more than occurrence of saspfs_sessionid on the
page, I suggest simplifying the expression as follows:

&saspfs_sessionid=([a-zA-Z0-9]+:[a-zA-Z0-9.]+:[a-zA-Z0-9.]+:[-a-zA-Z0-9.]+)&

Make sure that the RE extractor is added as a child of the Sampler
that retrieves the page with the sessionid in it.

If it is added at the same level as the sampler, it will be activated
after every sample at the same level:

http://jakarta.apache.org/jmeter/usermanual/build-test-plan.html#scoping_rules

The sessionId will be overwritten with NOTHING if a later sample does
not match the RE.

S.
On 09/01/06, pascal NICOLAS <pa...@yahoo.fr> wrote:
> Hi All,
> I added a Regular Expression Extractor to get the
> value of my sessionID.
> The request which generates the sessionID returns this
> html code :
> /**************************/
> <html><head>
> <meta http-equiv="refresh"
> content="0;url=/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=3c7f76115d775182:1006d75:108af7146f1:-7d94&com.sas.bip.sessionid=3c7f76115d775182:1006d75:108af7146f1:-7d94&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29">
> </head></html>
> /**************************/
>
> To get the value of variable saspfs_sessionid, I added
> the follow Regular Expression extractor :
> Ref Name : sessionID
>
> Regular Expression:
> <meta http-equiv="refresh"
> content="0;url=/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=([a-zA-Z0-9]+:[a-zA-Z0-9.]+:[a-zA-Z0-9.]+:[-a-zA-Z0-9.]+)&com.sas.bip.sessionid=3c7f76115d775182:1006d75:108af7146f1:-7d94&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29">
>
> Template : $1$
> Default Value : NOTHING
>
> I modified requests which use this variable with
> ${sessionID} variable.
> but When I validate the request, I have it :
> Query data:
> _program=SIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29&_action=strip&_debug=&_odsdest=&_odsstyle=&_gopt_device=
> Referer:
> http://midbv:7001/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=NOTHING&com.sas.bip.sessionid=NOTHING&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29
> Host: midbv:7001
> ../..
>
> The value NOTHING is in the request, not my result
> value of the regular expression.
>
> I'm validating my regular expression in RegexSR tool
> and it works correctly.
>
> How can I get correctly the value of variable  ?
> Pascal.
>
> --- pascal NICOLAS <pa...@yahoo.fr> a écrit:
>
> > Hi All,
> > I'm a beginner with Jmeter and I would like to
> > simulate some users on the jsp application.
> > I created my project with proxy but when I execute
> > it,
> > my application returns errors for some requests.
> > The error appears when my request uses a dynamic
> > parameter.
> > My jsp application is a portal environment and we
> > need
> > to manage sessionID for each user and others
> > specific
> > session variable. the application regenerates these
> > variables dynamicly and I can't put them "in hard"
> > in
> > the project.
> >
> > It seems that we can collect dynamic variable with
> > regular expression but I don't find the good way or
> > syntax to collect them.
> >
> >
> > Example:
> > request 1 : connection to portal - generate unique
> > sessionID for my user.
> > request 2 : need to use this sessionID value to use
> > correctly the web application.
> >
> > Can you help me on this point ?
> > Regards,
> > pascal.
> >
> >
> >
> >
> >
> >
> >
> ___________________________________________________________________________
> >
> > Nouveau : téléphonez moins cher avec Yahoo!
> > Messenger ! Découvez les tarifs exceptionnels pour
> > appeler la France et l'international.
> > Téléchargez sur http://fr.messenger.yahoo.com
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> >
> >
>
>
>
>
>
>
>
> ___________________________________________________________________________
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez sur http://fr.messenger.yahoo.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


RE: Get dynamic variable (sessionID)

Posted by pascal NICOLAS <pa...@yahoo.fr>.
Hi All,
I added a Regular Expression Extractor to get the
value of my sessionID.
The request which generates the sessionID returns this
html code :
/**************************/
<html><head>
<meta http-equiv="refresh"
content="0;url=/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=3c7f76115d775182:1006d75:108af7146f1:-7d94&com.sas.bip.sessionid=3c7f76115d775182:1006d75:108af7146f1:-7d94&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29">
</head></html>
/**************************/

To get the value of variable saspfs_sessionid, I added
the follow Regular Expression extractor :
Ref Name : sessionID

Regular Expression:
<meta http-equiv="refresh"
content="0;url=/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=([a-zA-Z0-9]+:[a-zA-Z0-9.]+:[a-zA-Z0-9.]+:[-a-zA-Z0-9.]+)&com.sas.bip.sessionid=3c7f76115d775182:1006d75:108af7146f1:-7d94&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29">

Template : $1$
Default Value : NOTHING

I modified requests which use this variable with
${sessionID} variable.
but When I validate the request, I have it :
Query data:
_program=SIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29&_action=strip&_debug=&_odsdest=&_odsstyle=&_gopt_device=
Referer:
http://midbv:7001/SASStoredProcess/do?_action=form,properties&saspfs_sessionid=NOTHING&com.sas.bip.sessionid=NOTHING&saspfs_sessionrequest=session1&_program=SBIP%3A%2F%2FFoundation%2FSamples%2FStored+Processes%2Fstppublish%28StoredProcess%29
Host: midbv:7001
../..

The value NOTHING is in the request, not my result
value of the regular expression.

I'm validating my regular expression in RegexSR tool
and it works correctly.

How can I get correctly the value of variable  ?
Pascal.

--- pascal NICOLAS <pa...@yahoo.fr> a écrit :

> Hi All,
> I'm a beginner with Jmeter and I would like to
> simulate some users on the jsp application.
> I created my project with proxy but when I execute
> it,
> my application returns errors for some requests.
> The error appears when my request uses a dynamic
> parameter.
> My jsp application is a portal environment and we
> need
> to manage sessionID for each user and others
> specific
> session variable. the application regenerates these
> variables dynamicly and I can't put them "in hard"
> in
> the project.
> 
> It seems that we can collect dynamic variable with
> regular expression but I don't find the good way or
> syntax to collect them.
> 
> 
> Example:
> request 1 : connection to portal - generate unique
> sessionID for my user.
> request 2 : need to use this sessionID value to use
> correctly the web application.
> 
> Can you help me on this point ?
> Regards,
> pascal.
> 
> 
> 	
> 
> 	
> 		
>
___________________________________________________________________________
> 
> Nouveau : téléphonez moins cher avec Yahoo!
> Messenger ! Découvez les tarifs exceptionnels pour
> appeler la France et l'international.
> Téléchargez sur http://fr.messenger.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> 
> 



	

	
		
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com

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