On 15/10/2008, Nair, Pramod <[EMAIL PROTECTED]> wrote:
> Thank you..
>
>  Call 1: I am calling an HTTP Request forever.
>
>  Call 2: I am updating the DB using another call. This will change the
>  value in DB which will affect the response of my first call.
>
>  I want to make sure the Cache is updated real time when the value in DB
>  changes due to the Call 2.
>  What I want to do in my test plan is capture the Size in bytes for Call
>  1 - which is running forever until a request gives a different value of
>  size. This would indicate the Call 1 got updated value.

It may work - problem is that relying on the exact size of the
response is a rather fragile method.

It would be better to look for some specific text.

However, if that is not possible, then the way to find the size is to
look at the sample result :

http://jakarta.apache.org/jmeter/api/org/apache/jmeter/samplers/SampleResult.html#getBytes()

This can be done using Jexl:

http://jakarta.apache.org/jmeter/usermanual/functions.html#__jexl

as

${__jexl(sampleResult.getBytes()}

[not tested]

>  Do you think there is a workaround?
>
>
>  Thanks
>  Pramod
>
>
>  -----Original Message-----
>  From: sebb [mailto:[EMAIL PROTECTED]
>  Sent: Wednesday, October 15, 2008 4:36 PM
>  To: JMeter Users List
>  Subject: Re: Extracting "Size in bytes:"
>
>  On 15/10/2008, Nair, Pramod <[EMAIL PROTECTED]> wrote:
>  > Hi,
>  >
>  >
>  >
>  >  I'm trying to extract the "Size in bytes" value from my HTTP Response
>  >  (below) using Regular Expression Extractor. I tried with the entire
>  >  available "Response Field to check" options but could not extract the
>  >  size of HTTP Response.
>  >
>  >
>  >
>  >  The regex I'm using is - Size in bytes: (.*)
>  >
>
>  "Size in bytes" is not a response header - it's only a label on the
>  Tree View Listener display.
>
>  >
>  >  Is this the correct way to extract size in bytes?
>  >
>
>  It might be, if there were such a header ... the normal HTTP header is
>  "Content-Length"
>
>  >
>  >
>  >
>  >  Thread Name: TEST CALLED 1-1
>  >
>  >  Sample Start: 2008-10-15 16:17:41 IST
>  >
>  >  Load time: 31
>  >
>  >  Latency: 31
>  >
>  >  Size in bytes: 13084
>  >
>  >  Sample Count: 1
>  >
>  >  Error Count: 0
>  >
>  >  Response code: 200
>  >
>  >  Response message: OK
>  >
>
>  All of the above are just JMeter labels for the values.
>
>  >
>  >
>  >  Response headers:
>  >
>  >  HTTP/1.1 200 OK
>  >
>  >  Cache-Control: no-cache="set-cookie"
>  >
>  >  Date: Wed, 15 Oct 2008 10:47:41 GMT
>  >
>  >  Transfer-Encoding: chunked
>  >
>  >  Set-Cookie:
>  >  JSESSIONID=r1XLL1KNYhnjH42mmnffxp8zLPG7CtpnH9GdRKj!1800723867; path=/
>  >
>  >  X-Powered-By: Servlet/2.4 JSP/2.0
>  >
>
>  The above are proper HTTP headers.
>
>  There is no Content-Length header, because the response is chunked.
>
>  >
>  >
>  >
>  >
>  >
>  >  Thanks in advance !
>  >
>
>  What are you trying to do with the size?
>
>  >
>  >  Regards
>  >
>  >  Pramod
>  >
>  >
>  >
>  >  The information contained in this transmission may contain privileged
>  and confidential information and is intended only for the use of the
>  person(s) named above. If you are not the intended recipient, any
>  review, dissemination, distribution or duplication of this communication
>  is strictly prohibited. If you received this email in error, please
>  contact the sender immediately by reply e-mail and destroy all copies of
>  the original message. This email is not intended as an offer or
>  solicitation for the purchase or sale of any financial instruments.
>  >
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to