jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Hill <everywhere...@gmail.com>
Subject Re: Grouping recorded requests
Date Tue, 16 Feb 2010 05:35:20 GMT
Apologies. Moment of confusion brought on by impending insanity. I was
thinking of just putting single page requests into their own threads and
running them concurrently because I think this problem finally has me
beaten.

The core of my problem lies with the rather large amount of AJAX on the
site. GWT is the weapon of choice of development in this case. JMeter via
the proxy recorder is able to record the traffic for the AJAX components
without a problem however it appears unable to group those multiple requests
as a single request. In this case, a single request to a web page creates
multiple child requests as the main elements retrieve data. Note that this
isn't a problem until I start adding timers to simulate user pauses.

If I add a timer, then the timer is executed after each child request so for
e.g. a 20 second delay is placed between each request to a page element, not
just for the page itself. To put it in user experience terms, it's
equivalent to having a 20 second delay between getting the header graphic
and the image under the header, then another 20 seconds before the css is
loaded because as noted timers apply to the whole thread, not just between
specific elements of the tree. Obviously this isn't practical.

Oddly, when I record the script in BadBoy the response times are accurate.
But when experted to JMeter it still only picks up the parent html request
and the response times get markedly shorter (300ms as opposed to BB's 3.4
seconds). Why? Because the response time in BadBoy includes the time taken
to render the page in its browser window by retrieving all resources,
whereas JMeter - no matter which way I configure the main HTTP request -
still only makes a GET request to the parent html.

So when it comes to JMeter I can either get all the resources and abandon
the idea of putting in realistic pauses to simulate user activity, or just
get the parent page and a couple of extra elements but have realistic
timers. First option is the only one really.



On Sat, Feb 13, 2010 at 2:22 AM, sebb <sebbaz@gmail.com> wrote:

> On 12/02/2010, James Hill <everywherenet@gmail.com> wrote:
> > The Test Action Controller is nearly there, but it's applying the timing
> to
> >  the whole thread,
>
> All timers/samplers etc apply to a whole thread.
>
> >  in which I have the transaction controller for the
> >  specific pages. So my test plan gets executed like
> >
> >  pause
> >  getPage1
> >  getPage2
> >  getPage3
> >
> >  then loops to the start again. Whereas what I actually want is:
> >
> >  getPage1
> >  pause
> >  getPage2
> >  pause
> >  getPage3
> >  etc...
> >
> >  then loop back and start again.
>
> If you can live with a pause before the first sampler, then just put:
>
> Loop Controller
> + Timer
> + getPage1
> + getPage2
> + etc.
>
> >  I'm thinking the only way to get around it might be to put each set of
> page
> >  requests into a single thread. I could then add a constant or random
> timer
> >  between each thread.
>
> That does not make sense.
>
> > Unfortunately the execution of the threads might not
> >  actually mimic a real world usage scenatrio - essentially I'd have a
> bunch
> >  of pages being hit at the same time. Come to think of it though, is that
> >  really a problem?
>
> I think you are misunderstanding how JMeter works.
>
> Each thread is intended to mimic a single user.
>
> Set up the test to represent what the user might do, then run multiple
> threads to simulate multiple independent users.
>
> Please may I suggest you re-read the manual?
>
> >
> >  On Fri, Feb 12, 2010 at 12:42 PM, sebb <sebbaz@gmail.com> wrote:
> >
> >  > On 12/02/2010, James Hill <everywherenet@gmail.com> wrote:
> >  > > On Thu, Feb 11, 2010 at 8:31 PM, sebb <sebbaz@gmail.com> wrote:
> >  > >
> >  > >  > On 11/02/2010, James Hill <everywherenet@gmail.com> wrote:
> >  > >  > > Yes, I could, if I knew anything about parsing the results
with
> a
> >  > script
> >  > >  > >  like perl or python. Unfortunately that's a tad beyond me
at
> this
> >  > stage.
> >  > >  > As
> >  > >  > >  the saying goes, when you're up to your arse in alligators
> it's
> >  > hard to
> >  > >  > >  remember that your initial objective was to drain the swamp.
> >  > >  > >
> >  > >  > >  I've used the Simple Data Writer with default config to pump
> data
> >  > out
> >  > >  > into a
> >  > >  > >  format I can then transform with XSLT. I can then import
that
> XML
> >  > into
> >  > >  > Excel
> >  > >  > >  and manipulate it there. Unfortunately the transaction
> controller
> >  > >  > creates
> >  > >  > >  its own entry with the response message of e.g. Number of
> samples
> >  > in
> >  > >  > >  transaction : 59, number of failing samples : 0
> >  > >  > >
> >  > >  > >  Not to mention that the long running tests I envisage
> executing
> >  > will
> >  > >  > produce
> >  > >  > >  data files larger than Excel can handle.
> >  > >  > >
> >  > >  > >  Anyway, talking to a developer now about loading the lot
into
> a
> >  > MySQL db
> >  > >  > >  which would give me the power of SQL queries to analyse the
> data
> >  > perhaps
> >  > >  > a
> >  > >  > >  little more easily.
> >  > >  >
> >  > >  > For long-running tests, create CSV files as they are much smaller
> than
> >  > >  > XML files.
> >  > >  >
> >  > >  > Also, most SQL implementations have command-line tools that allow
> one
> >  > >  > to easily populate databases from CSV files.
> >  > >  >
> >  > >
> >  > >
> >  > > CSV is indeed an easier format to work with. The problem I had with
> this
> >  > >  format was mainly due to the Transaction controller. I had i set to
> >  > generate
> >  > >  parent sample. This gave me timings for the overall thread, but not
> for
> >  > the
> >  > >  individual components. This was less than ideal. So I've given each
> of
> >  > the
> >  > >  requests within a transaction controller a unique prefix which
> should
> >  > allow
> >  > >  me to put together meaningful queries once the data is dumpted to a
> DB.
> >  > >
> >  > >  When I added timers though everything goes out the window.
> Optimally,
> >  > I'd
> >  > >  like to be able to pause between each transaction controller but
> JMeter
> >  > >  doesn't appear to allow this, inserting a delay between each
> request
> >  > >  instead. When a given page request results in multiple child
> requests
> >  > the
> >  > >  timer inserts a delay between each of these child requests. Not
> what I
> >  > want
> >  > >  considering I need to be able to look at the time for the entire
> page to
> >  > be
> >  > >  loaded.
> >  >
> >  > Timers are applied before all samplers that are in scope.
> >  >
> >  > There is also a Test Action sampler (which does not generate a sample)
> >  > and that can pause, or you can add a timer as a child.
> >  >
> >  > These are documented in the manual ...
> >  >
> >  > >  I think I may have to go without timings and hopefully extrapolate
> the
> >  > user
> >  > >  load out e.g. 10 threads with no pauses = 30 threads with pauses.
> Or
> >  > 300. No
> >  > >  idea how to do this though.
> >  >
> >  > Decide what load you want to present to the server and work backwards
> >  > from there.
> >  >
> >  > The Constant Throughput Timer can be useful here.
> >  >
> >  >
> >  >
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Constant_Throughput_Timer
> >  >
> >  > >
> >  > >  >
> >  > >  > >  I'll post anything I turn up that others might be able to
use.
> >  > >  > >
> >  > >  > >
> >  > >  > >
> >  > >  > >  On Thu, Feb 11, 2010 at 2:07 PM, Deepak Shetty <
> shettyd@gmail.com>
> >  > >  > wrote:
> >  > >  > >
> >  > >  > >  > Hi
> >  > >  > >  > You could parse the result file or write an XSLT that
could
> only
> >  > count
> >  > >  > the
> >  > >  > >  > child sampler times.
> >  > >  > >  >  Again you shouldnt have to do this , the embedded resources
> >  > should
> >  > >  > have
> >  > >  > >  > worked unless there is a bug that causes it to fail..
> >  > >  > >  > regards
> >  > >  > >  > deepak
> >  > >  > >  >
> >  > >  > >  > On Wed, Feb 10, 2010 at 6:44 PM, James Hill <
> >  > everywherenet@gmail.com>
> >  > >  > >  > wrote:
> >  > >  > >  >
> >  > >  > >  > > Thanks Jean-Louis, perfectly clear and that was
exactly
> what I
> >  > >  > needed :)
> >  > >  > >  > I
> >  > >  > >  > > also found that if I define my variables first
e.g.
> serverName
> >  > then
> >  > >  > the
> >  > >  > >  > > field is automatically updated in the request created
> while
> >  > >  > recording.
> >  > >  > >  > >
> >  > >  > >  > > Only problem is that when I add timers of any kind
to the
> >  > controller
> >  > >  > this
> >  > >  > >  > > value is added into the total result. It's okay
for a
> constant
> >  > timer
> >  > >  > as I
> >  > >  > >  > > can just subtract that value from the timings,
but for
> variable
> >  > time
> >  > >  > >  > delays
> >  > >  > >  > > it's not possible.
> >  > >  > >  > >
> >  > >  > >  > > Cheers,
> >  > >  > >  > > James.
> >  > >  > >  > >
> >  > >  > >  > > On Thu, Feb 4, 2010 at 6:16 PM, <
> >  > >  > jeanlouis.pasturel@orange-ftgroup.com
> >  > >  > >  > > >wrote:
> >  > >  > >  > >
> >  > >  > >  > > >  With http proxy, if you prepare a test plan
with empty
> >  > >  > Transactions
> >  > >  > >  > > > controllers, with the HTTP proxy you can group
"pages"
> as
> >  > >  > transaction,
> >  > >  > >  > by
> >  > >  > >  > > > changing manually the transaction controller
in the
> Target
> >  > >  > Controller
> >  > >  > >  > of
> >  > >  > >  > > > the
> >  > >  > >  > > > HTTP Proxy window. At the end of recording,
the test
> plan is
> >  > ready
> >  > >  > (
> >  > >  > >  > > maybe
> >  > >  > >  > > > you have to add a cookie manager, if cookies
are used)
> >  > >  > >  > > > Sorry for my English, i hope i am clear...
> >  > >  > >  > > >
> >  > >  > >  > > >
> >  > >  > >  > > > Cordialement / Best regards
> >  > >  > >  > > >
> >  > >  > >  > > > Jean-Louis Pasturel
> >  > >  > >  > > >
> >  > >  > >  > > >
> >  > >  > >  > > > -----Message d'origine-----
> >  > >  > >  > > > De : Deepak Shetty [mailto:shettyd@gmail.com]
> >  > >  > >  > > > Envoyé : jeudi 4 février 2010 01:31
> >  > >  > >  > > > À : JMeter Users List
> >  > >  > >  > > > Objet : Re: Grouping recorded requests
> >  > >  > >  > > >
> >  > >  > >  > > > hi
> >  > >  > >  > > > The only way to group up requests is the Transaction
> >  > controller,
> >  > >  > but
> >  > >  > >  > you
> >  > >  > >  > > > wont be able to do this from the Proxy Recorded
script,
> you'd
> >  > have
> >  > >  > to
> >  > >  > >  > do
> >  > >  > >  > > it
> >  > >  > >  > > > manually.
> >  > >  > >  > > >
> >  > >  > >  > > > The embedded resources checkbox should work
for all CSS,
> JS,
> >  > >  > images
> >  > >  > >  > that
> >  > >  > >  > > > are
> >  > >  > >  > > > directly linked on the page (it wont work
if the image
> is say
> >  > for
> >  > >  > e.g.
> >  > >  > >  > > > specified as the background-image in a CSS
rule). If its
> not
> >  > >  > working
> >  > >  > >  > for
> >  > >  > >  > > > you
> >  > >  > >  > > > , can you post the HTML snippet that includes
the
> >  > image/js/css
> >  > >  > (you can
> >  > >  > >  > > use
> >  > >  > >  > > > the response tab of view results tree)? there
might be a
> bug
> >  > in
> >  > >  > Jmeter
> >  > >  > >  > > code
> >  > >  > >  > > > which would be useful to know.
> >  > >  > >  > > >
> >  > >  > >  > > > regards
> >  > >  > >  > > > deepak
> >  > >  > >  > > >
> >  > >  > >  > > > On Wed, Feb 3, 2010 at 4:25 PM, James Hill
<
> >  > >  > everywherenet@gmail.com>
> >  > >  > >  > > > wrote:
> >  > >  > >  > > >
> >  > >  > >  > > > > Thanks for your replies Deepak and Sebb.
> >  > >  > >  > > > >
> >  > >  > >  > > > > I tried retrieving all embedded resources.
When I add
> a
> >  > view
> >  > >  > results
> >  > >  > >  > > > > tree listener and select the homepage.html,
I see a
> couple
> >  > of
> >  > >  > images
> >  > >  > >  > > > > and some text but not the complete page.
If I record
> and
> >  > have
> >  > >  > JMeter
> >  > >  > >  > > > > get everything then at least I retrieve
those missing
> >  > image, css
> >  > >  > and
> >  > >  > >  > js
> >  > >  > >  > > > files.
> >  > >  > >  > > > >
> >  > >  > >  > > > > My test plan looks something like:
> >  > >  > >  > > > >
> >  > >  > >  > > > > - getHomePage (simple controller)
> >  > >  > >  > > > > -- homepageHTML
> >  > >  > >  > > > > -- image1.png
> >  > >  > >  > > > > -- image2.png
> >  > >  > >  > > > > -- someJavaScript.js
> >  > >  > >  > > > > -- anotherImageFile.png
> >  > >  > >  > > > > -- etc
> >  > >  > >  > > > > - getPageTwo
> >  > >  > >  > > > > -- pageTwoHTML
> >  > >  > >  > > > > -- image1.png
> >  > >  > >  > > > > -- image2.png
> >  > >  > >  > > > > -- someJavaScript.js
> >  > >  > >  > > > > -- anotherImageFile.png
> >  > >  > >  > > > > -- etc.
> >  > >  > >  > > > >
> >  > >  > >  > > > > When I run the test and I look at the
aggregate
> results I
> >  > see an
> >  > >  > >  > entry
> >  > >  > >  > > > > for each individual piece of content
on the page. Is
> there
> >  > any
> >  > >  > way to
> >  > >  > >  > > > > view the results in total i.e. rather
than seeing
> >  > individual
> >  > >  > response
> >  > >  > >  > > > > times for all elements I see an overall
response time
> for
> >  > that
> >  > >  > entire
> >  > >  > >  > > > > page, the sum of all the elements?
> >  > >  > >  > > > >
> >  > >  > >  > > > > The simple controller is only that and
it doesn't
> allow me
> >  > to
> >  > >  > get a
> >  > >  > >  > > > > timing result for it. I can't add the
image/css/etc.
> get
> >  > >  > requests as
> >  > >  > >  > > > > child nodes of the original homepage
get request. I'm
> a
> >  > little
> >  > >  > >  > stumped
> >  > >  > >  > > > > as to how to do this.
> >  > >  > >  > > > >
> >  > >  > >  > > > >
> >  > >  > >  > > > > On Wed, Feb 3, 2010 at 5:38 PM, Deepak
Shetty <
> >  > >  > shettyd@gmail.com>
> >  > >  > >  > > wrote:
> >  > >  > >  > > > >
> >  > >  > >  > > > > > >Note that if I set "Retrieve
all embedded
> resources" the
> >  > >  > image and
> >  > >  > >  > > > > > >.js requests aren't recorded.
> >  > >  > >  > > > > > Which is ok, JMeter will fetch all
embedded
> resources if
> >  > this
> >  > >  > is
> >  > >  > >  > > > > > checked
> >  > >  > >  > > > > on
> >  > >  > >  > > > > > the recorded http samples
> >  > >  > >  > > > > >
> >  > >  > >  > > > > > >The client needs to see how
long it takes to get
> the
> >  > entire
> >  > >  > >  > > > > > >contents of
> >  > >  > >  > > > > a
> >  > >  > >  > > > > > >given page.
> >  > >  > >  > > > > > > i.e. so I see all the timings
summed for the
> elements?
> >  > >  > >  > > > > > a browser doesnt download all resources
serially in
> a
> >  > single
> >  > >  > >  > thread.
> >  > >  > >  > > > > > Caching
> >  > >  > >  > > > > > also influences a lot of stuff,
so this number is
> >  > actually
> >  > >  > quite
> >  > >  > >  > > > > > higher than the actual value.
> >  > >  > >  > > > > >
> >  > >  > >  > > > > >
> >  > >  > >  > > > > > On Tue, Feb 2, 2010 at 9:10 PM,
James Hill <
> >  > >  > >  > everywherenet@gmail.com>
> >  > >  > >  > > > > > wrote:
> >  > >  > >  > > > > >
> >  > >  > >  > > > > > > Hi all.
> >  > >  > >  > > > > > >
> >  > >  > >  > > > > > > I've set up JMeter to record
via the proxy. The
> >  > following
> >  > >  > options
> >  > >  > >  > > > > > > are
> >  > >  > >  > > > > > > ticked:
> >  > >  > >  > > > > > > - redirect automatically
> >  > >  > >  > > > > > > - follow redirects
> >  > >  > >  > > > > > > - use keepalive
> >  > >  > >  > > > > > >
> >  > >  > >  > > > > > > For grouping, I've selected
"Add seperators
> between
> >  > groups"
> >  > >  > >  > > > > > >
> >  > >  > >  > > > > > > When I record via the browser
JMeter grabs
> everything.
> >  > I
> >  > >  > needed
> >  > >  > >  > to
> >  > >  > >  > > > > > > do
> >  > >  > >  > > > > > this
> >  > >  > >  > > > > > > because otherwise it doesn't
grab the javascript
> on the
> >  > page
> >  > >  > or
> >  > >  > >  > > > > > > the
> >  > >  > >  > > > > > images.
> >  > >  > >  > > > > > > The client needs to see how
long it takes to get
> the
> >  > entire
> >  > >  > >  > > > > > > contents of
> >  > >  > >  > > > > a
> >  > >  > >  > > > > > > given page.
> >  > >  > >  > > > > > >
> >  > >  > >  > > > > > > Problem comes when I run the
script. There's an
> entry
> >  > in the
> >  > >  > >  > > > > > > results
> >  > >  > >  > > > > file
> >  > >  > >  > > > > > > for every single element on
a given page: js,
> html,
> >  > png,
> >  > >  > gif. Is
> >  > >  > >  > > > > > > it possible to summarise this
data so that I can
> view a
> >  > >  > total for
> >  > >  > >  > > > > > > a page? i.e. so I
> >  > >  > >  > > > > > see
> >  > >  > >  > > > > > > all the timings summed for
the elements?
> >  > >  > >  > > > > > >
> >  > >  > >  > > > > > > Note that if I set "Retrieve
all embedded
> resources"
> >  > the
> >  > >  > image
> >  > >  > >  > and
> >  > >  > >  > > > > > > .js requests aren't recorded.
> >  > >  > >  > > > > > >
> >  > >  > >  > > > > > > Regards,
> >  > >  > >  > > > > > > James.
> >  > >  > >  > > > > > >
> >  > >  > >  > > > > >
> >  > >  > >  > > > >
> >  > >  > >  > > >
> >  > >  > >  > > >
> >  > >  > >  > > >
> >  > >  > >  > > > *********************************
> >  > >  > >  > > > This message and any attachments (the "message")
are
> >  > confidential
> >  > >  > and
> >  > >  > >  > > > intended solely for the addressees.
> >  > >  > >  > > > Any unauthorised use or dissemination is prohibited.
> >  > >  > >  > > > Messages are susceptible to alteration.
> >  > >  > >  > > > France Telecom Group shall not be liable for
the message
> if
> >  > >  > altered,
> >  > >  > >  > > > changed or falsified.
> >  > >  > >  > > > If you are not the intended addressee of this
message,
> please
> >  > >  > cancel it
> >  > >  > >  > > > immediately and inform the sender.
> >  > >  > >  > > > ********************************
> >  > >  > >  > > >
> >  > >  > >  > > >
> >  > >  > >  > > >
> >  > >  >
> ---------------------------------------------------------------------
> >  > >  > >  > > > 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message