You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by aidy lewis <ai...@googlemail.com> on 2007/07/05 16:59:47 UTC

RE extractor

Hi,

I am having problems making the RE extractor to work.

The Test Plan looks like this

HTTP Request
www.google.co.uk

BeanShell PostProcessor   //sebb informs us there is a bug in the
postprocessor and works like
print("${test}");	  //a pre-processor

Regular Expression Extractor
ref name:  test
RegEx:  (.*)
Template $0$
Match No 1
Default Value: "Token Not found".

The returned result = ${test}

I attach the jmx

Thank You

Aidy

Re: Listeners - lt (latency ms) attribute

Posted by sebb <se...@gmail.com>.
On 05/07/07, Fleming, Scott A <sc...@hp.com> wrote:
>
> Hello.
>
> I'm trying to get a feel for how the latency (lt) attribute works within
> jmeter.  How does this attribute relate to elapsed time (t) or are they
> related at all?

Latency <= Elapsed

> And, should latency be a higher number than the elapsed
> time total?

Never.

> I guess the way I'm thinking, latency is the reaction time from first
> byte received after message ack.  But not sure, so wanted to ask.

Time to first response. There will generally be more than 1 byte in
the response.

Only a few samplers implement latency (otherwise it will be zero), and
none currently stop the timer on receipt of the first byte.

> Thanks for any info.  I see some in the docs, but it really does not
> cover or explain what the attribute really does.  Just that it provides
> latency information in m.seconds, etc.
>
> Have a good day.
> -scott
>
> ---------------------------------------------------------------------
> 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


Listeners - lt (latency ms) attribute

Posted by "Fleming, Scott A" <sc...@hp.com>.
Hello.

I'm trying to get a feel for how the latency (lt) attribute works within
jmeter.  How does this attribute relate to elapsed time (t) or are they
related at all?  And, should latency be a higher number than the elapsed
time total?

I guess the way I'm thinking, latency is the reaction time from first
byte received after message ack.  But not sure, so wanted to ask.

Thanks for any info.  I see some in the docs, but it really does not
cover or explain what the attribute really does.  Just that it provides
latency information in m.seconds, etc.

Have a good day.
-scott

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


Re: Query regarding Http Sampler

Posted by Matt <ma...@gmail.com>.
Record the process twice, and remove the gifs, jpgs etc that are to be
cached in the 2nd iteration, then loop the 2nd iteration.

Matt

On 06/07/07, Manikandan Sukumar <Ma...@infosys.com> wrote:
>
> Sorry about the previous one. The question was framed in a wrong way.
>
>
>
> I am testing a webpage using Jmeter. The problem I face is that the
> embedded resources are getting downloaded for every page in a script even if
> the download link/url is the same in a single iteration. Is there any way to
> avoid it downloading every time for diff page if the URL is same?
>
>
>
> Is this the normal way to go about?
>
>
>
> Thanks in advance
>
> Manikandan
>
>
>
>
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Manikandan Sukumar [mailto:Manikandan_S06@infosys.com]
> Sent: Friday, July 06, 2007 9:13 AM
> To: JMeter Users List
> Subject: Query regarding Http Sampler
>
>
>
>
>
> Hi
>
> I am trying to test a webpage using jmeter. The only issue is that the
> embedded resources are downloaded for every iteration. By resource I mean
> the .gif, .jpg and other files
>
> In Loadrunner or Webload the resource is cached and hence it does not
> download everytime.
>
>
>
> Can anyone suggest on how to go about it?
>
> Is it the normal way around?
>
>
>
> Thanks in advance
>
> Manikandan
>
>
>
> **************** CAUTION - Disclaimer *****************
>
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
> solely for the use of the addressee(s). If you are not the intended
> recipient, please notify the sender by e-mail and delete the original
> message. Further, you are not to copy, disclose, or distribute this e-mail
> or its contents to any other person and any such actions are unlawful. This
> e-mail may contain viruses. Infosys has taken every reasonable precaution to
> minimize this risk, but is not liable for any damage you may sustain as a
> result of any virus in this e-mail. You should carry out your own virus
> checks before opening the e-mail or attachment. Infosys reserves the right
> to monitor and review the content of all messages sent to or from this
> e-mail address. Messages sent to or from this e-mail address may be stored
> on the Infosys e-mail system.
>
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
>
>
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>

Query regarding Http Sampler

Posted by Manikandan Sukumar <Ma...@infosys.com>.
Sorry about the previous one. The question was framed in a wrong way.



I am testing a webpage using Jmeter. The problem I face is that the embedded resources are getting downloaded for every page in a script even if the download link/url is the same in a single iteration. Is there any way to avoid it downloading every time for diff page if the URL is same?



Is this the normal way to go about?



Thanks in advance

Manikandan













-----Original Message-----
From: Manikandan Sukumar [mailto:Manikandan_S06@infosys.com]
Sent: Friday, July 06, 2007 9:13 AM
To: JMeter Users List
Subject: Query regarding Http Sampler





Hi

I am trying to test a webpage using jmeter. The only issue is that the embedded resources are downloaded for every iteration. By resource I mean the .gif, .jpg and other files

In Loadrunner or Webload the resource is cached and hence it does not download everytime.



Can anyone suggest on how to go about it?

Is it the normal way around?



Thanks in advance

Manikandan



**************** CAUTION - Disclaimer *****************

This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.

***INFOSYS******** End of Disclaimer ********INFOSYS***



---------------------------------------------------------------------

To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org

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



Query regarding Http Sampler

Posted by Manikandan Sukumar <Ma...@infosys.com>.
Hi
I am trying to test a webpage using jmeter. The only issue is that the embedded resources are downloaded for every iteration. By resource I mean the .gif, .jpg and other files
In Loadrunner or Webload the resource is cached and hence it does not download everytime.

Can anyone suggest on how to go about it?
Is it the normal way around?

Thanks in advance
Manikandan

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

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


Re: RE extractor

Posted by sebb <se...@gmail.com>.
On 06/07/07, aidy lewis <ai...@googlemail.com> wrote:
> Hi Guys,
>
> Using the RE Extractor and a sampler with reference name as it's title
>  eg. sampler_${test}
>
> Works fine.

Because quotes are allowed in the name.

> Just having problems with the BeanShell post-processor.

Quotes are not allowed inside quoted strings, unless doubled up.

However, one can use:

print(vars.get("variablename"));

> Thanks
>
> Aidy
>
>
>
> On 06/07/07, aidy lewis <ai...@googlemail.com> wrote:
> > Hi Sebb et al
> >
> > I appreciate the time you have given me, but would it be possible for
> > someone to send me a jmx file with the RE Extractor and beanshell
> > post-processor working together?
> >
> > Thanks
> >
> > Aidy
> >
>
> ---------------------------------------------------------------------
> 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: RE extractor

Posted by aidy lewis <ai...@googlemail.com>.
Hi Guys,

Using the RE Extractor and a sampler with reference name as it's title
 eg. sampler_${test}

Works fine. Just having problems with the BeanShell post-processor.

Thanks

Aidy



On 06/07/07, aidy lewis <ai...@googlemail.com> wrote:
> Hi Sebb et al
>
> I appreciate the time you have given me, but would it be possible for
> someone to send me a jmx file with the RE Extractor and beanshell
> post-processor working together?
>
> Thanks
>
> Aidy
>

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


Re: RE extractor

Posted by aidy lewis <ai...@googlemail.com>.
Hi Sebb et al

I appreciate the time you have given me, but would it be possible for
someone to send me a jmx file with the RE Extractor and beanshell
post-processor working together?

Thanks

Aidy

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


Re: RE extractor

Posted by sebb <se...@gmail.com>.
On 05/07/07, aidy lewis <ai...@googlemail.com> wrote:
> On 05/07/07, sebb <se...@gmail.com> wrote:
> > On 05/07/07, aidy lewis <ai...@googlemail.com> wrote:
> > > Hi,
> > >
> > > I am having problems making the RE extractor to work.
> > >
> > > The Test Plan looks like this
> > >
> > > HTTP Request
> > > www.google.co.uk
> > >
> > > BeanShell PostProcessor   //sebb informs us there is a bug in the
> > > postprocessor and works like
> > > print("${test}");         //a pre-processor
> >
> > No, I said that the post-processors run in reverse order.
>
> OK. Then I am confused on what the difference is between a
> pre-processor and a post-processor running in reverse order.

If there are multiple Post-Processors, they run in reverse order in
JMeter 2.2 and below, which is why the Beanshell needed to be before
the RE.

A pre-processor runs before the sampler.

> >
> > > Regular Expression Extractor
> > > ref name:  test
> > > RegEx:  (.*)
> > > Template $0$
> >
> > Do you really want to match everything?
>
> No, but just using this as a test
> >
> > > Match No 1
> > > Default Value: "Token Not found".
> >
> > No need for enclosing quotes.
> >
> > > The returned result = ${test}
> > >
> >
> > The problem is the print command:
> >
> > print("${test}");
> >
> > The variable contains quotes, and these mess up the Java syntax.
>
> However, if I create a user parameter of 'test' with any value this command
> print("${test}") prints the value to the command window,

Not any value. Try setting:

test  = abcd"efgh


>
> >
> > Check the log and you will see some errors.
> >
> > If a test does not behave as you expect, please always check the log for errors.
> >
> I am receiving this
>
> Caused by: Parse error at line 1, column 6.  Encountered: (
>        at bsh.Parser.generateParseException(Unknown Source)
>        at bsh.Parser.jj_consume_token(Unknown Source)
>        at bsh.Parser.Statement(Unknown Source)
>        at bsh.Parser.BlockStatement(Unknown Source)
>        at bsh.Parser.Line(Unknown Source)
>        at bsh.Interpreter.Line(Unknown Source)
>        at bsh.Interpreter.eval(Unknown Source)
>        at bsh.Interpreter.eval(Unknown Source)
>        at bsh.Interpreter.eval(Unknown Source)

Exactly.

> Thank you
>
> Aidy
>
> ---------------------------------------------------------------------
> 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: RE extractor

Posted by aidy lewis <ai...@googlemail.com>.
On 05/07/07, sebb <se...@gmail.com> wrote:
> On 05/07/07, aidy lewis <ai...@googlemail.com> wrote:
> > Hi,
> >
> > I am having problems making the RE extractor to work.
> >
> > The Test Plan looks like this
> >
> > HTTP Request
> > www.google.co.uk
> >
> > BeanShell PostProcessor   //sebb informs us there is a bug in the
> > postprocessor and works like
> > print("${test}");         //a pre-processor
>
> No, I said that the post-processors run in reverse order.

OK. Then I am confused on what the difference is between a
pre-processor and a post-processor running in reverse order.
>
> > Regular Expression Extractor
> > ref name:  test
> > RegEx:  (.*)
> > Template $0$
>
> Do you really want to match everything?

No, but just using this as a test
>
> > Match No 1
> > Default Value: "Token Not found".
>
> No need for enclosing quotes.
>
> > The returned result = ${test}
> >
>
> The problem is the print command:
>
> print("${test}");
>
> The variable contains quotes, and these mess up the Java syntax.

However, if I create a user parameter of 'test' with any value this command
print("${test}") prints the value to the command window,

>
> Check the log and you will see some errors.
>
> If a test does not behave as you expect, please always check the log for errors.
>
I am receiving this

Caused by: Parse error at line 1, column 6.  Encountered: (
	at bsh.Parser.generateParseException(Unknown Source)
	at bsh.Parser.jj_consume_token(Unknown Source)
	at bsh.Parser.Statement(Unknown Source)
	at bsh.Parser.BlockStatement(Unknown Source)
	at bsh.Parser.Line(Unknown Source)
	at bsh.Interpreter.Line(Unknown Source)
	at bsh.Interpreter.eval(Unknown Source)
	at bsh.Interpreter.eval(Unknown Source)
	at bsh.Interpreter.eval(Unknown Source)

Thank you

Aidy

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


Re: RE extractor

Posted by sebb <se...@gmail.com>.
On 05/07/07, aidy lewis <ai...@googlemail.com> wrote:
> Hi,
>
> I am having problems making the RE extractor to work.
>
> The Test Plan looks like this
>
> HTTP Request
> www.google.co.uk
>
> BeanShell PostProcessor   //sebb informs us there is a bug in the
> postprocessor and works like
> print("${test}");         //a pre-processor

No, I said that the post-processors run in reverse order.

> Regular Expression Extractor
> ref name:  test
> RegEx:  (.*)
> Template $0$

Do you really want to match everything?

> Match No 1
> Default Value: "Token Not found".

No need for enclosing quotes.

> The returned result = ${test}
>

The problem is the print command:

print("${test}");

The variable contains quotes, and these mess up the Java syntax.

Check the log and you will see some errors.

If a test does not behave as you expect, please always check the log for errors.

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