You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Rigas <ri...@yahoo.co.uk> on 2005/02/25 13:59:08 UTC
JMeter: How to reference a regexp
Hi there,
I seem to be having a problem referencing a regular expression - It's the
second time I m doing something with regexp and don't know what's wrong
I have the following regular Expression Extractor under an HttpRequest under
a Thread Group
Reference Name: subsectionid
Regular Expression: parentId=(\d*).*subsection1
Template: $1$
Match No: 0
Default Value: -1
Then in another Request I have a parameter checksubsections with the value
${subsectionid_g1}
PROBLEM: When I check the results tree, after I run the test, in the request
I see checkSubsections=${subsectionid_g1}, which means that it somehow does
not recognise that this is a variable. What am I doing wrong?
Thanks in advance
Rigas
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: JMeter: How to reference a regexp
Posted by Rigas <ri...@yahoo.co.uk>.
Hi sebb
What exactly is a JavaTest Sampler? I could not find it in JMeter but sounds
very useful because I want to be testing the values of regular expressions.
I have checked everything else but could not find a solution
> On Fri, 25 Feb 2005 14:59:08 +0200, Rigas <ri...@yahoo.co.uk> wrote:
> > Hi there,
> > I seem to be having a problem referencing a regular expression - It's
the
> > second time I m doing something with regexp and don't know what's wrong
> >
> > I have the following regular Expression Extractor under an HttpRequest
under
> > a Thread Group
> >
> > Reference Name: subsectionid
> > Regular Expression: parentId=(\d*).*subsection1
> > Template: $1$
> > Match No: 0
>
> This means select a random match - is this intended?
>
> > Default Value: -1
> >
>
> Otherwise looks OK.
>
> > Then in another Request I have a parameter checksubsections with the
value
> > ${subsectionid_g1}
> >
> > PROBLEM: When I check the results tree, after I run the test, in the
request
> > I see checkSubsections=${subsectionid_g1}, which means that it somehow
does
> > not recognise that this is a variable. What am I doing wrong?
>
> Are both the samplers in the same thread group?
>
> Are the variables spelt exactly the same (case matters)?
>
> Try adding a JavaTest sampler immediately after the original Http
> sampler to check the value(s) of the Regex variables.
>
> > Thanks in advance
> >
> > Rigas
> >
> > ---------------------------------------------------------------------
> > 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
Re: JMeter: How to reference a regexp
Posted by Korecherla <sk...@yahoo.com>.
I have a similar problem.
After generating the _StringFromFile(..) I replace it in the HTTPRequest where the value needs to be replaced.
When I run the test, it does not take any of the values.
I do not know what I am missing.
Could u please help me?
Sapna
sebb <se...@gmail.com> wrote:
On Fri, 25 Feb 2005 14:59:08 +0200, Rigas wrote:
> Hi there,
> I seem to be having a problem referencing a regular expression - It's the
> second time I m doing something with regexp and don't know what's wrong
>
> I have the following regular Expression Extractor under an HttpRequest under
> a Thread Group
>
> Reference Name: subsectionid
> Regular Expression: parentId=(\d*).*subsection1
> Template: $1$
> Match No: 0
This means select a random match - is this intended?
> Default Value: -1
>
Otherwise looks OK.
> Then in another Request I have a parameter checksubsections with the value
> ${subsectionid_g1}
>
> PROBLEM: When I check the results tree, after I run the test, in the request
> I see checkSubsections=${subsectionid_g1}, which means that it somehow does
> not recognise that this is a variable. What am I doing wrong?
Are both the samplers in the same thread group?
Are the variables spelt exactly the same (case matters)?
Try adding a JavaTest sampler immediately after the original Http
sampler to check the value(s) of the Regex variables.
> Thanks in advance
>
> Rigas
>
> ---------------------------------------------------------------------
> 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
=======================
Sapna Korecherla
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: JMeter: How to reference a regexp
Posted by sebb <se...@gmail.com>.
On Fri, 25 Feb 2005 14:59:08 +0200, Rigas <ri...@yahoo.co.uk> wrote:
> Hi there,
> I seem to be having a problem referencing a regular expression - It's the
> second time I m doing something with regexp and don't know what's wrong
>
> I have the following regular Expression Extractor under an HttpRequest under
> a Thread Group
>
> Reference Name: subsectionid
> Regular Expression: parentId=(\d*).*subsection1
> Template: $1$
> Match No: 0
This means select a random match - is this intended?
> Default Value: -1
>
Otherwise looks OK.
> Then in another Request I have a parameter checksubsections with the value
> ${subsectionid_g1}
>
> PROBLEM: When I check the results tree, after I run the test, in the request
> I see checkSubsections=${subsectionid_g1}, which means that it somehow does
> not recognise that this is a variable. What am I doing wrong?
Are both the samplers in the same thread group?
Are the variables spelt exactly the same (case matters)?
Try adding a JavaTest sampler immediately after the original Http
sampler to check the value(s) of the Regex variables.
> Thanks in advance
>
> Rigas
>
> ---------------------------------------------------------------------
> 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