You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Zippy Zeppoli <zi...@gmail.com> on 2013/02/01 22:45:56 UTC

complex javascript actions in jmeter load test

Hello,
If I have a website which requires logging in, and executing complex
javascript actions, how would I do this (if at all) in jmeter?

I've heard of writing groovy scripts to do this but this sounds like a lot
of work / maintenance.

Thank you.

Re: complex javascript actions in jmeter load test

Posted by David Luu <ma...@gmail.com>.
What are you trying to performance benchmark again? AJAX requests from
Selenium to the server? Or something else (or something else in addition to
the AJAX requests)? Like Javascript processing/rendering time, etc.?

And what kind of scalability targets are you trying to achieve? Some
average/max response time? Some give hits per sec against the server?

W/o that info, it's hard to tell if what you want to test is viable in
JMeter or Selenium, etc.

On Mon, Feb 4, 2013 at 3:27 PM, Zippy Zeppoli <zi...@gmail.com>wrote:

> The problem is Selenium has no performance testing harness.
> Sucks that it seems BrowserMob (paid solution) is the only solid option.
>
> Until someone builds something with Phantom.js, but it seems JMeter isn't
> going to cut it here.
>
> On Fri, Feb 1, 2013 at 5:40 PM, David Luu <ma...@gmail.com> wrote:
>
> > You'll need to figure out what the complex javascript does. Does it make
> > any AJAX requests, or is it all local client side processing/rendering?
> >
> > If it's all local, then there's no point testing it with JMeter, that's
> > client side browser testing better done with Selenium. It won't impact
> the
> > server side load test (except delay in server response time for fetching
> > files will impact the javascript execution on client side, but that can
> be
> > compensated w/ JMeter load test against server with 1+ Selenium test
> > running at same time to gauge client side performance of site/app in
> > browser).
> >
> > If the javascript does execute AJAX requests, you need to figure out the
> > HTTP requests made and mimic that in JMeter as part of your test. You can
> > get that reading dev/design docs, or reverse engineer/traffic sniffing
> the
> > app while doing manual testing.
> >
> > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > >wrote:
> >
> > > Hello,
> > > If I have a website which requires logging in, and executing complex
> > > javascript actions, how would I do this (if at all) in jmeter?
> > >
> > > I've heard of writing groovy scripts to do this but this sounds like a
> > lot
> > > of work / maintenance.
> > >
> > > Thank you.
> > >
> >
>

Re: complex javascript actions in jmeter load test

Posted by Zippy Zeppoli <zi...@gmail.com>.
I'll take a look at that. Sounds promising.

On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <CS...@tnsi.com> wrote:

> You can use webdriver from jmeter.  Create a webdriver class that performs
> the requests and runs the javascript via the browser, then run/call it from
> a BSF or JSR sampler.
>
>
> > -----Original Message-----
> > From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
> > Sent: Tuesday, 5 February 2013 9:28 AM
> > To: JMeter Users List
> > Subject: Re: complex javascript actions in jmeter load test
> >
> > The problem is Selenium has no performance testing harness.
> > Sucks that it seems BrowserMob (paid solution) is the only solid option.
> >
> > Until someone builds something with Phantom.js, but it seems JMeter isn't
> > going to cut it here.
> >
> > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <ma...@gmail.com> wrote:
> >
> > > You'll need to figure out what the complex javascript does. Does it
> > > make any AJAX requests, or is it all local client side
> processing/rendering?
> > >
> > > If it's all local, then there's no point testing it with JMeter,
> > > that's client side browser testing better done with Selenium. It won't
> > > impact the server side load test (except delay in server response time
> > > for fetching files will impact the javascript execution on client
> > > side, but that can be compensated w/ JMeter load test against server
> > > with 1+ Selenium test running at same time to gauge client side
> > > performance of site/app in browser).
> > >
> > > If the javascript does execute AJAX requests, you need to figure out
> > > the HTTP requests made and mimic that in JMeter as part of your test.
> > > You can get that reading dev/design docs, or reverse engineer/traffic
> > > sniffing the app while doing manual testing.
> > >
> > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > > >wrote:
> > >
> > > > Hello,
> > > > If I have a website which requires logging in, and executing complex
> > > > javascript actions, how would I do this (if at all) in jmeter?
> > > >
> > > > I've heard of writing groovy scripts to do this but this sounds like
> > > > a
> > > lot
> > > > of work / maintenance.
> > > >
> > > > Thank you.
> > > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: complex javascript actions in jmeter load test

Posted by Shmuel Krakower <sh...@gmail.com>.
Very interesting, thanks for sharing this info.
btw - First time I hear about the idea to run load tests on Production
during off-hours.

Shmuel Krakower.
www.Beatsoo.org - re-use your jmeter scripts for application performance
monitoring from worldwide locations for free.


On Wed, Feb 6, 2013 at 10:21 PM, David Luu <ma...@gmail.com> wrote:

> Hi Shmuel,
>
> No, I haven't tried the approach I mentioned yet, though I'd like to
> sometime, never got the opportunity to do so. Rather I do it with a similar
> less optimal approach:
>
> * run JMeter load test w/ X threads for some arbitrary duration (determined
> by me and my colleagues)
> * at same time, perform manual browser exploratory testing while load is
> running to gauge UI responsively and functionality. Our goal during the
> browser testing is just to gauge behavior and not functional testing.
>
> Since the load testing I've been doing has been roughly hands on, not
> something fully automated and left to run overnight, etc. (we run our tests
> on live production environment in the wee hours rather than in test
> environments), there was no real need to have a Selenium test component
> when it was more optimal for us to assess client side performance in simple
> manual tests while watching the server load w/ our IT/Ops team.
>
> I would also like to add that my suggested approach applies across
> different application/platform types. Web apps tend to have the luxury of
> open source tools like Selenium and JMeter to assist with performance
> testing, whether its super easy to use or not. You get used to it if you
> come from other domains as well...
>
> I had worked before in telecom domain with a product that had mixed apps
> (phones, desktop GUI, web, etc.). We generated load with variety of tools
> (custom & commercial), and I built a simple client side performance
> script/tool using free desktop GUI automation tool (commercial was too
> expensive) to do some simple UI activity while the load was running and
> timed the commands (start/end of command) and dumped out the timings for
> analysis. As we needed to repeat this periodically, our GUI app was slow
> (even w/o load), and we ran extended load overnight, this script I built
> was helpful to assess client side performance than to do it manually or pay
> $$$ for some commercial tool (if exist) that "supposedly" makes it easy for
> a non-programmer to do same thing. Note that in my case the load was
> against server, not the GUI client, but we also wanted to monitor the GUI
> client responsiveness when server was under load.
>
> Regards,
> David
>
> On Tue, Feb 5, 2013 at 11:16 PM, Shmuel Krakower <sh...@gmail.com>
> wrote:
>
> > Hi David,
> > I saw some solutions suggesting Selenium for load testing (so they
> promise
> > "easier" scripting) but not sure how accurate the numbers are and in
> > general, not sure how much a single selenium load test can scale to
> > internet kind of load (thousands of parallel threads/browsers)...
> >
> > That's where I noticed that some load testing SaaS providers (cannot
> recall
> > who right now), provide what you've described above.
> > I like that approach, monitoring with Selenium during a JMeter load test.
> > The only downside I see here, is the extra work for managing both set of
> > scripts and maintaining extra infrastructure for Selenium.
> > Have you ever done this? How did it work out for you?
> > Did someone ever tried to use the JMeter WebDriver plugin (
> > https://github.com/cplim/JMeter), so it sounds easier to control this
> > approach from a single test plan?
> >
> > Shmuel Krakower.
> > www.Beatsoo.org - re-use your jmeter scripts for application performance
> > monitoring from worldwide locations for free.
> >
> >
> > On Wed, Feb 6, 2013 at 6:17 AM, David Luu <ma...@gmail.com> wrote:
> >
> > > Also, if the OP's intent is to want to test both server & client
> > > performance, then in terms of JMeter, the optimal approach is to run 2
> > > tests in parallel:
> > >
> > > * a JMeter load test generating HTTP requests emulating the AJAX calls,
> > set
> > > to run for X user load (X threads)
> > > * a Selenium test customized to log response times of every action
> (e.g.
> > > AJAX javascript click & expecting some UI response), going through same
> > UI
> > > flow as JMeter test but exercising real UI, this test is configured to
> > run
> > > in a loop continuously (might need test framework to support this or
> > custom
> > > code).
> > >
> > > The JMeter test will stress & analyze server while the Selenium test
> will
> > > assess the browser performance at the same time.
> > >
> > > That's the best approach for any toolset used for testing both clien &
> > > server performance at same time. Some commercial tools just might
> happen
> > to
> > > bundle both types of testing together.
> > >
> > > On Tue, Feb 5, 2013 at 6:59 PM, Stott, Charlie <CS...@tnsi.com>
> wrote:
> > >
> > > > You only need to include the javascript performance if you are
> testing
> > > > browser performance.
> > > >
> > > > I assume you are testing server performance, which is responding to
> > AJAX
> > > > requests, not to javascript interpretation.  The interpretation
> > produces
> > > a
> > > > request which jmeter can emulate.
> > > >
> > > > The clicking of the javascript button is incidental to the
> performance
> > of
> > > > the server.  If the click MUST be emulated for whatever reason we
> don't
> > > > understand, webdriver can do it.  But there is no point testing the
> > > > performance of webdriver samples this way.  It is more useful if it
> > > > considered part of setup and teardown.  Why would you want the
> > > performance
> > > > of the javascript, the rendering of a button and a clicking event.
> >  What
> > > do
> > > > you gain from this?
> > > >
> > > > Charlie
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Deepak Shetty [mailto:shettyd@gmail.com]
> > > > > Sent: Wednesday, 6 February 2013 12:51 PM
> > > > > To: JMeter Users List
> > > > > Subject: Re: complex javascript actions in jmeter load test
> > > > >
> > > > > >Actually that does matter it cannot do JavaScript. If a request
> > > > > >requires you need to be able to click a JavaScript button then the
> > > > > >request will never happen.
> > > > > The point is that what happens when the button is clicked? Assuming
> > > its a
> > > > > server - ajax call then A HTTP call is made and some parameters are
> > > > passed
> > > > > and some values are returned. Thats whats important for the load
> > test ,
> > > > not
> > > > > the fact that javascript was executed.
> > > > > So when you record the script , you will be the person clicking the
> > > > > button(you are recording your actions) , JMeter will record every
> > > > interaction
> > > > > that makes a call to the server and will record this as a separate
> > HTTP
> > > > > request and when you run the script the same request will be made
> as
> > if
> > > > > someone clicked the button!
> > > > >
> > > > > You dont need to use the recorder either , you can modify the
> script
> > > > > yourself.
> > > > >
> > > > > If the javascript didnt actually make any server side call - then
> it
> > > > doesnt
> > > > > matter because you dont want to load test this anyway.
> > > > >
> > > > > Have you actually tried this? It sounds as if you have a problem
> > > > recording
> > > > > your script and you probably have concluded that JMeter doesnt do
> > > > > javascript (true) and hence cant test websites that do
> > javascript/ajax
> > > > > (false)
> > > > >
> > > > > >Real browser is needed
> > > > > Not for a good deal of use cases - as many of the people on this
> > > mailing
> > > > list
> > > > > can attest too.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli
> > > > > <zi...@gmail.com>wrote:
> > > > >
> > > > > > Deepak,
> > > > > > Actually that does matter it cannot do JavaScript. If a request
> > > > > > requires you need to be able to click a JavaScript button then
> the
> > > > > > request will never happen. No request will ever be made.  Also
> > > testing
> > > > > > true web performance requires rendering the DOM, not just
> > initiating
> > > > > > HTTP requests and recording the response time, rps, etc.
> > > > > >
> > > > > > Real browser is needed, with JavaScript, and Jmeter doesn't
> > integrate
> > > > > > well with this, it isn't designed for this, which is
> > understandable.
> > > > > > The problem is there is a gap between real browser testing (owned
> > by
> > > > > > third party
> > > > > > companies) and open source tools (Jmeter). There's nothing in
> > between
> > > > > > for real-browser based performance testing. I could go into why,
> > but
> > > > > > its off topic of this list, and I'd rather spare everyone the
> gas.
> > > > > >
> > > > > > Point being, Jmeter cannot solve my problem, without some serious
> > > > > > customization.
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <shettyd@gmail.com
> >
> > > > > wrote:
> > > > > >
> > > > > > > Hi
> > > > > > > You are getting too caught up in the JMeter doesnt do
> javascript
> > > > thing.
> > > > > > In
> > > > > > > most cases it doesnt matter.
> > > > > > > You have a webserver that is receiving HTTP requests - whether
> > > those
> > > > > > > requests are generated via the user clicking a link or via AJAX
> > or
> > > > > > > via flash is hardly relevant to the webserver. It sees HTTP
> > > requests
> > > > > > > and
> > > > > > sends
> > > > > > > HTTP responses.
> > > > > > > JMeter deals with HTTP request and responses. As long as you
> can
> > > > > > > make the same request that your javascript is making (which you
> > can
> > > > > > > see via the recording feature) , you can test it with Jmeter.
> The
> > > > > > > fact that the proxy cant record javascript is irrelevant - it
> > only
> > > > > > > needs to record the requests. If your javascript is responsible
> > for
> > > > > > > generating the requests
> > > > > > in
> > > > > > > some way , then you have to replicate that within JMeter.
> > > > > > >
> > > > > > > Some caveats here are
> > > > > > > a. Your toolkit should be good when you need to
> > parameterise(JQuery
> > > > > > > is great , GWT sucks) b. If you need to perform some AJAX
> > requests
> > > > > > > in parallel then JMeter isnt quite there yet.
> > > > > > >
> > > > > > > Its probably true that it is easier writing scripts for
> Selenium
> > > > > > > like
> > > > > > tools
> > > > > > > - but they also need more resources as well as given how often
> a
> > UI
> > > > > > changes
> > > > > > > as opposed to the HTTP request/response pair , sometimes JMeter
> > > > > > > scripts
> > > > > > are
> > > > > > > more resilient to change.
> > > > > > >
> > > > > > > regards
> > > > > > > deepak
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Tue, Feb 5, 2013 at 5:29 PM, Zippy Zeppoli
> > > > > > > <zippyzeppoli@gmail.com
> > > > > > > >wrote:
> > > > > > >
> > > > > > > > Proxy won't work for clicking on JavaScript.
> > > > > > > > Selenium will, however, Selenium isn't designed for
> performance
> > > > > > testing,
> > > > > > > > with the exception of BrowserMob, who has perfected it.
> > > > > > > >
> > > > > > > > If JMeter had some kind of (good) Selenium integration then
> it
> > > > > > > > might be able to achieve it.
> > > > > > > >
> > > > > > > > I think JMeter is a good tool, but it's not built for this
> kind
> > > of
> > > > > > work.
> > > > > > > >
> > > > > > > > On Tue, Feb 5, 2013 at 5:20 PM, David Luu <
> mangaroo@gmail.com>
> > > > > wrote:
> > > > > > > >
> > > > > > > > > I'm not familiar with the full feature set of BrowserMob,
> but
> > > > > > > > > JMeter
> > > > > > > can
> > > > > > > > do
> > > > > > > > > what you want, easy or hard, depending on your needs.
> > > > > > > > >
> > > > > > > > > If all you need is simple record & playback, JMeter proxy
> is
> > > > > > > > > best
> > > > > > > option.
> > > > > > > > > Just record w/ proxy, it generates a basic test plan that
> you
> > > > > > > > > can
> > > > > > save
> > > > > > > to
> > > > > > > > > file and run w/ X threads to generate load, etc.
> > > > > > > > >
> > > > > > > > > But that approach will always use the same user, same data
> in
> > > > > > > > > the
> > > > > > AJAX
> > > > > > > > > calls during load generation.
> > > > > > > > >
> > > > > > > > > If you need them to be unique & parameterized, that's where
> > it
> > > > > > > > > takes
> > > > > > > some
> > > > > > > > > work to go in and cleanup the proxy recording w/
> > paramaterized
> > > > > > > > > data, response checking (if more than just checking HTTP
> 200
> > > > > > > > > OKs). And
> > > > > > you'll
> > > > > > > > > find proxy recording generates a lot of unnecessary HTTP
> > > > > > > > > requests for
> > > > > > > > HTML,
> > > > > > > > > CSS, image files that aren't necessary of interest as
> you're
> > > > > > > > > testing
> > > > > > > the
> > > > > > > > > AJAX calls, which is where you filter out only the requests
> > of
> > > > > > interest
> > > > > > > > and
> > > > > > > > > only use those in test plan, etc.
> > > > > > > > >
> > > > > > > > > I believe this kind of work is needed regardless of what
> tool
> > > > > > > > > you
> > > > > > use,
> > > > > > > > some
> > > > > > > > > tools just make it easier, but there's still work to do.
> Not
> > > > > > > > > just a
> > > > > > one
> > > > > > > > > touch button approach unless all you need is simple record
> &
> > > > > > playback.
> > > > > > > > >
> > > > > > > > > On Tue, Feb 5, 2013 at 5:08 PM, Zippy Zeppoli <
> > > > > > zippyzeppoli@gmail.com
> > > > > > > > > >wrote:
> > > > > > > > >
> > > > > > > > > > Will probably just buy BrowserMob.
> > > > > > > > > > Too bad there isn't an open source framework to already
> do
> > > > this.
> > > > > > > > > >
> > > > > > > > > > Building this is a yak shave, and I need to be testing,
> not
> > > > > > building
> > > > > > > a
> > > > > > > > > test
> > > > > > > > > > harness thats probably going to break on the next
> release.
> > > > > > > > > >
> > > > > > > > > > On Tue, Feb 5, 2013 at 3:40 PM, David Luu <
> > > mangaroo@gmail.com>
> > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > JMeter proxy is the most integrated approach, but I
> find
> > it
> > > > > > > > > > > gives
> > > > > > > > "too
> > > > > > > > > > much
> > > > > > > > > > > information", so I tend to use external tools like
> > browser
> > > > > > traffic
> > > > > > > > > > sniffers
> > > > > > > > > > > (HttpFox, livehttpheaders, ieHttpHeaders) to see what
> > HTTP
> > > > > > requests
> > > > > > > > are
> > > > > > > > > > > made for AJAX calls for just the requests & responses
> I'm
> > > > > > > interested
> > > > > > > > > in,
> > > > > > > > > > > easier to manage. But that's just my opinion, others
> > might
> > > > > > > > > > > find
> > > > > > the
> > > > > > > > > > JMeter
> > > > > > > > > > > proxy easier to use.
> > > > > > > > > > >
> > > > > > > > > > > Whatever approach you take, you just need to know what
> > HTTP
> > > > > > > requests
> > > > > > > > > are
> > > > > > > > > > > made by the AJAX calls to replicate in JMeter, and
> > > > > > > > > > > parameterize
> > > > > > > those
> > > > > > > > > > > requests to take in dynamic/test data as needed, assert
> > > > > > appropriate
> > > > > > > > > > > response data, etc. In this case, WebDriver can be
> > dropped
> > > > > > > > > > > from
> > > > > > the
> > > > > > > > > > > equation, just gives more overhead and lowers
> scalability
> > > in
> > > > > > > > > > > load generation.
> > > > > > > > > > >
> > > > > > > > > > > On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
> > > > > > > > > > > p.mouawad@ubik-ingenierie.com> wrote:
> > > > > > > > > > >
> > > > > > > > > > > > AjaxCall will emit a network call which JMeter will
> > > > capture.
> > > > > > > > > > > >
> > > > > > > > > > > > Use JMeter Server Proxy and you should have the Ajax
> > > Calls
> > > > > > > > recorded.
> > > > > > > > > > > >
> > > > > > > > > > > > Regards
> > > > > > > > > > > > Philippe M.
> > > > > > > > > > > >
> > > > > > > > > > > > Follow me on twitter <https://twitter.com/philmdot>
> > > > > > > > > > > >
> > > > > > > > > > > > UBIK-INGENIERIE on TWITTER
> > > > > > > > > > > > <https://twitter.com/ubikingenierie
> > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > UBIK LOAD PACK BLOG <
> > > http://www.ubik-ingenierie.com/blog/>
> > > > > > > > > > > >
> > > > > > > > > > > > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <
> > > > > > > > > zippyzeppoli@gmail.com
> > > > > > > > > > > > >wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > To clarify:
> > > > > > > > > > > > > An example would be:
> > > > > > > > > > > > > 1) log in via a form post
> > > > > > > > > > > > > 2) look at orders in an ecommerce interface (AJAX
> > call)
> > > > > > > > > > > > > 3) click on result to view order detail (AJAX)
> > > > > > > > > > > > >
> > > > > > > > > > > > > Pretty much a standard ecommerce transaction, but
> the
> > > > > > interface
> > > > > > > > is
> > > > > > > > > > all
> > > > > > > > > > > > > javascript.
> > > > > > > > > > > > >
> > > > > > > > > > > > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <
> > > > > > > CStott@tnsi.com>
> > > > > > > > > > > wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > > > > From: David Luu [mailto:mangaroo@gmail.com]
> > > > > > > > > > > > > > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > > > > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > > > > > Subject: Re: complex javascript actions in
> jmeter
> > > > > > > > > > > > > > > load
> > > > > > test
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >  >> You can use webdriver from jmeter.  Create
> a
> > > > > > webdriver
> > > > > > > > > class
> > > > > > > > > > > that
> > > > > > > > > > > > > > > performs the requests and runs the javascript
> via
> > > > > > > > > > > > > > > the
> > > > > > > > browser,
> > > > > > > > > > then
> > > > > > > > > > > > > > run/call
> > > > > > > > > > > > > > > it from a BSF or JSR sampler.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Just to clarify, I take it that's only
> worthwhile
> > > to
> > > > > > > > > > > > > > > do
> > > > > > (in
> > > > > > > > > terms
> > > > > > > > > > > of
> > > > > > > > > > > > > > > scalability) when using PhantomJSDriver or
> > > > > > > > > > > > > > > HtmlUnitDriver
> > > > > > > or
> > > > > > > > > > > > > > FirefoxDriver
> > > > > > > > > > > > > > > (on Linux with xvfb) with JMeter this way?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > "Worthwhile" depends on assumptions.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Because otherwise, the browser GUI is the
> > > > > > > > > > > > > > > scalability
> > > > > > > > limiting
> > > > > > > > > > > factor
> > > > > > > > > > > > > > even
> > > > > > > > > > > > > > > with JMeter and Grid deployment, and in that
> > case,
> > > > > > > > > > > > > > > no
> > > > > > > > > difference
> > > > > > > > > > in
> > > > > > > > > > > > > using
> > > > > > > > > > > > > > > WebDriver outside JMeter to do performance
> tests
> > > > > > > > > > > > > > > except
> > > > > > if
> > > > > > > > one
> > > > > > > > > > > wants
> > > > > > > > > > > > > the
> > > > > > > > > > > > > > > JMeter logging/reporting facilities to help
> > > > > > > > > > > > > > > performance
> > > > > > > test,
> > > > > > > > > > > because
> > > > > > > > > > > > > > there's
> > > > > > > > > > > > > > > no or minimal scalabiity gain.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Seems the poster is more at the
> > capability/viability
> > > > > > > > > > > > > > stage
> > > > > > of
> > > > > > > > > > > > developing
> > > > > > > > > > > > > > tests?  We would need much more information to
> > start
> > > > > > advising
> > > > > > > > on
> > > > > > > > > > the
> > > > > > > > > > > > > entire
> > > > > > > > > > > > > > load testing process, start to finish, and what
> > > > > > > > > > > > > > challenges
> > > > > > > may
> > > > > > > > > face
> > > > > > > > > > > the
> > > > > > > > > > > > > > poster along the way.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie
> <
> > > > > > > > > CStott@tnsi.com>
> > > > > > > > > > > > > wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > You can use webdriver from jmeter.  Create a
> > > > > > > > > > > > > > > > webdriver
> > > > > > > > class
> > > > > > > > > > that
> > > > > > > > > > > > > > > > performs the requests and runs the javascript
> > via
> > > > > > > > > > > > > > > > the
> > > > > > > > > browser,
> > > > > > > > > > > then
> > > > > > > > > > > > > > > > run/call it from a BSF or JSR sampler.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > > > > > > From: Zippy Zeppoli
> > > > > > > > > > > > > > > > > [mailto:zippyzeppoli@gmail.com]
> > > > > > > > > > > > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > > > > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > > > > > > > Subject: Re: complex javascript actions in
> > > > > > > > > > > > > > > > > jmeter
> > > > > > load
> > > > > > > > test
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > The problem is Selenium has no performance
> > > > > > > > > > > > > > > > > testing
> > > > > > > > harness.
> > > > > > > > > > > > > > > > > Sucks that it seems BrowserMob (paid
> > solution)
> > > > > > > > > > > > > > > > > is the
> > > > > > > > only
> > > > > > > > > > > solid
> > > > > > > > > > > > > > option.
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Until someone builds something with
> > Phantom.js,
> > > > > > > > > > > > > > > > > but
> > > > > > it
> > > > > > > > > seems
> > > > > > > > > > > > JMeter
> > > > > > > > > > > > > > > > > isn't going to cut it here.
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <
> > > > > > > > > > mangaroo@gmail.com>
> > > > > > > > > > > > > > wrote:
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > You'll need to figure out what the
> complex
> > > > > > javascript
> > > > > > > > > does.
> > > > > > > > > > > > Does
> > > > > > > > > > > > > > > > > > it make any AJAX requests, or is it all
> > local
> > > > > > client
> > > > > > > > side
> > > > > > > > > > > > > > > > processing/rendering?
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > If it's all local, then there's no point
> > > > > > > > > > > > > > > > > > testing it
> > > > > > > > with
> > > > > > > > > > > > JMeter,
> > > > > > > > > > > > > > > > > > that's client side browser testing better
> > > done
> > > > > > > > > > > > > > > > > > with
> > > > > > > > > > Selenium.
> > > > > > > > > > > > It
> > > > > > > > > > > > > > > > > > won't impact the server side load test
> > > (except
> > > > > > delay
> > > > > > > in
> > > > > > > > > > > server
> > > > > > > > > > > > > > > > > > response time for fetching files will
> > impact
> > > > > > > > > > > > > > > > > > the
> > > > > > > > > javascript
> > > > > > > > > > > > > > > > > > execution on client side, but that can be
> > > > > > compensated
> > > > > > > > w/
> > > > > > > > > > > JMeter
> > > > > > > > > > > > > > > > > > load test against server with 1+ Selenium
> > > test
> > > > > > > running
> > > > > > > > at
> > > > > > > > > > > same
> > > > > > > > > > > > > > > > > > time to gauge client side performance of
> > > > > > > > > > > > > > > > > > site/app
> > > > > > in
> > > > > > > > > > > browser).
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > If the javascript does execute AJAX
> > requests,
> > > > > > > > > > > > > > > > > > you
> > > > > > > need
> > > > > > > > to
> > > > > > > > > > > > figure
> > > > > > > > > > > > > > > > > > out the HTTP requests made and mimic that
> > in
> > > > > > > > > > > > > > > > > > JMeter
> > > > > > > as
> > > > > > > > > part
> > > > > > > > > > > of
> > > > > > > > > > > > > your
> > > > > > > > > > > > > > > test.
> > > > > > > > > > > > > > > > > > You can get that reading dev/design docs,
> > or
> > > > > > reverse
> > > > > > > > > > > > > > > > > > engineer/traffic sniffing the app while
> > doing
> > > > > > manual
> > > > > > > > > > testing.
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy
> > Zeppoli
> > > > > > > > > > > > > > > > > > <zippyzeppoli@gmail.com
> > > > > > > > > > > > > > > > > > >wrote:
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > > > > > > > If I have a website which requires
> > logging
> > > > > > > > > > > > > > > > > > > in,
> > > > > > and
> > > > > > > > > > > executing
> > > > > > > > > > > > > > > > > > > complex javascript actions, how would I
> > do
> > > > > > > > > > > > > > > > > > > this
> > > > > > (if
> > > > > > > > at
> > > > > > > > > > all)
> > > > > > > > > > > > in
> > > > > > > > > > > > > > jmeter?
> > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > I've heard of writing groovy scripts to
> > do
> > > > > > > > > > > > > > > > > > > this
> > > > > > but
> > > > > > > > > this
> > > > > > > > > > > > sounds
> > > > > > > > > > > > > > > > > > > like a
> > > > > > > > > > > > > > > > > > lot
> > > > > > > > > > > > > > > > > > > of work / maintenance.
> > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > Thank you.
> > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > >
> > > ------------------------------------------------------------------
> > > > > > > > ---
> > > > > > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > user-unsubscribe@jmeter.apache.org
> > > > > > > > > > > > > > > > For additional commands, e-mail:
> > > > > > > > user-help@jmeter.apache.org
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > > > > > > user-unsubscribe@jmeter.apache.org
> > > > > > > > > > > > > > For additional commands, e-mail:
> > > > > > user-help@jmeter.apache.org
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > >
> > > >
> > >
> >
>

Re: complex javascript actions in jmeter load test

Posted by David Luu <ma...@gmail.com>.
Hi Shmuel,

No, I haven't tried the approach I mentioned yet, though I'd like to
sometime, never got the opportunity to do so. Rather I do it with a similar
less optimal approach:

* run JMeter load test w/ X threads for some arbitrary duration (determined
by me and my colleagues)
* at same time, perform manual browser exploratory testing while load is
running to gauge UI responsively and functionality. Our goal during the
browser testing is just to gauge behavior and not functional testing.

Since the load testing I've been doing has been roughly hands on, not
something fully automated and left to run overnight, etc. (we run our tests
on live production environment in the wee hours rather than in test
environments), there was no real need to have a Selenium test component
when it was more optimal for us to assess client side performance in simple
manual tests while watching the server load w/ our IT/Ops team.

I would also like to add that my suggested approach applies across
different application/platform types. Web apps tend to have the luxury of
open source tools like Selenium and JMeter to assist with performance
testing, whether its super easy to use or not. You get used to it if you
come from other domains as well...

I had worked before in telecom domain with a product that had mixed apps
(phones, desktop GUI, web, etc.). We generated load with variety of tools
(custom & commercial), and I built a simple client side performance
script/tool using free desktop GUI automation tool (commercial was too
expensive) to do some simple UI activity while the load was running and
timed the commands (start/end of command) and dumped out the timings for
analysis. As we needed to repeat this periodically, our GUI app was slow
(even w/o load), and we ran extended load overnight, this script I built
was helpful to assess client side performance than to do it manually or pay
$$$ for some commercial tool (if exist) that "supposedly" makes it easy for
a non-programmer to do same thing. Note that in my case the load was
against server, not the GUI client, but we also wanted to monitor the GUI
client responsiveness when server was under load.

Regards,
David

On Tue, Feb 5, 2013 at 11:16 PM, Shmuel Krakower <sh...@gmail.com> wrote:

> Hi David,
> I saw some solutions suggesting Selenium for load testing (so they promise
> "easier" scripting) but not sure how accurate the numbers are and in
> general, not sure how much a single selenium load test can scale to
> internet kind of load (thousands of parallel threads/browsers)...
>
> That's where I noticed that some load testing SaaS providers (cannot recall
> who right now), provide what you've described above.
> I like that approach, monitoring with Selenium during a JMeter load test.
> The only downside I see here, is the extra work for managing both set of
> scripts and maintaining extra infrastructure for Selenium.
> Have you ever done this? How did it work out for you?
> Did someone ever tried to use the JMeter WebDriver plugin (
> https://github.com/cplim/JMeter), so it sounds easier to control this
> approach from a single test plan?
>
> Shmuel Krakower.
> www.Beatsoo.org - re-use your jmeter scripts for application performance
> monitoring from worldwide locations for free.
>
>
> On Wed, Feb 6, 2013 at 6:17 AM, David Luu <ma...@gmail.com> wrote:
>
> > Also, if the OP's intent is to want to test both server & client
> > performance, then in terms of JMeter, the optimal approach is to run 2
> > tests in parallel:
> >
> > * a JMeter load test generating HTTP requests emulating the AJAX calls,
> set
> > to run for X user load (X threads)
> > * a Selenium test customized to log response times of every action (e.g.
> > AJAX javascript click & expecting some UI response), going through same
> UI
> > flow as JMeter test but exercising real UI, this test is configured to
> run
> > in a loop continuously (might need test framework to support this or
> custom
> > code).
> >
> > The JMeter test will stress & analyze server while the Selenium test will
> > assess the browser performance at the same time.
> >
> > That's the best approach for any toolset used for testing both clien &
> > server performance at same time. Some commercial tools just might happen
> to
> > bundle both types of testing together.
> >
> > On Tue, Feb 5, 2013 at 6:59 PM, Stott, Charlie <CS...@tnsi.com> wrote:
> >
> > > You only need to include the javascript performance if you are testing
> > > browser performance.
> > >
> > > I assume you are testing server performance, which is responding to
> AJAX
> > > requests, not to javascript interpretation.  The interpretation
> produces
> > a
> > > request which jmeter can emulate.
> > >
> > > The clicking of the javascript button is incidental to the performance
> of
> > > the server.  If the click MUST be emulated for whatever reason we don't
> > > understand, webdriver can do it.  But there is no point testing the
> > > performance of webdriver samples this way.  It is more useful if it
> > > considered part of setup and teardown.  Why would you want the
> > performance
> > > of the javascript, the rendering of a button and a clicking event.
>  What
> > do
> > > you gain from this?
> > >
> > > Charlie
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Deepak Shetty [mailto:shettyd@gmail.com]
> > > > Sent: Wednesday, 6 February 2013 12:51 PM
> > > > To: JMeter Users List
> > > > Subject: Re: complex javascript actions in jmeter load test
> > > >
> > > > >Actually that does matter it cannot do JavaScript. If a request
> > > > >requires you need to be able to click a JavaScript button then the
> > > > >request will never happen.
> > > > The point is that what happens when the button is clicked? Assuming
> > its a
> > > > server - ajax call then A HTTP call is made and some parameters are
> > > passed
> > > > and some values are returned. Thats whats important for the load
> test ,
> > > not
> > > > the fact that javascript was executed.
> > > > So when you record the script , you will be the person clicking the
> > > > button(you are recording your actions) , JMeter will record every
> > > interaction
> > > > that makes a call to the server and will record this as a separate
> HTTP
> > > > request and when you run the script the same request will be made as
> if
> > > > someone clicked the button!
> > > >
> > > > You dont need to use the recorder either , you can modify the script
> > > > yourself.
> > > >
> > > > If the javascript didnt actually make any server side call - then it
> > > doesnt
> > > > matter because you dont want to load test this anyway.
> > > >
> > > > Have you actually tried this? It sounds as if you have a problem
> > > recording
> > > > your script and you probably have concluded that JMeter doesnt do
> > > > javascript (true) and hence cant test websites that do
> javascript/ajax
> > > > (false)
> > > >
> > > > >Real browser is needed
> > > > Not for a good deal of use cases - as many of the people on this
> > mailing
> > > list
> > > > can attest too.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli
> > > > <zi...@gmail.com>wrote:
> > > >
> > > > > Deepak,
> > > > > Actually that does matter it cannot do JavaScript. If a request
> > > > > requires you need to be able to click a JavaScript button then the
> > > > > request will never happen. No request will ever be made.  Also
> > testing
> > > > > true web performance requires rendering the DOM, not just
> initiating
> > > > > HTTP requests and recording the response time, rps, etc.
> > > > >
> > > > > Real browser is needed, with JavaScript, and Jmeter doesn't
> integrate
> > > > > well with this, it isn't designed for this, which is
> understandable.
> > > > > The problem is there is a gap between real browser testing (owned
> by
> > > > > third party
> > > > > companies) and open source tools (Jmeter). There's nothing in
> between
> > > > > for real-browser based performance testing. I could go into why,
> but
> > > > > its off topic of this list, and I'd rather spare everyone the gas.
> > > > >
> > > > > Point being, Jmeter cannot solve my problem, without some serious
> > > > > customization.
> > > > >
> > > > >
> > > > >
> > > > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <sh...@gmail.com>
> > > > wrote:
> > > > >
> > > > > > Hi
> > > > > > You are getting too caught up in the JMeter doesnt do javascript
> > > thing.
> > > > > In
> > > > > > most cases it doesnt matter.
> > > > > > You have a webserver that is receiving HTTP requests - whether
> > those
> > > > > > requests are generated via the user clicking a link or via AJAX
> or
> > > > > > via flash is hardly relevant to the webserver. It sees HTTP
> > requests
> > > > > > and
> > > > > sends
> > > > > > HTTP responses.
> > > > > > JMeter deals with HTTP request and responses. As long as you can
> > > > > > make the same request that your javascript is making (which you
> can
> > > > > > see via the recording feature) , you can test it with Jmeter. The
> > > > > > fact that the proxy cant record javascript is irrelevant - it
> only
> > > > > > needs to record the requests. If your javascript is responsible
> for
> > > > > > generating the requests
> > > > > in
> > > > > > some way , then you have to replicate that within JMeter.
> > > > > >
> > > > > > Some caveats here are
> > > > > > a. Your toolkit should be good when you need to
> parameterise(JQuery
> > > > > > is great , GWT sucks) b. If you need to perform some AJAX
> requests
> > > > > > in parallel then JMeter isnt quite there yet.
> > > > > >
> > > > > > Its probably true that it is easier writing scripts for Selenium
> > > > > > like
> > > > > tools
> > > > > > - but they also need more resources as well as given how often a
> UI
> > > > > changes
> > > > > > as opposed to the HTTP request/response pair , sometimes JMeter
> > > > > > scripts
> > > > > are
> > > > > > more resilient to change.
> > > > > >
> > > > > > regards
> > > > > > deepak
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Tue, Feb 5, 2013 at 5:29 PM, Zippy Zeppoli
> > > > > > <zippyzeppoli@gmail.com
> > > > > > >wrote:
> > > > > >
> > > > > > > Proxy won't work for clicking on JavaScript.
> > > > > > > Selenium will, however, Selenium isn't designed for performance
> > > > > testing,
> > > > > > > with the exception of BrowserMob, who has perfected it.
> > > > > > >
> > > > > > > If JMeter had some kind of (good) Selenium integration then it
> > > > > > > might be able to achieve it.
> > > > > > >
> > > > > > > I think JMeter is a good tool, but it's not built for this kind
> > of
> > > > > work.
> > > > > > >
> > > > > > > On Tue, Feb 5, 2013 at 5:20 PM, David Luu <ma...@gmail.com>
> > > > wrote:
> > > > > > >
> > > > > > > > I'm not familiar with the full feature set of BrowserMob, but
> > > > > > > > JMeter
> > > > > > can
> > > > > > > do
> > > > > > > > what you want, easy or hard, depending on your needs.
> > > > > > > >
> > > > > > > > If all you need is simple record & playback, JMeter proxy is
> > > > > > > > best
> > > > > > option.
> > > > > > > > Just record w/ proxy, it generates a basic test plan that you
> > > > > > > > can
> > > > > save
> > > > > > to
> > > > > > > > file and run w/ X threads to generate load, etc.
> > > > > > > >
> > > > > > > > But that approach will always use the same user, same data in
> > > > > > > > the
> > > > > AJAX
> > > > > > > > calls during load generation.
> > > > > > > >
> > > > > > > > If you need them to be unique & parameterized, that's where
> it
> > > > > > > > takes
> > > > > > some
> > > > > > > > work to go in and cleanup the proxy recording w/
> paramaterized
> > > > > > > > data, response checking (if more than just checking HTTP 200
> > > > > > > > OKs). And
> > > > > you'll
> > > > > > > > find proxy recording generates a lot of unnecessary HTTP
> > > > > > > > requests for
> > > > > > > HTML,
> > > > > > > > CSS, image files that aren't necessary of interest as you're
> > > > > > > > testing
> > > > > > the
> > > > > > > > AJAX calls, which is where you filter out only the requests
> of
> > > > > interest
> > > > > > > and
> > > > > > > > only use those in test plan, etc.
> > > > > > > >
> > > > > > > > I believe this kind of work is needed regardless of what tool
> > > > > > > > you
> > > > > use,
> > > > > > > some
> > > > > > > > tools just make it easier, but there's still work to do. Not
> > > > > > > > just a
> > > > > one
> > > > > > > > touch button approach unless all you need is simple record &
> > > > > playback.
> > > > > > > >
> > > > > > > > On Tue, Feb 5, 2013 at 5:08 PM, Zippy Zeppoli <
> > > > > zippyzeppoli@gmail.com
> > > > > > > > >wrote:
> > > > > > > >
> > > > > > > > > Will probably just buy BrowserMob.
> > > > > > > > > Too bad there isn't an open source framework to already do
> > > this.
> > > > > > > > >
> > > > > > > > > Building this is a yak shave, and I need to be testing, not
> > > > > building
> > > > > > a
> > > > > > > > test
> > > > > > > > > harness thats probably going to break on the next release.
> > > > > > > > >
> > > > > > > > > On Tue, Feb 5, 2013 at 3:40 PM, David Luu <
> > mangaroo@gmail.com>
> > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > JMeter proxy is the most integrated approach, but I find
> it
> > > > > > > > > > gives
> > > > > > > "too
> > > > > > > > > much
> > > > > > > > > > information", so I tend to use external tools like
> browser
> > > > > traffic
> > > > > > > > > sniffers
> > > > > > > > > > (HttpFox, livehttpheaders, ieHttpHeaders) to see what
> HTTP
> > > > > requests
> > > > > > > are
> > > > > > > > > > made for AJAX calls for just the requests & responses I'm
> > > > > > interested
> > > > > > > > in,
> > > > > > > > > > easier to manage. But that's just my opinion, others
> might
> > > > > > > > > > find
> > > > > the
> > > > > > > > > JMeter
> > > > > > > > > > proxy easier to use.
> > > > > > > > > >
> > > > > > > > > > Whatever approach you take, you just need to know what
> HTTP
> > > > > > requests
> > > > > > > > are
> > > > > > > > > > made by the AJAX calls to replicate in JMeter, and
> > > > > > > > > > parameterize
> > > > > > those
> > > > > > > > > > requests to take in dynamic/test data as needed, assert
> > > > > appropriate
> > > > > > > > > > response data, etc. In this case, WebDriver can be
> dropped
> > > > > > > > > > from
> > > > > the
> > > > > > > > > > equation, just gives more overhead and lowers scalability
> > in
> > > > > > > > > > load generation.
> > > > > > > > > >
> > > > > > > > > > On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
> > > > > > > > > > p.mouawad@ubik-ingenierie.com> wrote:
> > > > > > > > > >
> > > > > > > > > > > AjaxCall will emit a network call which JMeter will
> > > capture.
> > > > > > > > > > >
> > > > > > > > > > > Use JMeter Server Proxy and you should have the Ajax
> > Calls
> > > > > > > recorded.
> > > > > > > > > > >
> > > > > > > > > > > Regards
> > > > > > > > > > > Philippe M.
> > > > > > > > > > >
> > > > > > > > > > > Follow me on twitter <https://twitter.com/philmdot>
> > > > > > > > > > >
> > > > > > > > > > > UBIK-INGENIERIE on TWITTER
> > > > > > > > > > > <https://twitter.com/ubikingenierie
> > > > > >
> > > > > > > > > > >
> > > > > > > > > > > UBIK LOAD PACK BLOG <
> > http://www.ubik-ingenierie.com/blog/>
> > > > > > > > > > >
> > > > > > > > > > > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <
> > > > > > > > zippyzeppoli@gmail.com
> > > > > > > > > > > >wrote:
> > > > > > > > > > >
> > > > > > > > > > > > To clarify:
> > > > > > > > > > > > An example would be:
> > > > > > > > > > > > 1) log in via a form post
> > > > > > > > > > > > 2) look at orders in an ecommerce interface (AJAX
> call)
> > > > > > > > > > > > 3) click on result to view order detail (AJAX)
> > > > > > > > > > > >
> > > > > > > > > > > > Pretty much a standard ecommerce transaction, but the
> > > > > interface
> > > > > > > is
> > > > > > > > > all
> > > > > > > > > > > > javascript.
> > > > > > > > > > > >
> > > > > > > > > > > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <
> > > > > > CStott@tnsi.com>
> > > > > > > > > > wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > > > From: David Luu [mailto:mangaroo@gmail.com]
> > > > > > > > > > > > > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > > > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > > > > Subject: Re: complex javascript actions in jmeter
> > > > > > > > > > > > > > load
> > > > > test
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >  >> You can use webdriver from jmeter.  Create a
> > > > > webdriver
> > > > > > > > class
> > > > > > > > > > that
> > > > > > > > > > > > > > performs the requests and runs the javascript via
> > > > > > > > > > > > > > the
> > > > > > > browser,
> > > > > > > > > then
> > > > > > > > > > > > > run/call
> > > > > > > > > > > > > > it from a BSF or JSR sampler.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Just to clarify, I take it that's only worthwhile
> > to
> > > > > > > > > > > > > > do
> > > > > (in
> > > > > > > > terms
> > > > > > > > > > of
> > > > > > > > > > > > > > scalability) when using PhantomJSDriver or
> > > > > > > > > > > > > > HtmlUnitDriver
> > > > > > or
> > > > > > > > > > > > > FirefoxDriver
> > > > > > > > > > > > > > (on Linux with xvfb) with JMeter this way?
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > "Worthwhile" depends on assumptions.
> > > > > > > > > > > > >
> > > > > > > > > > > > > > Because otherwise, the browser GUI is the
> > > > > > > > > > > > > > scalability
> > > > > > > limiting
> > > > > > > > > > factor
> > > > > > > > > > > > > even
> > > > > > > > > > > > > > with JMeter and Grid deployment, and in that
> case,
> > > > > > > > > > > > > > no
> > > > > > > > difference
> > > > > > > > > in
> > > > > > > > > > > > using
> > > > > > > > > > > > > > WebDriver outside JMeter to do performance tests
> > > > > > > > > > > > > > except
> > > > > if
> > > > > > > one
> > > > > > > > > > wants
> > > > > > > > > > > > the
> > > > > > > > > > > > > > JMeter logging/reporting facilities to help
> > > > > > > > > > > > > > performance
> > > > > > test,
> > > > > > > > > > because
> > > > > > > > > > > > > there's
> > > > > > > > > > > > > > no or minimal scalabiity gain.
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > Seems the poster is more at the
> capability/viability
> > > > > > > > > > > > > stage
> > > > > of
> > > > > > > > > > > developing
> > > > > > > > > > > > > tests?  We would need much more information to
> start
> > > > > advising
> > > > > > > on
> > > > > > > > > the
> > > > > > > > > > > > entire
> > > > > > > > > > > > > load testing process, start to finish, and what
> > > > > > > > > > > > > challenges
> > > > > > may
> > > > > > > > face
> > > > > > > > > > the
> > > > > > > > > > > > > poster along the way.
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <
> > > > > > > > CStott@tnsi.com>
> > > > > > > > > > > > wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > > You can use webdriver from jmeter.  Create a
> > > > > > > > > > > > > > > webdriver
> > > > > > > class
> > > > > > > > > that
> > > > > > > > > > > > > > > performs the requests and runs the javascript
> via
> > > > > > > > > > > > > > > the
> > > > > > > > browser,
> > > > > > > > > > then
> > > > > > > > > > > > > > > run/call it from a BSF or JSR sampler.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > > > > > From: Zippy Zeppoli
> > > > > > > > > > > > > > > > [mailto:zippyzeppoli@gmail.com]
> > > > > > > > > > > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > > > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > > > > > > Subject: Re: complex javascript actions in
> > > > > > > > > > > > > > > > jmeter
> > > > > load
> > > > > > > test
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > The problem is Selenium has no performance
> > > > > > > > > > > > > > > > testing
> > > > > > > harness.
> > > > > > > > > > > > > > > > Sucks that it seems BrowserMob (paid
> solution)
> > > > > > > > > > > > > > > > is the
> > > > > > > only
> > > > > > > > > > solid
> > > > > > > > > > > > > option.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Until someone builds something with
> Phantom.js,
> > > > > > > > > > > > > > > > but
> > > > > it
> > > > > > > > seems
> > > > > > > > > > > JMeter
> > > > > > > > > > > > > > > > isn't going to cut it here.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <
> > > > > > > > > mangaroo@gmail.com>
> > > > > > > > > > > > > wrote:
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > You'll need to figure out what the complex
> > > > > javascript
> > > > > > > > does.
> > > > > > > > > > > Does
> > > > > > > > > > > > > > > > > it make any AJAX requests, or is it all
> local
> > > > > client
> > > > > > > side
> > > > > > > > > > > > > > > processing/rendering?
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > If it's all local, then there's no point
> > > > > > > > > > > > > > > > > testing it
> > > > > > > with
> > > > > > > > > > > JMeter,
> > > > > > > > > > > > > > > > > that's client side browser testing better
> > done
> > > > > > > > > > > > > > > > > with
> > > > > > > > > Selenium.
> > > > > > > > > > > It
> > > > > > > > > > > > > > > > > won't impact the server side load test
> > (except
> > > > > delay
> > > > > > in
> > > > > > > > > > server
> > > > > > > > > > > > > > > > > response time for fetching files will
> impact
> > > > > > > > > > > > > > > > > the
> > > > > > > > javascript
> > > > > > > > > > > > > > > > > execution on client side, but that can be
> > > > > compensated
> > > > > > > w/
> > > > > > > > > > JMeter
> > > > > > > > > > > > > > > > > load test against server with 1+ Selenium
> > test
> > > > > > running
> > > > > > > at
> > > > > > > > > > same
> > > > > > > > > > > > > > > > > time to gauge client side performance of
> > > > > > > > > > > > > > > > > site/app
> > > > > in
> > > > > > > > > > browser).
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > If the javascript does execute AJAX
> requests,
> > > > > > > > > > > > > > > > > you
> > > > > > need
> > > > > > > to
> > > > > > > > > > > figure
> > > > > > > > > > > > > > > > > out the HTTP requests made and mimic that
> in
> > > > > > > > > > > > > > > > > JMeter
> > > > > > as
> > > > > > > > part
> > > > > > > > > > of
> > > > > > > > > > > > your
> > > > > > > > > > > > > > test.
> > > > > > > > > > > > > > > > > You can get that reading dev/design docs,
> or
> > > > > reverse
> > > > > > > > > > > > > > > > > engineer/traffic sniffing the app while
> doing
> > > > > manual
> > > > > > > > > testing.
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy
> Zeppoli
> > > > > > > > > > > > > > > > > <zippyzeppoli@gmail.com
> > > > > > > > > > > > > > > > > >wrote:
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > > > > > > If I have a website which requires
> logging
> > > > > > > > > > > > > > > > > > in,
> > > > > and
> > > > > > > > > > executing
> > > > > > > > > > > > > > > > > > complex javascript actions, how would I
> do
> > > > > > > > > > > > > > > > > > this
> > > > > (if
> > > > > > > at
> > > > > > > > > all)
> > > > > > > > > > > in
> > > > > > > > > > > > > jmeter?
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > I've heard of writing groovy scripts to
> do
> > > > > > > > > > > > > > > > > > this
> > > > > but
> > > > > > > > this
> > > > > > > > > > > sounds
> > > > > > > > > > > > > > > > > > like a
> > > > > > > > > > > > > > > > > lot
> > > > > > > > > > > > > > > > > > of work / maintenance.
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Thank you.
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > >
> > ------------------------------------------------------------------
> > > > > > > ---
> > > > > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > user-unsubscribe@jmeter.apache.org
> > > > > > > > > > > > > > > For additional commands, e-mail:
> > > > > > > user-help@jmeter.apache.org
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > > > > > user-unsubscribe@jmeter.apache.org
> > > > > > > > > > > > > For additional commands, e-mail:
> > > > > user-help@jmeter.apache.org
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > For additional commands, e-mail: user-help@jmeter.apache.org
> > >
> > >
> >
>

Re: complex javascript actions in jmeter load test

Posted by Shmuel Krakower <sh...@gmail.com>.
Hi David,
I saw some solutions suggesting Selenium for load testing (so they promise
"easier" scripting) but not sure how accurate the numbers are and in
general, not sure how much a single selenium load test can scale to
internet kind of load (thousands of parallel threads/browsers)...

That's where I noticed that some load testing SaaS providers (cannot recall
who right now), provide what you've described above.
I like that approach, monitoring with Selenium during a JMeter load test.
The only downside I see here, is the extra work for managing both set of
scripts and maintaining extra infrastructure for Selenium.
Have you ever done this? How did it work out for you?
Did someone ever tried to use the JMeter WebDriver plugin (
https://github.com/cplim/JMeter), so it sounds easier to control this
approach from a single test plan?

Shmuel Krakower.
www.Beatsoo.org - re-use your jmeter scripts for application performance
monitoring from worldwide locations for free.


On Wed, Feb 6, 2013 at 6:17 AM, David Luu <ma...@gmail.com> wrote:

> Also, if the OP's intent is to want to test both server & client
> performance, then in terms of JMeter, the optimal approach is to run 2
> tests in parallel:
>
> * a JMeter load test generating HTTP requests emulating the AJAX calls, set
> to run for X user load (X threads)
> * a Selenium test customized to log response times of every action (e.g.
> AJAX javascript click & expecting some UI response), going through same UI
> flow as JMeter test but exercising real UI, this test is configured to run
> in a loop continuously (might need test framework to support this or custom
> code).
>
> The JMeter test will stress & analyze server while the Selenium test will
> assess the browser performance at the same time.
>
> That's the best approach for any toolset used for testing both clien &
> server performance at same time. Some commercial tools just might happen to
> bundle both types of testing together.
>
> On Tue, Feb 5, 2013 at 6:59 PM, Stott, Charlie <CS...@tnsi.com> wrote:
>
> > You only need to include the javascript performance if you are testing
> > browser performance.
> >
> > I assume you are testing server performance, which is responding to AJAX
> > requests, not to javascript interpretation.  The interpretation produces
> a
> > request which jmeter can emulate.
> >
> > The clicking of the javascript button is incidental to the performance of
> > the server.  If the click MUST be emulated for whatever reason we don't
> > understand, webdriver can do it.  But there is no point testing the
> > performance of webdriver samples this way.  It is more useful if it
> > considered part of setup and teardown.  Why would you want the
> performance
> > of the javascript, the rendering of a button and a clicking event.  What
> do
> > you gain from this?
> >
> > Charlie
> >
> >
> >
> > > -----Original Message-----
> > > From: Deepak Shetty [mailto:shettyd@gmail.com]
> > > Sent: Wednesday, 6 February 2013 12:51 PM
> > > To: JMeter Users List
> > > Subject: Re: complex javascript actions in jmeter load test
> > >
> > > >Actually that does matter it cannot do JavaScript. If a request
> > > >requires you need to be able to click a JavaScript button then the
> > > >request will never happen.
> > > The point is that what happens when the button is clicked? Assuming
> its a
> > > server - ajax call then A HTTP call is made and some parameters are
> > passed
> > > and some values are returned. Thats whats important for the load test ,
> > not
> > > the fact that javascript was executed.
> > > So when you record the script , you will be the person clicking the
> > > button(you are recording your actions) , JMeter will record every
> > interaction
> > > that makes a call to the server and will record this as a separate HTTP
> > > request and when you run the script the same request will be made as if
> > > someone clicked the button!
> > >
> > > You dont need to use the recorder either , you can modify the script
> > > yourself.
> > >
> > > If the javascript didnt actually make any server side call - then it
> > doesnt
> > > matter because you dont want to load test this anyway.
> > >
> > > Have you actually tried this? It sounds as if you have a problem
> > recording
> > > your script and you probably have concluded that JMeter doesnt do
> > > javascript (true) and hence cant test websites that do javascript/ajax
> > > (false)
> > >
> > > >Real browser is needed
> > > Not for a good deal of use cases - as many of the people on this
> mailing
> > list
> > > can attest too.
> > >
> > >
> > >
> > >
> > >
> > > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli
> > > <zi...@gmail.com>wrote:
> > >
> > > > Deepak,
> > > > Actually that does matter it cannot do JavaScript. If a request
> > > > requires you need to be able to click a JavaScript button then the
> > > > request will never happen. No request will ever be made.  Also
> testing
> > > > true web performance requires rendering the DOM, not just initiating
> > > > HTTP requests and recording the response time, rps, etc.
> > > >
> > > > Real browser is needed, with JavaScript, and Jmeter doesn't integrate
> > > > well with this, it isn't designed for this, which is understandable.
> > > > The problem is there is a gap between real browser testing (owned by
> > > > third party
> > > > companies) and open source tools (Jmeter). There's nothing in between
> > > > for real-browser based performance testing. I could go into why, but
> > > > its off topic of this list, and I'd rather spare everyone the gas.
> > > >
> > > > Point being, Jmeter cannot solve my problem, without some serious
> > > > customization.
> > > >
> > > >
> > > >
> > > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <sh...@gmail.com>
> > > wrote:
> > > >
> > > > > Hi
> > > > > You are getting too caught up in the JMeter doesnt do javascript
> > thing.
> > > > In
> > > > > most cases it doesnt matter.
> > > > > You have a webserver that is receiving HTTP requests - whether
> those
> > > > > requests are generated via the user clicking a link or via AJAX or
> > > > > via flash is hardly relevant to the webserver. It sees HTTP
> requests
> > > > > and
> > > > sends
> > > > > HTTP responses.
> > > > > JMeter deals with HTTP request and responses. As long as you can
> > > > > make the same request that your javascript is making (which you can
> > > > > see via the recording feature) , you can test it with Jmeter. The
> > > > > fact that the proxy cant record javascript is irrelevant - it only
> > > > > needs to record the requests. If your javascript is responsible for
> > > > > generating the requests
> > > > in
> > > > > some way , then you have to replicate that within JMeter.
> > > > >
> > > > > Some caveats here are
> > > > > a. Your toolkit should be good when you need to parameterise(JQuery
> > > > > is great , GWT sucks) b. If you need to perform some AJAX requests
> > > > > in parallel then JMeter isnt quite there yet.
> > > > >
> > > > > Its probably true that it is easier writing scripts for Selenium
> > > > > like
> > > > tools
> > > > > - but they also need more resources as well as given how often a UI
> > > > changes
> > > > > as opposed to the HTTP request/response pair , sometimes JMeter
> > > > > scripts
> > > > are
> > > > > more resilient to change.
> > > > >
> > > > > regards
> > > > > deepak
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Tue, Feb 5, 2013 at 5:29 PM, Zippy Zeppoli
> > > > > <zippyzeppoli@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > Proxy won't work for clicking on JavaScript.
> > > > > > Selenium will, however, Selenium isn't designed for performance
> > > > testing,
> > > > > > with the exception of BrowserMob, who has perfected it.
> > > > > >
> > > > > > If JMeter had some kind of (good) Selenium integration then it
> > > > > > might be able to achieve it.
> > > > > >
> > > > > > I think JMeter is a good tool, but it's not built for this kind
> of
> > > > work.
> > > > > >
> > > > > > On Tue, Feb 5, 2013 at 5:20 PM, David Luu <ma...@gmail.com>
> > > wrote:
> > > > > >
> > > > > > > I'm not familiar with the full feature set of BrowserMob, but
> > > > > > > JMeter
> > > > > can
> > > > > > do
> > > > > > > what you want, easy or hard, depending on your needs.
> > > > > > >
> > > > > > > If all you need is simple record & playback, JMeter proxy is
> > > > > > > best
> > > > > option.
> > > > > > > Just record w/ proxy, it generates a basic test plan that you
> > > > > > > can
> > > > save
> > > > > to
> > > > > > > file and run w/ X threads to generate load, etc.
> > > > > > >
> > > > > > > But that approach will always use the same user, same data in
> > > > > > > the
> > > > AJAX
> > > > > > > calls during load generation.
> > > > > > >
> > > > > > > If you need them to be unique & parameterized, that's where it
> > > > > > > takes
> > > > > some
> > > > > > > work to go in and cleanup the proxy recording w/ paramaterized
> > > > > > > data, response checking (if more than just checking HTTP 200
> > > > > > > OKs). And
> > > > you'll
> > > > > > > find proxy recording generates a lot of unnecessary HTTP
> > > > > > > requests for
> > > > > > HTML,
> > > > > > > CSS, image files that aren't necessary of interest as you're
> > > > > > > testing
> > > > > the
> > > > > > > AJAX calls, which is where you filter out only the requests of
> > > > interest
> > > > > > and
> > > > > > > only use those in test plan, etc.
> > > > > > >
> > > > > > > I believe this kind of work is needed regardless of what tool
> > > > > > > you
> > > > use,
> > > > > > some
> > > > > > > tools just make it easier, but there's still work to do. Not
> > > > > > > just a
> > > > one
> > > > > > > touch button approach unless all you need is simple record &
> > > > playback.
> > > > > > >
> > > > > > > On Tue, Feb 5, 2013 at 5:08 PM, Zippy Zeppoli <
> > > > zippyzeppoli@gmail.com
> > > > > > > >wrote:
> > > > > > >
> > > > > > > > Will probably just buy BrowserMob.
> > > > > > > > Too bad there isn't an open source framework to already do
> > this.
> > > > > > > >
> > > > > > > > Building this is a yak shave, and I need to be testing, not
> > > > building
> > > > > a
> > > > > > > test
> > > > > > > > harness thats probably going to break on the next release.
> > > > > > > >
> > > > > > > > On Tue, Feb 5, 2013 at 3:40 PM, David Luu <
> mangaroo@gmail.com>
> > > > > wrote:
> > > > > > > >
> > > > > > > > > JMeter proxy is the most integrated approach, but I find it
> > > > > > > > > gives
> > > > > > "too
> > > > > > > > much
> > > > > > > > > information", so I tend to use external tools like browser
> > > > traffic
> > > > > > > > sniffers
> > > > > > > > > (HttpFox, livehttpheaders, ieHttpHeaders) to see what HTTP
> > > > requests
> > > > > > are
> > > > > > > > > made for AJAX calls for just the requests & responses I'm
> > > > > interested
> > > > > > > in,
> > > > > > > > > easier to manage. But that's just my opinion, others might
> > > > > > > > > find
> > > > the
> > > > > > > > JMeter
> > > > > > > > > proxy easier to use.
> > > > > > > > >
> > > > > > > > > Whatever approach you take, you just need to know what HTTP
> > > > > requests
> > > > > > > are
> > > > > > > > > made by the AJAX calls to replicate in JMeter, and
> > > > > > > > > parameterize
> > > > > those
> > > > > > > > > requests to take in dynamic/test data as needed, assert
> > > > appropriate
> > > > > > > > > response data, etc. In this case, WebDriver can be dropped
> > > > > > > > > from
> > > > the
> > > > > > > > > equation, just gives more overhead and lowers scalability
> in
> > > > > > > > > load generation.
> > > > > > > > >
> > > > > > > > > On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
> > > > > > > > > p.mouawad@ubik-ingenierie.com> wrote:
> > > > > > > > >
> > > > > > > > > > AjaxCall will emit a network call which JMeter will
> > capture.
> > > > > > > > > >
> > > > > > > > > > Use JMeter Server Proxy and you should have the Ajax
> Calls
> > > > > > recorded.
> > > > > > > > > >
> > > > > > > > > > Regards
> > > > > > > > > > Philippe M.
> > > > > > > > > >
> > > > > > > > > > Follow me on twitter <https://twitter.com/philmdot>
> > > > > > > > > >
> > > > > > > > > > UBIK-INGENIERIE on TWITTER
> > > > > > > > > > <https://twitter.com/ubikingenierie
> > > > >
> > > > > > > > > >
> > > > > > > > > > UBIK LOAD PACK BLOG <
> http://www.ubik-ingenierie.com/blog/>
> > > > > > > > > >
> > > > > > > > > > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <
> > > > > > > zippyzeppoli@gmail.com
> > > > > > > > > > >wrote:
> > > > > > > > > >
> > > > > > > > > > > To clarify:
> > > > > > > > > > > An example would be:
> > > > > > > > > > > 1) log in via a form post
> > > > > > > > > > > 2) look at orders in an ecommerce interface (AJAX call)
> > > > > > > > > > > 3) click on result to view order detail (AJAX)
> > > > > > > > > > >
> > > > > > > > > > > Pretty much a standard ecommerce transaction, but the
> > > > interface
> > > > > > is
> > > > > > > > all
> > > > > > > > > > > javascript.
> > > > > > > > > > >
> > > > > > > > > > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <
> > > > > CStott@tnsi.com>
> > > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > > From: David Luu [mailto:mangaroo@gmail.com]
> > > > > > > > > > > > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > > > Subject: Re: complex javascript actions in jmeter
> > > > > > > > > > > > > load
> > > > test
> > > > > > > > > > > > >
> > > > > > > > > > > > >  >> You can use webdriver from jmeter.  Create a
> > > > webdriver
> > > > > > > class
> > > > > > > > > that
> > > > > > > > > > > > > performs the requests and runs the javascript via
> > > > > > > > > > > > > the
> > > > > > browser,
> > > > > > > > then
> > > > > > > > > > > > run/call
> > > > > > > > > > > > > it from a BSF or JSR sampler.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Just to clarify, I take it that's only worthwhile
> to
> > > > > > > > > > > > > do
> > > > (in
> > > > > > > terms
> > > > > > > > > of
> > > > > > > > > > > > > scalability) when using PhantomJSDriver or
> > > > > > > > > > > > > HtmlUnitDriver
> > > > > or
> > > > > > > > > > > > FirefoxDriver
> > > > > > > > > > > > > (on Linux with xvfb) with JMeter this way?
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > "Worthwhile" depends on assumptions.
> > > > > > > > > > > >
> > > > > > > > > > > > > Because otherwise, the browser GUI is the
> > > > > > > > > > > > > scalability
> > > > > > limiting
> > > > > > > > > factor
> > > > > > > > > > > > even
> > > > > > > > > > > > > with JMeter and Grid deployment, and in that case,
> > > > > > > > > > > > > no
> > > > > > > difference
> > > > > > > > in
> > > > > > > > > > > using
> > > > > > > > > > > > > WebDriver outside JMeter to do performance tests
> > > > > > > > > > > > > except
> > > > if
> > > > > > one
> > > > > > > > > wants
> > > > > > > > > > > the
> > > > > > > > > > > > > JMeter logging/reporting facilities to help
> > > > > > > > > > > > > performance
> > > > > test,
> > > > > > > > > because
> > > > > > > > > > > > there's
> > > > > > > > > > > > > no or minimal scalabiity gain.
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > Seems the poster is more at the capability/viability
> > > > > > > > > > > > stage
> > > > of
> > > > > > > > > > developing
> > > > > > > > > > > > tests?  We would need much more information to start
> > > > advising
> > > > > > on
> > > > > > > > the
> > > > > > > > > > > entire
> > > > > > > > > > > > load testing process, start to finish, and what
> > > > > > > > > > > > challenges
> > > > > may
> > > > > > > face
> > > > > > > > > the
> > > > > > > > > > > > poster along the way.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <
> > > > > > > CStott@tnsi.com>
> > > > > > > > > > > wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > > You can use webdriver from jmeter.  Create a
> > > > > > > > > > > > > > webdriver
> > > > > > class
> > > > > > > > that
> > > > > > > > > > > > > > performs the requests and runs the javascript via
> > > > > > > > > > > > > > the
> > > > > > > browser,
> > > > > > > > > then
> > > > > > > > > > > > > > run/call it from a BSF or JSR sampler.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > > > > From: Zippy Zeppoli
> > > > > > > > > > > > > > > [mailto:zippyzeppoli@gmail.com]
> > > > > > > > > > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > > > > > Subject: Re: complex javascript actions in
> > > > > > > > > > > > > > > jmeter
> > > > load
> > > > > > test
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > The problem is Selenium has no performance
> > > > > > > > > > > > > > > testing
> > > > > > harness.
> > > > > > > > > > > > > > > Sucks that it seems BrowserMob (paid solution)
> > > > > > > > > > > > > > > is the
> > > > > > only
> > > > > > > > > solid
> > > > > > > > > > > > option.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Until someone builds something with Phantom.js,
> > > > > > > > > > > > > > > but
> > > > it
> > > > > > > seems
> > > > > > > > > > JMeter
> > > > > > > > > > > > > > > isn't going to cut it here.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <
> > > > > > > > mangaroo@gmail.com>
> > > > > > > > > > > > wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > You'll need to figure out what the complex
> > > > javascript
> > > > > > > does.
> > > > > > > > > > Does
> > > > > > > > > > > > > > > > it make any AJAX requests, or is it all local
> > > > client
> > > > > > side
> > > > > > > > > > > > > > processing/rendering?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > If it's all local, then there's no point
> > > > > > > > > > > > > > > > testing it
> > > > > > with
> > > > > > > > > > JMeter,
> > > > > > > > > > > > > > > > that's client side browser testing better
> done
> > > > > > > > > > > > > > > > with
> > > > > > > > Selenium.
> > > > > > > > > > It
> > > > > > > > > > > > > > > > won't impact the server side load test
> (except
> > > > delay
> > > > > in
> > > > > > > > > server
> > > > > > > > > > > > > > > > response time for fetching files will impact
> > > > > > > > > > > > > > > > the
> > > > > > > javascript
> > > > > > > > > > > > > > > > execution on client side, but that can be
> > > > compensated
> > > > > > w/
> > > > > > > > > JMeter
> > > > > > > > > > > > > > > > load test against server with 1+ Selenium
> test
> > > > > running
> > > > > > at
> > > > > > > > > same
> > > > > > > > > > > > > > > > time to gauge client side performance of
> > > > > > > > > > > > > > > > site/app
> > > > in
> > > > > > > > > browser).
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > If the javascript does execute AJAX requests,
> > > > > > > > > > > > > > > > you
> > > > > need
> > > > > > to
> > > > > > > > > > figure
> > > > > > > > > > > > > > > > out the HTTP requests made and mimic that in
> > > > > > > > > > > > > > > > JMeter
> > > > > as
> > > > > > > part
> > > > > > > > > of
> > > > > > > > > > > your
> > > > > > > > > > > > > test.
> > > > > > > > > > > > > > > > You can get that reading dev/design docs, or
> > > > reverse
> > > > > > > > > > > > > > > > engineer/traffic sniffing the app while doing
> > > > manual
> > > > > > > > testing.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > > > > > > > > > > > > > <zippyzeppoli@gmail.com
> > > > > > > > > > > > > > > > >wrote:
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > > > > > If I have a website which requires logging
> > > > > > > > > > > > > > > > > in,
> > > > and
> > > > > > > > > executing
> > > > > > > > > > > > > > > > > complex javascript actions, how would I do
> > > > > > > > > > > > > > > > > this
> > > > (if
> > > > > > at
> > > > > > > > all)
> > > > > > > > > > in
> > > > > > > > > > > > jmeter?
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > I've heard of writing groovy scripts to do
> > > > > > > > > > > > > > > > > this
> > > > but
> > > > > > > this
> > > > > > > > > > sounds
> > > > > > > > > > > > > > > > > like a
> > > > > > > > > > > > > > > > lot
> > > > > > > > > > > > > > > > > of work / maintenance.
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Thank you.
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > >
> > > > > >
> ------------------------------------------------------------------
> > > > > > ---
> > > > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > user-unsubscribe@jmeter.apache.org
> > > > > > > > > > > > > > For additional commands, e-mail:
> > > > > > user-help@jmeter.apache.org
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > > > > user-unsubscribe@jmeter.apache.org
> > > > > > > > > > > > For additional commands, e-mail:
> > > > user-help@jmeter.apache.org
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
> >
>

Re: complex javascript actions in jmeter load test

Posted by David Luu <ma...@gmail.com>.
Also, if the OP's intent is to want to test both server & client
performance, then in terms of JMeter, the optimal approach is to run 2
tests in parallel:

* a JMeter load test generating HTTP requests emulating the AJAX calls, set
to run for X user load (X threads)
* a Selenium test customized to log response times of every action (e.g.
AJAX javascript click & expecting some UI response), going through same UI
flow as JMeter test but exercising real UI, this test is configured to run
in a loop continuously (might need test framework to support this or custom
code).

The JMeter test will stress & analyze server while the Selenium test will
assess the browser performance at the same time.

That's the best approach for any toolset used for testing both clien &
server performance at same time. Some commercial tools just might happen to
bundle both types of testing together.

On Tue, Feb 5, 2013 at 6:59 PM, Stott, Charlie <CS...@tnsi.com> wrote:

> You only need to include the javascript performance if you are testing
> browser performance.
>
> I assume you are testing server performance, which is responding to AJAX
> requests, not to javascript interpretation.  The interpretation produces a
> request which jmeter can emulate.
>
> The clicking of the javascript button is incidental to the performance of
> the server.  If the click MUST be emulated for whatever reason we don't
> understand, webdriver can do it.  But there is no point testing the
> performance of webdriver samples this way.  It is more useful if it
> considered part of setup and teardown.  Why would you want the performance
> of the javascript, the rendering of a button and a clicking event.  What do
> you gain from this?
>
> Charlie
>
>
>
> > -----Original Message-----
> > From: Deepak Shetty [mailto:shettyd@gmail.com]
> > Sent: Wednesday, 6 February 2013 12:51 PM
> > To: JMeter Users List
> > Subject: Re: complex javascript actions in jmeter load test
> >
> > >Actually that does matter it cannot do JavaScript. If a request
> > >requires you need to be able to click a JavaScript button then the
> > >request will never happen.
> > The point is that what happens when the button is clicked? Assuming its a
> > server - ajax call then A HTTP call is made and some parameters are
> passed
> > and some values are returned. Thats whats important for the load test ,
> not
> > the fact that javascript was executed.
> > So when you record the script , you will be the person clicking the
> > button(you are recording your actions) , JMeter will record every
> interaction
> > that makes a call to the server and will record this as a separate HTTP
> > request and when you run the script the same request will be made as if
> > someone clicked the button!
> >
> > You dont need to use the recorder either , you can modify the script
> > yourself.
> >
> > If the javascript didnt actually make any server side call - then it
> doesnt
> > matter because you dont want to load test this anyway.
> >
> > Have you actually tried this? It sounds as if you have a problem
> recording
> > your script and you probably have concluded that JMeter doesnt do
> > javascript (true) and hence cant test websites that do javascript/ajax
> > (false)
> >
> > >Real browser is needed
> > Not for a good deal of use cases - as many of the people on this mailing
> list
> > can attest too.
> >
> >
> >
> >
> >
> > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli
> > <zi...@gmail.com>wrote:
> >
> > > Deepak,
> > > Actually that does matter it cannot do JavaScript. If a request
> > > requires you need to be able to click a JavaScript button then the
> > > request will never happen. No request will ever be made.  Also testing
> > > true web performance requires rendering the DOM, not just initiating
> > > HTTP requests and recording the response time, rps, etc.
> > >
> > > Real browser is needed, with JavaScript, and Jmeter doesn't integrate
> > > well with this, it isn't designed for this, which is understandable.
> > > The problem is there is a gap between real browser testing (owned by
> > > third party
> > > companies) and open source tools (Jmeter). There's nothing in between
> > > for real-browser based performance testing. I could go into why, but
> > > its off topic of this list, and I'd rather spare everyone the gas.
> > >
> > > Point being, Jmeter cannot solve my problem, without some serious
> > > customization.
> > >
> > >
> > >
> > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <sh...@gmail.com>
> > wrote:
> > >
> > > > Hi
> > > > You are getting too caught up in the JMeter doesnt do javascript
> thing.
> > > In
> > > > most cases it doesnt matter.
> > > > You have a webserver that is receiving HTTP requests - whether those
> > > > requests are generated via the user clicking a link or via AJAX or
> > > > via flash is hardly relevant to the webserver. It sees HTTP requests
> > > > and
> > > sends
> > > > HTTP responses.
> > > > JMeter deals with HTTP request and responses. As long as you can
> > > > make the same request that your javascript is making (which you can
> > > > see via the recording feature) , you can test it with Jmeter. The
> > > > fact that the proxy cant record javascript is irrelevant - it only
> > > > needs to record the requests. If your javascript is responsible for
> > > > generating the requests
> > > in
> > > > some way , then you have to replicate that within JMeter.
> > > >
> > > > Some caveats here are
> > > > a. Your toolkit should be good when you need to parameterise(JQuery
> > > > is great , GWT sucks) b. If you need to perform some AJAX requests
> > > > in parallel then JMeter isnt quite there yet.
> > > >
> > > > Its probably true that it is easier writing scripts for Selenium
> > > > like
> > > tools
> > > > - but they also need more resources as well as given how often a UI
> > > changes
> > > > as opposed to the HTTP request/response pair , sometimes JMeter
> > > > scripts
> > > are
> > > > more resilient to change.
> > > >
> > > > regards
> > > > deepak
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Tue, Feb 5, 2013 at 5:29 PM, Zippy Zeppoli
> > > > <zippyzeppoli@gmail.com
> > > > >wrote:
> > > >
> > > > > Proxy won't work for clicking on JavaScript.
> > > > > Selenium will, however, Selenium isn't designed for performance
> > > testing,
> > > > > with the exception of BrowserMob, who has perfected it.
> > > > >
> > > > > If JMeter had some kind of (good) Selenium integration then it
> > > > > might be able to achieve it.
> > > > >
> > > > > I think JMeter is a good tool, but it's not built for this kind of
> > > work.
> > > > >
> > > > > On Tue, Feb 5, 2013 at 5:20 PM, David Luu <ma...@gmail.com>
> > wrote:
> > > > >
> > > > > > I'm not familiar with the full feature set of BrowserMob, but
> > > > > > JMeter
> > > > can
> > > > > do
> > > > > > what you want, easy or hard, depending on your needs.
> > > > > >
> > > > > > If all you need is simple record & playback, JMeter proxy is
> > > > > > best
> > > > option.
> > > > > > Just record w/ proxy, it generates a basic test plan that you
> > > > > > can
> > > save
> > > > to
> > > > > > file and run w/ X threads to generate load, etc.
> > > > > >
> > > > > > But that approach will always use the same user, same data in
> > > > > > the
> > > AJAX
> > > > > > calls during load generation.
> > > > > >
> > > > > > If you need them to be unique & parameterized, that's where it
> > > > > > takes
> > > > some
> > > > > > work to go in and cleanup the proxy recording w/ paramaterized
> > > > > > data, response checking (if more than just checking HTTP 200
> > > > > > OKs). And
> > > you'll
> > > > > > find proxy recording generates a lot of unnecessary HTTP
> > > > > > requests for
> > > > > HTML,
> > > > > > CSS, image files that aren't necessary of interest as you're
> > > > > > testing
> > > > the
> > > > > > AJAX calls, which is where you filter out only the requests of
> > > interest
> > > > > and
> > > > > > only use those in test plan, etc.
> > > > > >
> > > > > > I believe this kind of work is needed regardless of what tool
> > > > > > you
> > > use,
> > > > > some
> > > > > > tools just make it easier, but there's still work to do. Not
> > > > > > just a
> > > one
> > > > > > touch button approach unless all you need is simple record &
> > > playback.
> > > > > >
> > > > > > On Tue, Feb 5, 2013 at 5:08 PM, Zippy Zeppoli <
> > > zippyzeppoli@gmail.com
> > > > > > >wrote:
> > > > > >
> > > > > > > Will probably just buy BrowserMob.
> > > > > > > Too bad there isn't an open source framework to already do
> this.
> > > > > > >
> > > > > > > Building this is a yak shave, and I need to be testing, not
> > > building
> > > > a
> > > > > > test
> > > > > > > harness thats probably going to break on the next release.
> > > > > > >
> > > > > > > On Tue, Feb 5, 2013 at 3:40 PM, David Luu <ma...@gmail.com>
> > > > wrote:
> > > > > > >
> > > > > > > > JMeter proxy is the most integrated approach, but I find it
> > > > > > > > gives
> > > > > "too
> > > > > > > much
> > > > > > > > information", so I tend to use external tools like browser
> > > traffic
> > > > > > > sniffers
> > > > > > > > (HttpFox, livehttpheaders, ieHttpHeaders) to see what HTTP
> > > requests
> > > > > are
> > > > > > > > made for AJAX calls for just the requests & responses I'm
> > > > interested
> > > > > > in,
> > > > > > > > easier to manage. But that's just my opinion, others might
> > > > > > > > find
> > > the
> > > > > > > JMeter
> > > > > > > > proxy easier to use.
> > > > > > > >
> > > > > > > > Whatever approach you take, you just need to know what HTTP
> > > > requests
> > > > > > are
> > > > > > > > made by the AJAX calls to replicate in JMeter, and
> > > > > > > > parameterize
> > > > those
> > > > > > > > requests to take in dynamic/test data as needed, assert
> > > appropriate
> > > > > > > > response data, etc. In this case, WebDriver can be dropped
> > > > > > > > from
> > > the
> > > > > > > > equation, just gives more overhead and lowers scalability in
> > > > > > > > load generation.
> > > > > > > >
> > > > > > > > On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
> > > > > > > > p.mouawad@ubik-ingenierie.com> wrote:
> > > > > > > >
> > > > > > > > > AjaxCall will emit a network call which JMeter will
> capture.
> > > > > > > > >
> > > > > > > > > Use JMeter Server Proxy and you should have the Ajax Calls
> > > > > recorded.
> > > > > > > > >
> > > > > > > > > Regards
> > > > > > > > > Philippe M.
> > > > > > > > >
> > > > > > > > > Follow me on twitter <https://twitter.com/philmdot>
> > > > > > > > >
> > > > > > > > > UBIK-INGENIERIE on TWITTER
> > > > > > > > > <https://twitter.com/ubikingenierie
> > > >
> > > > > > > > >
> > > > > > > > > UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/>
> > > > > > > > >
> > > > > > > > > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <
> > > > > > zippyzeppoli@gmail.com
> > > > > > > > > >wrote:
> > > > > > > > >
> > > > > > > > > > To clarify:
> > > > > > > > > > An example would be:
> > > > > > > > > > 1) log in via a form post
> > > > > > > > > > 2) look at orders in an ecommerce interface (AJAX call)
> > > > > > > > > > 3) click on result to view order detail (AJAX)
> > > > > > > > > >
> > > > > > > > > > Pretty much a standard ecommerce transaction, but the
> > > interface
> > > > > is
> > > > > > > all
> > > > > > > > > > javascript.
> > > > > > > > > >
> > > > > > > > > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <
> > > > CStott@tnsi.com>
> > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > From: David Luu [mailto:mangaroo@gmail.com]
> > > > > > > > > > > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > > Subject: Re: complex javascript actions in jmeter
> > > > > > > > > > > > load
> > > test
> > > > > > > > > > > >
> > > > > > > > > > > >  >> You can use webdriver from jmeter.  Create a
> > > webdriver
> > > > > > class
> > > > > > > > that
> > > > > > > > > > > > performs the requests and runs the javascript via
> > > > > > > > > > > > the
> > > > > browser,
> > > > > > > then
> > > > > > > > > > > run/call
> > > > > > > > > > > > it from a BSF or JSR sampler.
> > > > > > > > > > > >
> > > > > > > > > > > > Just to clarify, I take it that's only worthwhile to
> > > > > > > > > > > > do
> > > (in
> > > > > > terms
> > > > > > > > of
> > > > > > > > > > > > scalability) when using PhantomJSDriver or
> > > > > > > > > > > > HtmlUnitDriver
> > > > or
> > > > > > > > > > > FirefoxDriver
> > > > > > > > > > > > (on Linux with xvfb) with JMeter this way?
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > "Worthwhile" depends on assumptions.
> > > > > > > > > > >
> > > > > > > > > > > > Because otherwise, the browser GUI is the
> > > > > > > > > > > > scalability
> > > > > limiting
> > > > > > > > factor
> > > > > > > > > > > even
> > > > > > > > > > > > with JMeter and Grid deployment, and in that case,
> > > > > > > > > > > > no
> > > > > > difference
> > > > > > > in
> > > > > > > > > > using
> > > > > > > > > > > > WebDriver outside JMeter to do performance tests
> > > > > > > > > > > > except
> > > if
> > > > > one
> > > > > > > > wants
> > > > > > > > > > the
> > > > > > > > > > > > JMeter logging/reporting facilities to help
> > > > > > > > > > > > performance
> > > > test,
> > > > > > > > because
> > > > > > > > > > > there's
> > > > > > > > > > > > no or minimal scalabiity gain.
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Seems the poster is more at the capability/viability
> > > > > > > > > > > stage
> > > of
> > > > > > > > > developing
> > > > > > > > > > > tests?  We would need much more information to start
> > > advising
> > > > > on
> > > > > > > the
> > > > > > > > > > entire
> > > > > > > > > > > load testing process, start to finish, and what
> > > > > > > > > > > challenges
> > > > may
> > > > > > face
> > > > > > > > the
> > > > > > > > > > > poster along the way.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <
> > > > > > CStott@tnsi.com>
> > > > > > > > > > wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > You can use webdriver from jmeter.  Create a
> > > > > > > > > > > > > webdriver
> > > > > class
> > > > > > > that
> > > > > > > > > > > > > performs the requests and runs the javascript via
> > > > > > > > > > > > > the
> > > > > > browser,
> > > > > > > > then
> > > > > > > > > > > > > run/call it from a BSF or JSR sampler.
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > > > From: Zippy Zeppoli
> > > > > > > > > > > > > > [mailto:zippyzeppoli@gmail.com]
> > > > > > > > > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > > > > Subject: Re: complex javascript actions in
> > > > > > > > > > > > > > jmeter
> > > load
> > > > > test
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > The problem is Selenium has no performance
> > > > > > > > > > > > > > testing
> > > > > harness.
> > > > > > > > > > > > > > Sucks that it seems BrowserMob (paid solution)
> > > > > > > > > > > > > > is the
> > > > > only
> > > > > > > > solid
> > > > > > > > > > > option.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Until someone builds something with Phantom.js,
> > > > > > > > > > > > > > but
> > > it
> > > > > > seems
> > > > > > > > > JMeter
> > > > > > > > > > > > > > isn't going to cut it here.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <
> > > > > > > mangaroo@gmail.com>
> > > > > > > > > > > wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > > You'll need to figure out what the complex
> > > javascript
> > > > > > does.
> > > > > > > > > Does
> > > > > > > > > > > > > > > it make any AJAX requests, or is it all local
> > > client
> > > > > side
> > > > > > > > > > > > > processing/rendering?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > If it's all local, then there's no point
> > > > > > > > > > > > > > > testing it
> > > > > with
> > > > > > > > > JMeter,
> > > > > > > > > > > > > > > that's client side browser testing better done
> > > > > > > > > > > > > > > with
> > > > > > > Selenium.
> > > > > > > > > It
> > > > > > > > > > > > > > > won't impact the server side load test (except
> > > delay
> > > > in
> > > > > > > > server
> > > > > > > > > > > > > > > response time for fetching files will impact
> > > > > > > > > > > > > > > the
> > > > > > javascript
> > > > > > > > > > > > > > > execution on client side, but that can be
> > > compensated
> > > > > w/
> > > > > > > > JMeter
> > > > > > > > > > > > > > > load test against server with 1+ Selenium test
> > > > running
> > > > > at
> > > > > > > > same
> > > > > > > > > > > > > > > time to gauge client side performance of
> > > > > > > > > > > > > > > site/app
> > > in
> > > > > > > > browser).
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > If the javascript does execute AJAX requests,
> > > > > > > > > > > > > > > you
> > > > need
> > > > > to
> > > > > > > > > figure
> > > > > > > > > > > > > > > out the HTTP requests made and mimic that in
> > > > > > > > > > > > > > > JMeter
> > > > as
> > > > > > part
> > > > > > > > of
> > > > > > > > > > your
> > > > > > > > > > > > test.
> > > > > > > > > > > > > > > You can get that reading dev/design docs, or
> > > reverse
> > > > > > > > > > > > > > > engineer/traffic sniffing the app while doing
> > > manual
> > > > > > > testing.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > > > > > > > > > > > > <zippyzeppoli@gmail.com
> > > > > > > > > > > > > > > >wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > > > > If I have a website which requires logging
> > > > > > > > > > > > > > > > in,
> > > and
> > > > > > > > executing
> > > > > > > > > > > > > > > > complex javascript actions, how would I do
> > > > > > > > > > > > > > > > this
> > > (if
> > > > > at
> > > > > > > all)
> > > > > > > > > in
> > > > > > > > > > > jmeter?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > I've heard of writing groovy scripts to do
> > > > > > > > > > > > > > > > this
> > > but
> > > > > > this
> > > > > > > > > sounds
> > > > > > > > > > > > > > > > like a
> > > > > > > > > > > > > > > lot
> > > > > > > > > > > > > > > > of work / maintenance.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Thank you.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > >
> > > > > ------------------------------------------------------------------
> > > > > ---
> > > > > > > > > > > > > To unsubscribe, e-mail:
> > > > user-unsubscribe@jmeter.apache.org
> > > > > > > > > > > > > For additional commands, e-mail:
> > > > > user-help@jmeter.apache.org
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > > > user-unsubscribe@jmeter.apache.org
> > > > > > > > > > > For additional commands, e-mail:
> > > user-help@jmeter.apache.org
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

RE: complex javascript actions in jmeter load test

Posted by "Stott, Charlie" <CS...@tnsi.com>.
You only need to include the javascript performance if you are testing browser performance.

I assume you are testing server performance, which is responding to AJAX requests, not to javascript interpretation.  The interpretation produces a request which jmeter can emulate.

The clicking of the javascript button is incidental to the performance of the server.  If the click MUST be emulated for whatever reason we don't understand, webdriver can do it.  But there is no point testing the performance of webdriver samples this way.  It is more useful if it considered part of setup and teardown.  Why would you want the performance of the javascript, the rendering of a button and a clicking event.  What do you gain from this?

Charlie



> -----Original Message-----
> From: Deepak Shetty [mailto:shettyd@gmail.com]
> Sent: Wednesday, 6 February 2013 12:51 PM
> To: JMeter Users List
> Subject: Re: complex javascript actions in jmeter load test
>
> >Actually that does matter it cannot do JavaScript. If a request
> >requires you need to be able to click a JavaScript button then the
> >request will never happen.
> The point is that what happens when the button is clicked? Assuming its a
> server - ajax call then A HTTP call is made and some parameters are passed
> and some values are returned. Thats whats important for the load test , not
> the fact that javascript was executed.
> So when you record the script , you will be the person clicking the
> button(you are recording your actions) , JMeter will record every interaction
> that makes a call to the server and will record this as a separate HTTP
> request and when you run the script the same request will be made as if
> someone clicked the button!
>
> You dont need to use the recorder either , you can modify the script
> yourself.
>
> If the javascript didnt actually make any server side call - then it doesnt
> matter because you dont want to load test this anyway.
>
> Have you actually tried this? It sounds as if you have a problem recording
> your script and you probably have concluded that JMeter doesnt do
> javascript (true) and hence cant test websites that do javascript/ajax
> (false)
>
> >Real browser is needed
> Not for a good deal of use cases - as many of the people on this mailing list
> can attest too.
>
>
>
>
>
> On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli
> <zi...@gmail.com>wrote:
>
> > Deepak,
> > Actually that does matter it cannot do JavaScript. If a request
> > requires you need to be able to click a JavaScript button then the
> > request will never happen. No request will ever be made.  Also testing
> > true web performance requires rendering the DOM, not just initiating
> > HTTP requests and recording the response time, rps, etc.
> >
> > Real browser is needed, with JavaScript, and Jmeter doesn't integrate
> > well with this, it isn't designed for this, which is understandable.
> > The problem is there is a gap between real browser testing (owned by
> > third party
> > companies) and open source tools (Jmeter). There's nothing in between
> > for real-browser based performance testing. I could go into why, but
> > its off topic of this list, and I'd rather spare everyone the gas.
> >
> > Point being, Jmeter cannot solve my problem, without some serious
> > customization.
> >
> >
> >
> > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <sh...@gmail.com>
> wrote:
> >
> > > Hi
> > > You are getting too caught up in the JMeter doesnt do javascript thing.
> > In
> > > most cases it doesnt matter.
> > > You have a webserver that is receiving HTTP requests - whether those
> > > requests are generated via the user clicking a link or via AJAX or
> > > via flash is hardly relevant to the webserver. It sees HTTP requests
> > > and
> > sends
> > > HTTP responses.
> > > JMeter deals with HTTP request and responses. As long as you can
> > > make the same request that your javascript is making (which you can
> > > see via the recording feature) , you can test it with Jmeter. The
> > > fact that the proxy cant record javascript is irrelevant - it only
> > > needs to record the requests. If your javascript is responsible for
> > > generating the requests
> > in
> > > some way , then you have to replicate that within JMeter.
> > >
> > > Some caveats here are
> > > a. Your toolkit should be good when you need to parameterise(JQuery
> > > is great , GWT sucks) b. If you need to perform some AJAX requests
> > > in parallel then JMeter isnt quite there yet.
> > >
> > > Its probably true that it is easier writing scripts for Selenium
> > > like
> > tools
> > > - but they also need more resources as well as given how often a UI
> > changes
> > > as opposed to the HTTP request/response pair , sometimes JMeter
> > > scripts
> > are
> > > more resilient to change.
> > >
> > > regards
> > > deepak
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Tue, Feb 5, 2013 at 5:29 PM, Zippy Zeppoli
> > > <zippyzeppoli@gmail.com
> > > >wrote:
> > >
> > > > Proxy won't work for clicking on JavaScript.
> > > > Selenium will, however, Selenium isn't designed for performance
> > testing,
> > > > with the exception of BrowserMob, who has perfected it.
> > > >
> > > > If JMeter had some kind of (good) Selenium integration then it
> > > > might be able to achieve it.
> > > >
> > > > I think JMeter is a good tool, but it's not built for this kind of
> > work.
> > > >
> > > > On Tue, Feb 5, 2013 at 5:20 PM, David Luu <ma...@gmail.com>
> wrote:
> > > >
> > > > > I'm not familiar with the full feature set of BrowserMob, but
> > > > > JMeter
> > > can
> > > > do
> > > > > what you want, easy or hard, depending on your needs.
> > > > >
> > > > > If all you need is simple record & playback, JMeter proxy is
> > > > > best
> > > option.
> > > > > Just record w/ proxy, it generates a basic test plan that you
> > > > > can
> > save
> > > to
> > > > > file and run w/ X threads to generate load, etc.
> > > > >
> > > > > But that approach will always use the same user, same data in
> > > > > the
> > AJAX
> > > > > calls during load generation.
> > > > >
> > > > > If you need them to be unique & parameterized, that's where it
> > > > > takes
> > > some
> > > > > work to go in and cleanup the proxy recording w/ paramaterized
> > > > > data, response checking (if more than just checking HTTP 200
> > > > > OKs). And
> > you'll
> > > > > find proxy recording generates a lot of unnecessary HTTP
> > > > > requests for
> > > > HTML,
> > > > > CSS, image files that aren't necessary of interest as you're
> > > > > testing
> > > the
> > > > > AJAX calls, which is where you filter out only the requests of
> > interest
> > > > and
> > > > > only use those in test plan, etc.
> > > > >
> > > > > I believe this kind of work is needed regardless of what tool
> > > > > you
> > use,
> > > > some
> > > > > tools just make it easier, but there's still work to do. Not
> > > > > just a
> > one
> > > > > touch button approach unless all you need is simple record &
> > playback.
> > > > >
> > > > > On Tue, Feb 5, 2013 at 5:08 PM, Zippy Zeppoli <
> > zippyzeppoli@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > Will probably just buy BrowserMob.
> > > > > > Too bad there isn't an open source framework to already do this.
> > > > > >
> > > > > > Building this is a yak shave, and I need to be testing, not
> > building
> > > a
> > > > > test
> > > > > > harness thats probably going to break on the next release.
> > > > > >
> > > > > > On Tue, Feb 5, 2013 at 3:40 PM, David Luu <ma...@gmail.com>
> > > wrote:
> > > > > >
> > > > > > > JMeter proxy is the most integrated approach, but I find it
> > > > > > > gives
> > > > "too
> > > > > > much
> > > > > > > information", so I tend to use external tools like browser
> > traffic
> > > > > > sniffers
> > > > > > > (HttpFox, livehttpheaders, ieHttpHeaders) to see what HTTP
> > requests
> > > > are
> > > > > > > made for AJAX calls for just the requests & responses I'm
> > > interested
> > > > > in,
> > > > > > > easier to manage. But that's just my opinion, others might
> > > > > > > find
> > the
> > > > > > JMeter
> > > > > > > proxy easier to use.
> > > > > > >
> > > > > > > Whatever approach you take, you just need to know what HTTP
> > > requests
> > > > > are
> > > > > > > made by the AJAX calls to replicate in JMeter, and
> > > > > > > parameterize
> > > those
> > > > > > > requests to take in dynamic/test data as needed, assert
> > appropriate
> > > > > > > response data, etc. In this case, WebDriver can be dropped
> > > > > > > from
> > the
> > > > > > > equation, just gives more overhead and lowers scalability in
> > > > > > > load generation.
> > > > > > >
> > > > > > > On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
> > > > > > > p.mouawad@ubik-ingenierie.com> wrote:
> > > > > > >
> > > > > > > > AjaxCall will emit a network call which JMeter will capture.
> > > > > > > >
> > > > > > > > Use JMeter Server Proxy and you should have the Ajax Calls
> > > > recorded.
> > > > > > > >
> > > > > > > > Regards
> > > > > > > > Philippe M.
> > > > > > > >
> > > > > > > > Follow me on twitter <https://twitter.com/philmdot>
> > > > > > > >
> > > > > > > > UBIK-INGENIERIE on TWITTER
> > > > > > > > <https://twitter.com/ubikingenierie
> > >
> > > > > > > >
> > > > > > > > UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/>
> > > > > > > >
> > > > > > > > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <
> > > > > zippyzeppoli@gmail.com
> > > > > > > > >wrote:
> > > > > > > >
> > > > > > > > > To clarify:
> > > > > > > > > An example would be:
> > > > > > > > > 1) log in via a form post
> > > > > > > > > 2) look at orders in an ecommerce interface (AJAX call)
> > > > > > > > > 3) click on result to view order detail (AJAX)
> > > > > > > > >
> > > > > > > > > Pretty much a standard ecommerce transaction, but the
> > interface
> > > > is
> > > > > > all
> > > > > > > > > javascript.
> > > > > > > > >
> > > > > > > > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <
> > > CStott@tnsi.com>
> > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > From: David Luu [mailto:mangaroo@gmail.com]
> > > > > > > > > > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > Subject: Re: complex javascript actions in jmeter
> > > > > > > > > > > load
> > test
> > > > > > > > > > >
> > > > > > > > > > >  >> You can use webdriver from jmeter.  Create a
> > webdriver
> > > > > class
> > > > > > > that
> > > > > > > > > > > performs the requests and runs the javascript via
> > > > > > > > > > > the
> > > > browser,
> > > > > > then
> > > > > > > > > > run/call
> > > > > > > > > > > it from a BSF or JSR sampler.
> > > > > > > > > > >
> > > > > > > > > > > Just to clarify, I take it that's only worthwhile to
> > > > > > > > > > > do
> > (in
> > > > > terms
> > > > > > > of
> > > > > > > > > > > scalability) when using PhantomJSDriver or
> > > > > > > > > > > HtmlUnitDriver
> > > or
> > > > > > > > > > FirefoxDriver
> > > > > > > > > > > (on Linux with xvfb) with JMeter this way?
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > "Worthwhile" depends on assumptions.
> > > > > > > > > >
> > > > > > > > > > > Because otherwise, the browser GUI is the
> > > > > > > > > > > scalability
> > > > limiting
> > > > > > > factor
> > > > > > > > > > even
> > > > > > > > > > > with JMeter and Grid deployment, and in that case,
> > > > > > > > > > > no
> > > > > difference
> > > > > > in
> > > > > > > > > using
> > > > > > > > > > > WebDriver outside JMeter to do performance tests
> > > > > > > > > > > except
> > if
> > > > one
> > > > > > > wants
> > > > > > > > > the
> > > > > > > > > > > JMeter logging/reporting facilities to help
> > > > > > > > > > > performance
> > > test,
> > > > > > > because
> > > > > > > > > > there's
> > > > > > > > > > > no or minimal scalabiity gain.
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Seems the poster is more at the capability/viability
> > > > > > > > > > stage
> > of
> > > > > > > > developing
> > > > > > > > > > tests?  We would need much more information to start
> > advising
> > > > on
> > > > > > the
> > > > > > > > > entire
> > > > > > > > > > load testing process, start to finish, and what
> > > > > > > > > > challenges
> > > may
> > > > > face
> > > > > > > the
> > > > > > > > > > poster along the way.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <
> > > > > CStott@tnsi.com>
> > > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > > You can use webdriver from jmeter.  Create a
> > > > > > > > > > > > webdriver
> > > > class
> > > > > > that
> > > > > > > > > > > > performs the requests and runs the javascript via
> > > > > > > > > > > > the
> > > > > browser,
> > > > > > > then
> > > > > > > > > > > > run/call it from a BSF or JSR sampler.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > > From: Zippy Zeppoli
> > > > > > > > > > > > > [mailto:zippyzeppoli@gmail.com]
> > > > > > > > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > > > Subject: Re: complex javascript actions in
> > > > > > > > > > > > > jmeter
> > load
> > > > test
> > > > > > > > > > > > >
> > > > > > > > > > > > > The problem is Selenium has no performance
> > > > > > > > > > > > > testing
> > > > harness.
> > > > > > > > > > > > > Sucks that it seems BrowserMob (paid solution)
> > > > > > > > > > > > > is the
> > > > only
> > > > > > > solid
> > > > > > > > > > option.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Until someone builds something with Phantom.js,
> > > > > > > > > > > > > but
> > it
> > > > > seems
> > > > > > > > JMeter
> > > > > > > > > > > > > isn't going to cut it here.
> > > > > > > > > > > > >
> > > > > > > > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <
> > > > > > mangaroo@gmail.com>
> > > > > > > > > > wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > > You'll need to figure out what the complex
> > javascript
> > > > > does.
> > > > > > > > Does
> > > > > > > > > > > > > > it make any AJAX requests, or is it all local
> > client
> > > > side
> > > > > > > > > > > > processing/rendering?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > If it's all local, then there's no point
> > > > > > > > > > > > > > testing it
> > > > with
> > > > > > > > JMeter,
> > > > > > > > > > > > > > that's client side browser testing better done
> > > > > > > > > > > > > > with
> > > > > > Selenium.
> > > > > > > > It
> > > > > > > > > > > > > > won't impact the server side load test (except
> > delay
> > > in
> > > > > > > server
> > > > > > > > > > > > > > response time for fetching files will impact
> > > > > > > > > > > > > > the
> > > > > javascript
> > > > > > > > > > > > > > execution on client side, but that can be
> > compensated
> > > > w/
> > > > > > > JMeter
> > > > > > > > > > > > > > load test against server with 1+ Selenium test
> > > running
> > > > at
> > > > > > > same
> > > > > > > > > > > > > > time to gauge client side performance of
> > > > > > > > > > > > > > site/app
> > in
> > > > > > > browser).
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > If the javascript does execute AJAX requests,
> > > > > > > > > > > > > > you
> > > need
> > > > to
> > > > > > > > figure
> > > > > > > > > > > > > > out the HTTP requests made and mimic that in
> > > > > > > > > > > > > > JMeter
> > > as
> > > > > part
> > > > > > > of
> > > > > > > > > your
> > > > > > > > > > > test.
> > > > > > > > > > > > > > You can get that reading dev/design docs, or
> > reverse
> > > > > > > > > > > > > > engineer/traffic sniffing the app while doing
> > manual
> > > > > > testing.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > > > > > > > > > > > <zippyzeppoli@gmail.com
> > > > > > > > > > > > > > >wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > > > If I have a website which requires logging
> > > > > > > > > > > > > > > in,
> > and
> > > > > > > executing
> > > > > > > > > > > > > > > complex javascript actions, how would I do
> > > > > > > > > > > > > > > this
> > (if
> > > > at
> > > > > > all)
> > > > > > > > in
> > > > > > > > > > jmeter?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > I've heard of writing groovy scripts to do
> > > > > > > > > > > > > > > this
> > but
> > > > > this
> > > > > > > > sounds
> > > > > > > > > > > > > > > like a
> > > > > > > > > > > > > > lot
> > > > > > > > > > > > > > > of work / maintenance.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Thank you.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > >
> > > > ------------------------------------------------------------------
> > > > ---
> > > > > > > > > > > > To unsubscribe, e-mail:
> > > user-unsubscribe@jmeter.apache.org
> > > > > > > > > > > > For additional commands, e-mail:
> > > > user-help@jmeter.apache.org
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > > user-unsubscribe@jmeter.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > user-help@jmeter.apache.org
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >

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


Re: complex javascript actions in jmeter load test

Posted by Zippy Zeppoli <zi...@gmail.com>.
Check out keynote or gomezs explanation on their load test tools. Perhaps
it will make sense then. Synthetic load tests have their purpose and jmeter
is a good tool for that.

Bringing this back to my original point of jmeter as a tool rather than a
philosophical discussion about load testing:

It won't perform complex interactions with a web application however or
perform complicated flows and aggregate metrics on the cumulative
transaction. It works at layer 7 HTTP layer only. you could probably cock
around with logic controllers and beanshells and other sorts of nightmarish
adapters, but in this case you should realize jmeter is mot the tool for
the job. Browser presents a more comprehensive tool of real performance
with such applications. Browsers also won't issue requests at the rate a
tool like jmeter will, skewing your viewpoint of how your web app truly
performs.

Not debating this any further, you may do what you wish but if you think
jmeter is a comprehensive tool for measuring web application performance I
feel sorry for your users.

Fin

On Wednesday, February 6, 2013, Deepak Shetty wrote:

> >I think you may be  missing the point.
> Heh - the feelings mutual
> >There is no DOM rendering happening...and it won't reflect the true
> response time
> If you need browser times , yes Jmeter cant help you directly.
>
> But browser render times are really irrelevant to a *load test*. Lets say
> using any tool you have loaded the server with some high load . Now Lets
> say you and I (assume the addition of two requests makes no difference to
> the server). access this via a browser with similar conditions(same
> browser, network, cpu, memory etc). Is there any difference that you and I
> will see? Do you really need two or many browsers to figure out how much
> time your DOM rendering is taking or will one browser suffice?(lets ignore
> that you still arent getting "true" times - because browser times are
> dependent on what else the user is doing, what sort of network bandwidth he
> has , what browser he is using, what are IE cache settings are and so on).
>
> Pre - cloud , it was prohibitive to drive browsers to do load tests - now
> it is possible , but the amount of additional value that you get over a
> http request/response load test and some browser analysis is minimal to
> none. (Some types of scripts are easier to write with a browser driven tool
> though).
>
>
>
>
>
>
>
>
>
> On Wed, Feb 6, 2013 at 4:30 PM, Zippy Zeppoli <zippyzeppoli@gmail.com<javascript:;>
> >wrote:
>
> > I think you may be  missing the point.
> > Real load cannot be tested via HTTP interactions.
> > There is no DOM rendering happening.
> > I can make HTTP requests all day and it won't reflect the true response
> > time unless it's done through a browser.
> >
> > Recording a script in Jmeter proxy is trivial. Simulating *real* user
> load
> > is not it requires a browser and interactions with a web application.
> >
> > On Tue, Feb 5, 2013 at 6:51 PM, Deepak Shetty <sh...@gmail.com> wrote:
> >
> > > >Actually that does matter it cannot do JavaScript. If a request
> requires
> > > >you need to be able to click a JavaScript button then the request will
> > > >never happen.
> > > The point is that what happens when the button is clicked? Assuming
> its a
> > > server - ajax call then A HTTP call is made and some parameters are
> > passed
> > > and some values are returned. Thats whats important for the load test ,
> > not
> > > the fact that javascript was executed.
> > > So when you record the script , you will be the person clicking the
> > > button(you are recording your actions) , JMeter will record every
> > > interaction that makes a call to the server and will record this as a
> > > separate HTTP request and when you run the script the same request will
> > be
> > > made as if someone clicked the button!
> > >
> > > You dont need to use the recorder either , you can modify the script
> > > yourself.
> > >
> > > If the javascript didnt actually make any server side call - then it
> > doesnt
> > > matter because you dont want to load test this anyway.
> > >
> > > Have you actually tried this? It sounds as if you have a problem
> > recording
> > > your script and you probably have concluded that JMeter doesnt do
> > > javascript (true) and hence cant test websites that do javascript/ajax
> > > (false)
> > >
> > > >Real browser is needed
> > > Not for a good deal of use cases - as many of the people on this
> mailing
> > > list can attest too.
> > >
> > >
> > >
> > >
> > >
> > > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > > >wrote:
> > >
> > > > Deepak,
> > > > Actually that does matter it cannot do JavaScript. If a request
> > requires
> > > > you need to be able to click a JavaScript button then the request
> will
> > > > never happen. No request will ever be made.  Also testing true web
> > > > performance requires rendering the DOM, not just initiating HTTP
> > requests
> > > > and recording the response time, rps, etc.
> > > >
> > > > Real browser is needed, with JavaScript, and Jmeter doesn't integrate
> > > well
> > > > with this, it isn't designed for this, which is understandable. The
> > > problem
> > > > is there is a gap between real browser testing (owned by third party
> > > > companies) and open source tools (Jmeter). There's nothing in between
> > for
> > > > real-browser based performance testing. I could go into why, but its
> > off
> > > > topic of this list, and I'd rather spare everyone the gas.
> > > >
> > > > Point being, Jmeter cannot solve my problem, without some serious
> > > > customization.
> > > >
> > > >
> > > >
> > > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <sh...@gmail.com>
> > wrote:
> > > >
> > > > > Hi
> > > > > You are getting too caught up in the JMeter doesnt do javascript
> > thing.
> > > > In
> > > > > most cases it doesnt matter.
> > > > > You have a webserver that is receiving HTTP requests - whether
> those
> > > > > requests are generated via the user clicking a link or via AJAX or
> > via
> > > > > flash is hardly relevant to the webserver. It sees HTTP requests
> and
> > > > sends
> > > > > HTTP responses.
> > > > > JMeter deals with HTTP request and responses. As long as you can
> make
> > > the
> > > > > same request that your javascript is making (which you can see via
> > the
> > > > > record

Re: complex javascript actions in jmeter load test

Posted by Deepak Shetty <sh...@gmail.com>.
ah ok - thanks



On Thu, Feb 7, 2013 at 3:04 PM, Shmuel Krakower <sh...@gmail.com> wrote:

> I am referring to the one Zippy copy and paste into here:
>
> www.stevesouders.com/blog/2012/11/14/comparing-rum-synthetic-page-load-times/
>
> And not sure what was the intention of the person who started this thread
> but he surely got our attention :)
>
> Shmuel Krakower.
> www.Beatsoo.org - re-use your jmeter scripts for application performance
> monitoring from worldwide locations for free.
>
>
> On Thu, Feb 7, 2013 at 9:11 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> >wrote:
>
> > If you haven't gotten it by now, I can't devote any more time to
> > explaining it.
> >
> > On Thu, Feb 7, 2013 at 8:53 AM, Deepak Shetty <sh...@gmail.com> wrote:
> > >>The other posts by Etsy and Steve Shouders are really misleading for
> > people
> > > which are not familiar with APM
> > > which posts are you referring to?
> > >
> > >
> > > On Thu, Feb 7, 2013 at 2:56 AM, Shmuel Krakower <sh...@gmail.com>
> > wrote:
> > >
> > >> Zippy,
> > >> What is the point you are trying to set?
> > >> I agree with some of the stuff you mention while some of it is
> > incorrect.
> > >>
> > >> The other posts by Etsy and Steve Shouders are really misleading for
> > people
> > >> which are not familiar with APM and I wanted to post some feedback on
> > that
> > >> blog post by Steve for long time now, but haven't done so yet.
> > >>
> > >> My bottom line here is that it make no sense to compare RUM and
> > Synthetic
> > >> and trying to come up with numbers or any kind of a rule about the
> > relation
> > >> between them. The only true thing to say about the relation of them is
> > that
> > >> if you have synthetic monitoring trend that shows you an increase in
> > >> response time, you will probably see the same trend in RUM and even
> this
> > >> has exceptions(I.e. synthetic run from specific problematic network or
> > >> monitoring specific problematic content).
> > >>
> > >> Do you have some new technology in mind to resolve the limits of load
> > >> testing tools and bring the benefits from real browser profiling?
> > Because
> > >> as we use jmeter we try to understand what builds up the application
> and
> > >> try to mimic that behavior as much as possible with our scripts..
> > nothing
> > >> fancy about it.
> > >> On Feb 7, 2013 6:17 AM, "David Luu" <ma...@gmail.com> wrote:
> > >>
> > >> > So based on the discussion, I take it the OP/Zippy has decided that
> > >> > integrating Selenium with JMeter (e.g. calling Selenium from JMeter)
> > or
> > >> > running a Selenium test separately but in parallel/simultaneously as
> > >> JMeter
> > >> > to assess browser DOM/AJAX rendering & response time is not
> > acceptable?
> > >> > Because those 2 approaches will tackle the problem just recently
> being
> > >> > discussed. You create the needed synthetic load while at same time
> be
> > >> able
> > >> > to more accurately gauge browser performance (w/o having to do it
> > >> manually
> > >> > by hand).
> > >> >
> > >> > Just curious to know why not? Too much work & lack of a team member
> > with
> > >> > proper expertise to devise the JMeter/Selenium solution? Granted it
> > does
> > >> > take some work to build, but there's never good/perfect free
> lunches,
> > >> > make/customize it yourself "to personal taste" or pay $$$ for it.
> > >> >
> > >> > On Wed, Feb 6, 2013 at 7:41 PM, Deepak Shetty <sh...@gmail.com>
> > wrote:
> > >> >
> > >> > > I notice you didnt actually say whats the difference between two
> > >> browsers
> > >> > > and one.
> > >> > >
> > >> > > In any case web test tools have always been in two categories
> > >> > > Those that drive the http request/response (JMeter, Grinder,older
> > >> > versions
> > >> > > of load runner) and those that drive the browser (selenium, watir,
> > qtp,
> > >> > > newer versions of load runner).
> > >> > > Do you seriously think that people who develop and/or use the
> first
> > >> > > category are measuring wind speed with
> > >> > > a wet finger or is it more likely you dont get what you need to do
> > if
> > >> you
> > >> > > want to use one of these tools to still get "true" response times?
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > > On Wed, Feb 6, 2013 at 7:13 PM, Zippy Zeppoli <
> > zippyzeppoli@gmail.com
> > >> > > >wrote:
> > >> > >
> > >> > > > It's the difference between measuring wind speed with an
> > anemometer
> > >> and
> > >> > > > your wet finger in the air.
> > >> > > >
> > >> > > > On Wednesday, February 6, 2013, Deepak Shetty wrote:
> > >> > > >
> > >> > > > > >I think you may be  missing the point.
> > >> > > > > Heh - the feelings mutual
> > >> > > > > >There is no DOM rendering happening...and it won't reflect
> the
> > >> true
> > >> > > > > response time
> > >> > > > > If you need browser times , yes Jmeter cant help you directly.
> > >> > > > >
> > >> > > > > But browser render times are really irrelevant to a *load
> test*.
> > >> Lets
> > >> > > say
> > >> > > > > using any tool you have loaded the server with some high load
> .
> > Now
> > >> > > Lets
> > >> > > > > say you and I (assume the addition of two requests makes no
> > >> > difference
> > >> > > to
> > >> > > > > the server). access this via a browser with similar
> > conditions(same
> > >> > > > > browser, network, cpu, memory etc). Is there any difference
> that
> > >> you
> > >> > > and
> > >> > > > I
> > >> > > > > will see? Do you really need two or many browsers to figure
> out
> > how
> > >> > > much
> > >> > > > > time your DOM rendering is taking or will one browser
> > suffice?(lets
> > >> > > > ignore
> > >> > > > > that you still arent getting "true" times - because browser
> > times
> > >> are
> > >> > > > > dependent on what else the user is doing, what sort of network
> > >> > > bandwidth
> > >> > > > he
> > >> > > > > has , what browser he is using, what are IE cache settings are
> > and
> > >> so
> > >> > > > on).
> > >> > > > >
> > >> > > > > Pre - cloud , it was prohibitive to drive browsers to do load
> > >> tests -
> > >> > > now
> > >> > > > > it is possible , but the amount of additional value that you
> get
> > >> > over a
> > >> > > > > http request/response load test and some browser analysis is
> > >> minimal
> > >> > to
> > >> > > > > none. (Some types of scripts are easier to write with a
> browser
> > >> > driven
> > >> > > > tool
> > >> > > > > though).
> > >> > > > >
> > >> > > > >
> > >> > > > >
> > >> > > > >
> > >> > > > >
> > >> > > > >
> > >> > > > >
> > >> > > > >
> > >> > > > >
> > >> > > > > On Wed, Feb 6, 2013 at 4:30 PM, Zippy Zeppoli <
> > >> > zippyzeppoli@gmail.com
> > >> > > > <javascript:;>
> > >> > > > > >wrote:
> > >> > > > >
> > >> > > > > > I think you may be  missing the point.
> > >> > > > > > Real load cannot be tested via HTTP interactions.
> > >> > > > > > There is no DOM rendering happening.
> > >> > > > > > I can make HTTP requests all day and it won't reflect the
> true
> > >> > > response
> > >> > > > > > time unless it's done through a browser.
> > >> > > > > >
> > >> > > > > > Recording a script in Jmeter proxy is trivial. Simulating
> > *real*
> > >> > user
> > >> > > > > load
> > >> > > > > > is not it requires a browser and interactions with a web
> > >> > application.
> > >> > > > > >
> > >> > > > > > On Tue, Feb 5, 2013 at 6:51 PM, Deepak Shetty <
> > shettyd@gmail.com
> > >> >
> > >> > > > wrote:
> > >> > > > > >
> > >> > > > > > > >Actually that does matter it cannot do JavaScript. If a
> > >> request
> > >> > > > > requires
> > >> > > > > > > >you need to be able to click a JavaScript button then the
> > >> > request
> > >> > > > will
> > >> > > > > > > >never happen.
> > >> > > > > > > The point is that what happens when the button is clicked?
> > >> > Assuming
> > >> > > > > its a
> > >> > > > > > > server - ajax call then A HTTP call is made and some
> > parameters
> > >> > are
> > >> > > > > > passed
> > >> > > > > > > and some values are returned. Thats whats important for
> the
> > >> load
> > >> > > > test ,
> > >> > > > > > not
> > >> > > > > > > the fact that javascript was executed.
> > >> > > > > > > So when you record the script , you will be the person
> > clicking
> > >> > the
> > >> > > > > > > button(you are recording your actions) , JMeter will
> record
> > >> every
> > >> > > > > > > interaction that makes a call to the server and will
> record
> > >> this
> > >> > > as a
> > >> > > > > > > separate HTTP request and when you run the script the same
> > >> > request
> > >> > > > will
> > >> > > > > > be
> > >> > > > > > > made as if someone clicked the button!
> > >> > > > > > >
> > >> > > > > > > You dont need to use the recorder either , you can modify
> > the
> > >> > > script
> > >> > > > > > > yourself.
> > >> > > > > > >
> > >> > > > > > > If the javascript didnt actually make any server side
> call -
> > >> then
> > >> > > it
> > >> > > > > > doesnt
> > >> > > > > > > matter because you dont want to load test this anyway.
> > >> > > > > > >
> > >> > > > > > > Have you actually tried this? It sounds as if you have a
> > >> problem
> > >> > > > > > recording
> > >> > > > > > > your script and you probably have concluded that JMeter
> > doesnt
> > >> do
> > >> > > > > > > javascript (true) and hence cant test websites that do
> > >> > > > javascript/ajax
> > >> > > > > > > (false)
> > >> > > > > > >
> > >> > > > > > > >Real browser is needed
> > >> > > > > > > Not for a good deal of use cases - as many of the people
> on
> > >> this
> > >> > > > > mailing
> > >> > > > > > > list can attest too.
> > >> > > > > > >
> > >> > > > > > >
> > >> > > > > > >
> > >> > > > > > >
> > >> > > > > > >
> > >> > > > > > > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli <
> > >> > > > zippyzeppoli@gmail.com
> > >> > > > > > > >wrote:
> > >> > > > > > >
> > >> > > > > > > > Deepak,
> > >> > > > > > > > Actually that does matter it cannot do JavaScript. If a
> > >> request
> > >> > > > > > requires
> > >> > > > > > > > you need to be able to click a JavaScript button then
> the
> > >> > request
> > >> > > > > will
> > >> > > > > > > > never happen. No request will ever be made.  Also
> testing
> > >> true
> > >> > > web
> > >> > > > > > > > performance requires rendering the DOM, not just
> > initiating
> > >> > HTTP
> > >> > > > > > requests
> > >> > > > > > > > and recording the response time, rps, etc.
> > >> > > > > > > >
> > >> > > > > > > > Real browser is needed, with JavaScript, and Jmeter
> > doesn't
> > >> > > > integrate
> > >> > > > > > > well
> > >> > > > > > > > with this, it isn't designed for this, which is
> > >> understandable.
> > >> > > The
> > >> > > > > > > problem
> > >> > > > > > > > is there is a gap between real browser testing (owned by
> > >> third
> > >> > > > party
> > >> > > > > > > > companies) and open source tools (Jmeter). There's
> > nothing in
> > >> > > > between
> > >> > > > > > for
> > >> > > > > > > > real-browser based performance testing. I could go into
> > why,
> > >> > but
> > >> > > > its
> > >> > > > > > off
> > >> > > > > > > > topic of this list, and I'd rather spare everyone the
> gas.
> > >> > > > > > > >
> > >> > > > > > > > Point being, Jmeter cannot solve my problem, without
> some
> > >> > serious
> > >> > > > > > > > customization.
> > >> > > > > > > >
> > >> > > > > > > >
> > >> > > > > > > >
> > >> > > > > > > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <
> > >> > shettyd@gmail.com
> > >> > > >
> > >> > > > > > wrote:
> > >> > > > > > > >
> > >> > > > > > > > > Hi
> > >> > > > > > > > > You are getting too caught up in the JMeter doesnt do
> > >> > > javascript
> > >> > > > > > thing.
> > >> > > > > > > > In
> > >> > > > > > > > > most cases it doesnt matter.
> > >> > > > > > > > > You have a webserver that is receiving HTTP requests -
> > >> > whether
> > >> > > > > those
> > >> > > > > > > > > requests are generated via the user clicking a link or
> > via
> > >> > AJAX
> > >> > > > or
> > >> > > > > > via
> > >> > > > > > > > > flash is hardly relevant to the webserver. It sees
> HTTP
> > >> > > requests
> > >> > > > > and
> > >> > > > > > > > sends
> > >> > > > > > > > > HTTP responses.
> > >> > > > > > > > > JMeter deals with HTTP request and responses. As long
> as
> > >> you
> > >> > > can
> > >> > > > > make
> > >> > > > > > > the
> > >> > > > > > > > > same request that your javascript is making (which you
> > can
> > >> > see
> > >> > > > via
> > >> > > > > > the
> > >> > > > > > > > > record
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
> >
>

Re: complex javascript actions in jmeter load test

Posted by Kiran <ki...@yahoo.com>.
There is no way selenium can measure the performance of DOM.

Selenium, works as functional testing tool and can measure html elements after DOM has been built up and rendered.So I dont think Selenium is right tool to measure JavaScript performance unless you are targeting just functionality. Again I am not expert Selenium but I do fair amount of coding in JavaScript.

I think browsers are the best tool to measure JavaScript/DOM performance.Press F12 on any latest browser.

What exactly do you want to measure in JavaScript action ? If you can elaborate that maybe I suggest u some way to do it.

Keep in mind with Java script its always 1 user.
 
As far as I know, steve's work is mainly regarding CSS/JS and the way we code it and for for some of the cases , he is correct like single point of failure,blocking JS etc.

Etsy blog(Coding as craft) is extremely misleading and totally incorrect or  probably its not explained correctly.

With Regards,
Kiran Badi
Email:kiranbadi@yahoo.com
Ph- US-(+01)6462013101


________________________________
 From: Shmuel Krakower <sh...@gmail.com>
To: JMeter Users List <us...@jmeter.apache.org> 
Sent: Thursday, February 7, 2013 6:04 PM
Subject: Re: complex javascript actions in jmeter load test
 
I am referring to the one Zippy copy and paste into here:
www.stevesouders.com/blog/2012/11/14/comparing-rum-synthetic-page-load-times/

And not sure what was the intention of the person who started this thread
but he surely got our attention :)

Shmuel Krakower.
www.Beatsoo.org - re-use your jmeter scripts for application performance
monitoring from worldwide locations for free.


On Thu, Feb 7, 2013 at 9:11 PM, Zippy Zeppoli <zi...@gmail.com>wrote:

> If you haven't gotten it by now, I can't devote any more time to
> explaining it.
>
> On Thu, Feb 7, 2013 at 8:53 AM, Deepak Shetty <sh...@gmail.com> wrote:
> >>The other posts by Etsy and Steve Shouders are really misleading for
> people
> > which are not familiar with APM
> > which posts are you referring to?
> >
> >
> > On Thu, Feb 7, 2013 at 2:56 AM, Shmuel Krakower <sh...@gmail.com>
> wrote:
> >
> >> Zippy,
> >> What is the point you are trying to set?
> >> I agree with some of the stuff you mention while some of it is
> incorrect.
> >>
> >> The other posts by Etsy and Steve Shouders are really misleading for
> people
> >> which are not familiar with APM and I wanted to post some feedback on
> that
> >> blog post by Steve for long time now, but haven't done so yet.
> >>
> >> My bottom line here is that it make no sense to compare RUM and
> Synthetic
> >> and trying to come up with numbers or any kind of a rule about the
> relation
> >> between them. The only true thing to say about the relation of them is
> that
> >> if you have synthetic monitoring trend that shows you an increase in
> >> response time, you will probably see the same trend in RUM and even this
> >> has exceptions(I.e. synthetic run from specific problematic network or
> >> monitoring specific problematic content).
> >>
> >> Do you have some new technology in mind to resolve the limits of load
> >> testing tools and bring the benefits from real browser profiling?
> Because
> >> as we use jmeter we try to understand what builds up the application and
> >> try to mimic that behavior as much as possible with our scripts..
> nothing
> >> fancy about it.
> >> On Feb 7, 2013 6:17 AM, "David Luu" <ma...@gmail.com> wrote:
> >>
> >> > So based on the discussion, I take it the OP/Zippy has decided that
> >> > integrating Selenium with JMeter (e.g. calling Selenium from JMeter)
> or
> >> > running a Selenium test separately but in parallel/simultaneously as
> >> JMeter
> >> > to assess browser DOM/AJAX rendering & response time is not
> acceptable?
> >> > Because those 2 approaches will tackle the problem just recently being
> >> > discussed. You create the needed synthetic load while at same time be
> >> able
> >> > to more accurately gauge browser performance (w/o having to do it
> >> manually
> >> > by hand).
> >> >
> >> > Just curious to know why not? Too much work & lack of a team member
> with
> >> > proper expertise to devise the JMeter/Selenium solution? Granted it
> does
> >> > take some work to build, but there's never good/perfect free lunches,
> >> > make/customize it yourself "to personal taste" or pay $$$ for it.
> >> >
> >> > On Wed, Feb 6, 2013 at 7:41 PM, Deepak Shetty <sh...@gmail.com>
> wrote:
> >> >
> >> > > I notice you didnt actually say whats the difference between two
> >> browsers
> >> > > and one.
> >> > >
> >> > > In any case web test tools have always been in two categories
> >> > > Those that drive the http request/response (JMeter, Grinder,older
> >> > versions
> >> > > of load runner) and those that drive the browser (selenium, watir,
> qtp,
> >> > > newer versions of load runner).
> >> > > Do you seriously think that people who develop and/or use the first
> >> > > category are measuring wind speed with
> >> > > a wet finger or is it more likely you dont get what you need to do
> if
> >> you
> >> > > want to use one of these tools to still get "true" response times?
> >> > >
> >> > >
> >> > >
> >> > >
> >> > > On Wed, Feb 6, 2013 at 7:13 PM, Zippy Zeppoli <
> zippyzeppoli@gmail.com
> >> > > >wrote:
> >> > >
> >> > > > It's the difference between measuring wind speed with an
> anemometer
> >> and
> >> > > > your wet finger in the air.
> >> > > >
> >> > > > On Wednesday, February 6, 2013, Deepak Shetty wrote:
> >> > > >
> >> > > > > >I think you may be  missing the point.
> >> > > > > Heh - the feelings mutual
> >> > > > > >There is no DOM rendering happening...and it won't reflect the
> >> true
> >> > > > > response time
> >> > > > > If you need browser times , yes Jmeter cant help you directly.
> >> > > > >
> >> > > > > But browser render times are really irrelevant to a *load test*.
> >> Lets
> >> > > say
> >> > > > > using any tool you have loaded the server with some high load .
> Now
> >> > > Lets
> >> > > > > say you and I (assume the addition of two requests makes no
> >> > difference
> >> > > to
> >> > > > > the server). access this via a browser with similar
> conditions(same
> >> > > > > browser, network, cpu, memory etc). Is there any difference that
> >> you
> >> > > and
> >> > > > I
> >> > > > > will see? Do you really need two or many browsers to figure out
> how
> >> > > much
> >> > > > > time your DOM rendering is taking or will one browser
> suffice?(lets
> >> > > > ignore
> >> > > > > that you still arent getting "true" times - because browser
> times
> >> are
> >> > > > > dependent on what else the user is doing, what sort of network
> >> > > bandwidth
> >> > > > he
> >> > > > > has , what browser he is using, what are IE cache settings are
> and
> >> so
> >> > > > on).
> >> > > > >
> >> > > > > Pre - cloud , it was prohibitive to drive browsers to do load
> >> tests -
> >> > > now
> >> > > > > it is possible , but the amount of additional value that you get
> >> > over a
> >> > > > > http request/response load test and some browser analysis is
> >> minimal
> >> > to
> >> > > > > none. (Some types of scripts are easier to write with a browser
> >> > driven
> >> > > > tool
> >> > > > > though).
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > > On Wed, Feb 6, 2013 at 4:30 PM, Zippy Zeppoli <
> >> > zippyzeppoli@gmail.com
> >> > > > <javascript:;>
> >> > > > > >wrote:
> >> > > > >
> >> > > > > > I think you may be  missing the point.
> >> > > > > > Real load cannot be tested via HTTP interactions.
> >> > > > > > There is no DOM rendering happening.
> >> > > > > > I can make HTTP requests all day and it won't reflect the true
> >> > > response
> >> > > > > > time unless it's done through a browser.
> >> > > > > >
> >> > > > > > Recording a script in Jmeter proxy is trivial. Simulating
> *real*
> >> > user
> >> > > > > load
> >> > > > > > is not it requires a browser and interactions with a web
> >> > application.
> >> > > > > >
> >> > > > > > On Tue, Feb 5, 2013 at 6:51 PM, Deepak Shetty <
> shettyd@gmail.com
> >> >
> >> > > > wrote:
> >> > > > > >
> >> > > > > > > >Actually that does matter it cannot do JavaScript. If a
> >> request
> >> > > > > requires
> >> > > > > > > >you need to be able to click a JavaScript button then the
> >> > request
> >> > > > will
> >> > > > > > > >never happen.
> >> > > > > > > The point is that what happens when the button is clicked?
> >> > Assuming
> >> > > > > its a
> >> > > > > > > server - ajax call then A HTTP call is made and some
> parameters
> >> > are
> >> > > > > > passed
> >> > > > > > > and some values are returned. Thats whats important for the
> >> load
> >> > > > test ,
> >> > > > > > not
> >> > > > > > > the fact that javascript was executed.
> >> > > > > > > So when you record the script , you will be the person
> clicking
> >> > the
> >> > > > > > > button(you are recording your actions) , JMeter will record
> >> every
> >> > > > > > > interaction that makes a call to the server and will record
> >> this
> >> > > as a
> >> > > > > > > separate HTTP request and when you run the script the same
> >> > request
> >> > > > will
> >> > > > > > be
> >> > > > > > > made as if someone clicked the button!
> >> > > > > > >
> >> > > > > > > You dont need to use the recorder either , you can modify
> the
> >> > > script
> >> > > > > > > yourself.
> >> > > > > > >
> >> > > > > > > If the javascript didnt actually make any server side call -
> >> then
> >> > > it
> >> > > > > > doesnt
> >> > > > > > > matter because you dont want to load test this anyway.
> >> > > > > > >
> >> > > > > > > Have you actually tried this? It sounds as if you have a
> >> problem
> >> > > > > > recording
> >> > > > > > > your script and you probably have concluded that JMeter
> doesnt
> >> do
> >> > > > > > > javascript (true) and hence cant test websites that do
> >> > > > javascript/ajax
> >> > > > > > > (false)
> >> > > > > > >
> >> > > > > > > >Real browser is needed
> >> > > > > > > Not for a good deal of use cases - as many of the people on
> >> this
> >> > > > > mailing
> >> > > > > > > list can attest too.
> >> > > > > > >
> >> > > > > > >
> >> > > > > > >
> >> > > > > > >
> >> > > > > > >
> >> > > > > > > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli <
> >> > > > zippyzeppoli@gmail.com
> >> > > > > > > >wrote:
> >> > > > > > >
> >> > > > > > > > Deepak,
> >> > > > > > > > Actually that does matter it cannot do JavaScript. If a
> >> request
> >> > > > > > requires
> >> > > > > > > > you need to be able to click a JavaScript button then the
> >> > request
> >> > > > > will
> >> > > > > > > > never happen. No request will ever be made.  Also testing
> >> true
> >> > > web
> >> > > > > > > > performance requires rendering the DOM, not just
> initiating
> >> > HTTP
> >> > > > > > requests
> >> > > > > > > > and recording the response time, rps, etc.
> >> > > > > > > >
> >> > > > > > > > Real browser is needed, with JavaScript, and Jmeter
> doesn't
> >> > > > integrate
> >> > > > > > > well
> >> > > > > > > > with this, it isn't designed for this, which is
> >> understandable.
> >> > > The
> >> > > > > > > problem
> >> > > > > > > > is there is a gap between real browser testing (owned by
> >> third
> >> > > > party
> >> > > > > > > > companies) and open source tools (Jmeter). There's
> nothing in
> >> > > > between
> >> > > > > > for
> >> > > > > > > > real-browser based performance testing. I could go into
> why,
> >> > but
> >> > > > its
> >> > > > > > off
> >> > > > > > > > topic of this list, and I'd rather spare everyone the gas.
> >> > > > > > > >
> >> > > > > > > > Point being, Jmeter cannot solve my problem, without some
> >> > serious
> >> > > > > > > > customization.
> >> > > > > > > >
> >> > > > > > > >
> >> > > > > > > >
> >> > > > > > > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <
> >> > shettyd@gmail.com
> >> > > >
> >> > > > > > wrote:
> >> > > > > > > >
> >> > > > > > > > > Hi
> >> > > > > > > > > You are getting too caught up in the JMeter doesnt do
> >> > > javascript
> >> > > > > > thing.
> >> > > > > > > > In
> >> > > > > > > > > most cases it doesnt matter.
> >> > > > > > > > > You have a webserver that is receiving HTTP requests -
> >> > whether
> >> > > > > those
> >> > > > > > > > > requests are generated via the user clicking a link or
> via
> >> > AJAX
> >> > > > or
> >> > > > > > via
> >> > > > > > > > > flash is hardly relevant to the webserver. It sees HTTP
> >> > > requests
> >> > > > > and
> >> > > > > > > > sends
> >> > > > > > > > > HTTP responses.
> >> > > > > > > > > JMeter deals with HTTP request and responses. As long as
> >> you
> >> > > can
> >> > > > > make
> >> > > > > > > the
> >> > > > > > > > > same request that your javascript is making (which you
> can
> >> > see
> >> > > > via
> >> > > > > > the
> >> > > > > > > > > record
> >> > > >
> >> > >
> >> >
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: complex javascript actions in jmeter load test

Posted by Shmuel Krakower <sh...@gmail.com>.
I am referring to the one Zippy copy and paste into here:
www.stevesouders.com/blog/2012/11/14/comparing-rum-synthetic-page-load-times/

And not sure what was the intention of the person who started this thread
but he surely got our attention :)

Shmuel Krakower.
www.Beatsoo.org - re-use your jmeter scripts for application performance
monitoring from worldwide locations for free.


On Thu, Feb 7, 2013 at 9:11 PM, Zippy Zeppoli <zi...@gmail.com>wrote:

> If you haven't gotten it by now, I can't devote any more time to
> explaining it.
>
> On Thu, Feb 7, 2013 at 8:53 AM, Deepak Shetty <sh...@gmail.com> wrote:
> >>The other posts by Etsy and Steve Shouders are really misleading for
> people
> > which are not familiar with APM
> > which posts are you referring to?
> >
> >
> > On Thu, Feb 7, 2013 at 2:56 AM, Shmuel Krakower <sh...@gmail.com>
> wrote:
> >
> >> Zippy,
> >> What is the point you are trying to set?
> >> I agree with some of the stuff you mention while some of it is
> incorrect.
> >>
> >> The other posts by Etsy and Steve Shouders are really misleading for
> people
> >> which are not familiar with APM and I wanted to post some feedback on
> that
> >> blog post by Steve for long time now, but haven't done so yet.
> >>
> >> My bottom line here is that it make no sense to compare RUM and
> Synthetic
> >> and trying to come up with numbers or any kind of a rule about the
> relation
> >> between them. The only true thing to say about the relation of them is
> that
> >> if you have synthetic monitoring trend that shows you an increase in
> >> response time, you will probably see the same trend in RUM and even this
> >> has exceptions(I.e. synthetic run from specific problematic network or
> >> monitoring specific problematic content).
> >>
> >> Do you have some new technology in mind to resolve the limits of load
> >> testing tools and bring the benefits from real browser profiling?
> Because
> >> as we use jmeter we try to understand what builds up the application and
> >> try to mimic that behavior as much as possible with our scripts..
> nothing
> >> fancy about it.
> >> On Feb 7, 2013 6:17 AM, "David Luu" <ma...@gmail.com> wrote:
> >>
> >> > So based on the discussion, I take it the OP/Zippy has decided that
> >> > integrating Selenium with JMeter (e.g. calling Selenium from JMeter)
> or
> >> > running a Selenium test separately but in parallel/simultaneously as
> >> JMeter
> >> > to assess browser DOM/AJAX rendering & response time is not
> acceptable?
> >> > Because those 2 approaches will tackle the problem just recently being
> >> > discussed. You create the needed synthetic load while at same time be
> >> able
> >> > to more accurately gauge browser performance (w/o having to do it
> >> manually
> >> > by hand).
> >> >
> >> > Just curious to know why not? Too much work & lack of a team member
> with
> >> > proper expertise to devise the JMeter/Selenium solution? Granted it
> does
> >> > take some work to build, but there's never good/perfect free lunches,
> >> > make/customize it yourself "to personal taste" or pay $$$ for it.
> >> >
> >> > On Wed, Feb 6, 2013 at 7:41 PM, Deepak Shetty <sh...@gmail.com>
> wrote:
> >> >
> >> > > I notice you didnt actually say whats the difference between two
> >> browsers
> >> > > and one.
> >> > >
> >> > > In any case web test tools have always been in two categories
> >> > > Those that drive the http request/response (JMeter, Grinder,older
> >> > versions
> >> > > of load runner) and those that drive the browser (selenium, watir,
> qtp,
> >> > > newer versions of load runner).
> >> > > Do you seriously think that people who develop and/or use the first
> >> > > category are measuring wind speed with
> >> > > a wet finger or is it more likely you dont get what you need to do
> if
> >> you
> >> > > want to use one of these tools to still get "true" response times?
> >> > >
> >> > >
> >> > >
> >> > >
> >> > > On Wed, Feb 6, 2013 at 7:13 PM, Zippy Zeppoli <
> zippyzeppoli@gmail.com
> >> > > >wrote:
> >> > >
> >> > > > It's the difference between measuring wind speed with an
> anemometer
> >> and
> >> > > > your wet finger in the air.
> >> > > >
> >> > > > On Wednesday, February 6, 2013, Deepak Shetty wrote:
> >> > > >
> >> > > > > >I think you may be  missing the point.
> >> > > > > Heh - the feelings mutual
> >> > > > > >There is no DOM rendering happening...and it won't reflect the
> >> true
> >> > > > > response time
> >> > > > > If you need browser times , yes Jmeter cant help you directly.
> >> > > > >
> >> > > > > But browser render times are really irrelevant to a *load test*.
> >> Lets
> >> > > say
> >> > > > > using any tool you have loaded the server with some high load .
> Now
> >> > > Lets
> >> > > > > say you and I (assume the addition of two requests makes no
> >> > difference
> >> > > to
> >> > > > > the server). access this via a browser with similar
> conditions(same
> >> > > > > browser, network, cpu, memory etc). Is there any difference that
> >> you
> >> > > and
> >> > > > I
> >> > > > > will see? Do you really need two or many browsers to figure out
> how
> >> > > much
> >> > > > > time your DOM rendering is taking or will one browser
> suffice?(lets
> >> > > > ignore
> >> > > > > that you still arent getting "true" times - because browser
> times
> >> are
> >> > > > > dependent on what else the user is doing, what sort of network
> >> > > bandwidth
> >> > > > he
> >> > > > > has , what browser he is using, what are IE cache settings are
> and
> >> so
> >> > > > on).
> >> > > > >
> >> > > > > Pre - cloud , it was prohibitive to drive browsers to do load
> >> tests -
> >> > > now
> >> > > > > it is possible , but the amount of additional value that you get
> >> > over a
> >> > > > > http request/response load test and some browser analysis is
> >> minimal
> >> > to
> >> > > > > none. (Some types of scripts are easier to write with a browser
> >> > driven
> >> > > > tool
> >> > > > > though).
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > > On Wed, Feb 6, 2013 at 4:30 PM, Zippy Zeppoli <
> >> > zippyzeppoli@gmail.com
> >> > > > <javascript:;>
> >> > > > > >wrote:
> >> > > > >
> >> > > > > > I think you may be  missing the point.
> >> > > > > > Real load cannot be tested via HTTP interactions.
> >> > > > > > There is no DOM rendering happening.
> >> > > > > > I can make HTTP requests all day and it won't reflect the true
> >> > > response
> >> > > > > > time unless it's done through a browser.
> >> > > > > >
> >> > > > > > Recording a script in Jmeter proxy is trivial. Simulating
> *real*
> >> > user
> >> > > > > load
> >> > > > > > is not it requires a browser and interactions with a web
> >> > application.
> >> > > > > >
> >> > > > > > On Tue, Feb 5, 2013 at 6:51 PM, Deepak Shetty <
> shettyd@gmail.com
> >> >
> >> > > > wrote:
> >> > > > > >
> >> > > > > > > >Actually that does matter it cannot do JavaScript. If a
> >> request
> >> > > > > requires
> >> > > > > > > >you need to be able to click a JavaScript button then the
> >> > request
> >> > > > will
> >> > > > > > > >never happen.
> >> > > > > > > The point is that what happens when the button is clicked?
> >> > Assuming
> >> > > > > its a
> >> > > > > > > server - ajax call then A HTTP call is made and some
> parameters
> >> > are
> >> > > > > > passed
> >> > > > > > > and some values are returned. Thats whats important for the
> >> load
> >> > > > test ,
> >> > > > > > not
> >> > > > > > > the fact that javascript was executed.
> >> > > > > > > So when you record the script , you will be the person
> clicking
> >> > the
> >> > > > > > > button(you are recording your actions) , JMeter will record
> >> every
> >> > > > > > > interaction that makes a call to the server and will record
> >> this
> >> > > as a
> >> > > > > > > separate HTTP request and when you run the script the same
> >> > request
> >> > > > will
> >> > > > > > be
> >> > > > > > > made as if someone clicked the button!
> >> > > > > > >
> >> > > > > > > You dont need to use the recorder either , you can modify
> the
> >> > > script
> >> > > > > > > yourself.
> >> > > > > > >
> >> > > > > > > If the javascript didnt actually make any server side call -
> >> then
> >> > > it
> >> > > > > > doesnt
> >> > > > > > > matter because you dont want to load test this anyway.
> >> > > > > > >
> >> > > > > > > Have you actually tried this? It sounds as if you have a
> >> problem
> >> > > > > > recording
> >> > > > > > > your script and you probably have concluded that JMeter
> doesnt
> >> do
> >> > > > > > > javascript (true) and hence cant test websites that do
> >> > > > javascript/ajax
> >> > > > > > > (false)
> >> > > > > > >
> >> > > > > > > >Real browser is needed
> >> > > > > > > Not for a good deal of use cases - as many of the people on
> >> this
> >> > > > > mailing
> >> > > > > > > list can attest too.
> >> > > > > > >
> >> > > > > > >
> >> > > > > > >
> >> > > > > > >
> >> > > > > > >
> >> > > > > > > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli <
> >> > > > zippyzeppoli@gmail.com
> >> > > > > > > >wrote:
> >> > > > > > >
> >> > > > > > > > Deepak,
> >> > > > > > > > Actually that does matter it cannot do JavaScript. If a
> >> request
> >> > > > > > requires
> >> > > > > > > > you need to be able to click a JavaScript button then the
> >> > request
> >> > > > > will
> >> > > > > > > > never happen. No request will ever be made.  Also testing
> >> true
> >> > > web
> >> > > > > > > > performance requires rendering the DOM, not just
> initiating
> >> > HTTP
> >> > > > > > requests
> >> > > > > > > > and recording the response time, rps, etc.
> >> > > > > > > >
> >> > > > > > > > Real browser is needed, with JavaScript, and Jmeter
> doesn't
> >> > > > integrate
> >> > > > > > > well
> >> > > > > > > > with this, it isn't designed for this, which is
> >> understandable.
> >> > > The
> >> > > > > > > problem
> >> > > > > > > > is there is a gap between real browser testing (owned by
> >> third
> >> > > > party
> >> > > > > > > > companies) and open source tools (Jmeter). There's
> nothing in
> >> > > > between
> >> > > > > > for
> >> > > > > > > > real-browser based performance testing. I could go into
> why,
> >> > but
> >> > > > its
> >> > > > > > off
> >> > > > > > > > topic of this list, and I'd rather spare everyone the gas.
> >> > > > > > > >
> >> > > > > > > > Point being, Jmeter cannot solve my problem, without some
> >> > serious
> >> > > > > > > > customization.
> >> > > > > > > >
> >> > > > > > > >
> >> > > > > > > >
> >> > > > > > > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <
> >> > shettyd@gmail.com
> >> > > >
> >> > > > > > wrote:
> >> > > > > > > >
> >> > > > > > > > > Hi
> >> > > > > > > > > You are getting too caught up in the JMeter doesnt do
> >> > > javascript
> >> > > > > > thing.
> >> > > > > > > > In
> >> > > > > > > > > most cases it doesnt matter.
> >> > > > > > > > > You have a webserver that is receiving HTTP requests -
> >> > whether
> >> > > > > those
> >> > > > > > > > > requests are generated via the user clicking a link or
> via
> >> > AJAX
> >> > > > or
> >> > > > > > via
> >> > > > > > > > > flash is hardly relevant to the webserver. It sees HTTP
> >> > > requests
> >> > > > > and
> >> > > > > > > > sends
> >> > > > > > > > > HTTP responses.
> >> > > > > > > > > JMeter deals with HTTP request and responses. As long as
> >> you
> >> > > can
> >> > > > > make
> >> > > > > > > the
> >> > > > > > > > > same request that your javascript is making (which you
> can
> >> > see
> >> > > > via
> >> > > > > > the
> >> > > > > > > > > record
> >> > > >
> >> > >
> >> >
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: complex javascript actions in jmeter load test

Posted by Zippy Zeppoli <zi...@gmail.com>.
If you haven't gotten it by now, I can't devote any more time to explaining it.

On Thu, Feb 7, 2013 at 8:53 AM, Deepak Shetty <sh...@gmail.com> wrote:
>>The other posts by Etsy and Steve Shouders are really misleading for people
> which are not familiar with APM
> which posts are you referring to?
>
>
> On Thu, Feb 7, 2013 at 2:56 AM, Shmuel Krakower <sh...@gmail.com> wrote:
>
>> Zippy,
>> What is the point you are trying to set?
>> I agree with some of the stuff you mention while some of it is incorrect.
>>
>> The other posts by Etsy and Steve Shouders are really misleading for people
>> which are not familiar with APM and I wanted to post some feedback on that
>> blog post by Steve for long time now, but haven't done so yet.
>>
>> My bottom line here is that it make no sense to compare RUM and Synthetic
>> and trying to come up with numbers or any kind of a rule about the relation
>> between them. The only true thing to say about the relation of them is that
>> if you have synthetic monitoring trend that shows you an increase in
>> response time, you will probably see the same trend in RUM and even this
>> has exceptions(I.e. synthetic run from specific problematic network or
>> monitoring specific problematic content).
>>
>> Do you have some new technology in mind to resolve the limits of load
>> testing tools and bring the benefits from real browser profiling? Because
>> as we use jmeter we try to understand what builds up the application and
>> try to mimic that behavior as much as possible with our scripts.. nothing
>> fancy about it.
>> On Feb 7, 2013 6:17 AM, "David Luu" <ma...@gmail.com> wrote:
>>
>> > So based on the discussion, I take it the OP/Zippy has decided that
>> > integrating Selenium with JMeter (e.g. calling Selenium from JMeter) or
>> > running a Selenium test separately but in parallel/simultaneously as
>> JMeter
>> > to assess browser DOM/AJAX rendering & response time is not acceptable?
>> > Because those 2 approaches will tackle the problem just recently being
>> > discussed. You create the needed synthetic load while at same time be
>> able
>> > to more accurately gauge browser performance (w/o having to do it
>> manually
>> > by hand).
>> >
>> > Just curious to know why not? Too much work & lack of a team member with
>> > proper expertise to devise the JMeter/Selenium solution? Granted it does
>> > take some work to build, but there's never good/perfect free lunches,
>> > make/customize it yourself "to personal taste" or pay $$$ for it.
>> >
>> > On Wed, Feb 6, 2013 at 7:41 PM, Deepak Shetty <sh...@gmail.com> wrote:
>> >
>> > > I notice you didnt actually say whats the difference between two
>> browsers
>> > > and one.
>> > >
>> > > In any case web test tools have always been in two categories
>> > > Those that drive the http request/response (JMeter, Grinder,older
>> > versions
>> > > of load runner) and those that drive the browser (selenium, watir, qtp,
>> > > newer versions of load runner).
>> > > Do you seriously think that people who develop and/or use the first
>> > > category are measuring wind speed with
>> > > a wet finger or is it more likely you dont get what you need to do if
>> you
>> > > want to use one of these tools to still get "true" response times?
>> > >
>> > >
>> > >
>> > >
>> > > On Wed, Feb 6, 2013 at 7:13 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
>> > > >wrote:
>> > >
>> > > > It's the difference between measuring wind speed with an anemometer
>> and
>> > > > your wet finger in the air.
>> > > >
>> > > > On Wednesday, February 6, 2013, Deepak Shetty wrote:
>> > > >
>> > > > > >I think you may be  missing the point.
>> > > > > Heh - the feelings mutual
>> > > > > >There is no DOM rendering happening...and it won't reflect the
>> true
>> > > > > response time
>> > > > > If you need browser times , yes Jmeter cant help you directly.
>> > > > >
>> > > > > But browser render times are really irrelevant to a *load test*.
>> Lets
>> > > say
>> > > > > using any tool you have loaded the server with some high load . Now
>> > > Lets
>> > > > > say you and I (assume the addition of two requests makes no
>> > difference
>> > > to
>> > > > > the server). access this via a browser with similar conditions(same
>> > > > > browser, network, cpu, memory etc). Is there any difference that
>> you
>> > > and
>> > > > I
>> > > > > will see? Do you really need two or many browsers to figure out how
>> > > much
>> > > > > time your DOM rendering is taking or will one browser suffice?(lets
>> > > > ignore
>> > > > > that you still arent getting "true" times - because browser times
>> are
>> > > > > dependent on what else the user is doing, what sort of network
>> > > bandwidth
>> > > > he
>> > > > > has , what browser he is using, what are IE cache settings are and
>> so
>> > > > on).
>> > > > >
>> > > > > Pre - cloud , it was prohibitive to drive browsers to do load
>> tests -
>> > > now
>> > > > > it is possible , but the amount of additional value that you get
>> > over a
>> > > > > http request/response load test and some browser analysis is
>> minimal
>> > to
>> > > > > none. (Some types of scripts are easier to write with a browser
>> > driven
>> > > > tool
>> > > > > though).
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > On Wed, Feb 6, 2013 at 4:30 PM, Zippy Zeppoli <
>> > zippyzeppoli@gmail.com
>> > > > <javascript:;>
>> > > > > >wrote:
>> > > > >
>> > > > > > I think you may be  missing the point.
>> > > > > > Real load cannot be tested via HTTP interactions.
>> > > > > > There is no DOM rendering happening.
>> > > > > > I can make HTTP requests all day and it won't reflect the true
>> > > response
>> > > > > > time unless it's done through a browser.
>> > > > > >
>> > > > > > Recording a script in Jmeter proxy is trivial. Simulating *real*
>> > user
>> > > > > load
>> > > > > > is not it requires a browser and interactions with a web
>> > application.
>> > > > > >
>> > > > > > On Tue, Feb 5, 2013 at 6:51 PM, Deepak Shetty <shettyd@gmail.com
>> >
>> > > > wrote:
>> > > > > >
>> > > > > > > >Actually that does matter it cannot do JavaScript. If a
>> request
>> > > > > requires
>> > > > > > > >you need to be able to click a JavaScript button then the
>> > request
>> > > > will
>> > > > > > > >never happen.
>> > > > > > > The point is that what happens when the button is clicked?
>> > Assuming
>> > > > > its a
>> > > > > > > server - ajax call then A HTTP call is made and some parameters
>> > are
>> > > > > > passed
>> > > > > > > and some values are returned. Thats whats important for the
>> load
>> > > > test ,
>> > > > > > not
>> > > > > > > the fact that javascript was executed.
>> > > > > > > So when you record the script , you will be the person clicking
>> > the
>> > > > > > > button(you are recording your actions) , JMeter will record
>> every
>> > > > > > > interaction that makes a call to the server and will record
>> this
>> > > as a
>> > > > > > > separate HTTP request and when you run the script the same
>> > request
>> > > > will
>> > > > > > be
>> > > > > > > made as if someone clicked the button!
>> > > > > > >
>> > > > > > > You dont need to use the recorder either , you can modify the
>> > > script
>> > > > > > > yourself.
>> > > > > > >
>> > > > > > > If the javascript didnt actually make any server side call -
>> then
>> > > it
>> > > > > > doesnt
>> > > > > > > matter because you dont want to load test this anyway.
>> > > > > > >
>> > > > > > > Have you actually tried this? It sounds as if you have a
>> problem
>> > > > > > recording
>> > > > > > > your script and you probably have concluded that JMeter doesnt
>> do
>> > > > > > > javascript (true) and hence cant test websites that do
>> > > > javascript/ajax
>> > > > > > > (false)
>> > > > > > >
>> > > > > > > >Real browser is needed
>> > > > > > > Not for a good deal of use cases - as many of the people on
>> this
>> > > > > mailing
>> > > > > > > list can attest too.
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli <
>> > > > zippyzeppoli@gmail.com
>> > > > > > > >wrote:
>> > > > > > >
>> > > > > > > > Deepak,
>> > > > > > > > Actually that does matter it cannot do JavaScript. If a
>> request
>> > > > > > requires
>> > > > > > > > you need to be able to click a JavaScript button then the
>> > request
>> > > > > will
>> > > > > > > > never happen. No request will ever be made.  Also testing
>> true
>> > > web
>> > > > > > > > performance requires rendering the DOM, not just initiating
>> > HTTP
>> > > > > > requests
>> > > > > > > > and recording the response time, rps, etc.
>> > > > > > > >
>> > > > > > > > Real browser is needed, with JavaScript, and Jmeter doesn't
>> > > > integrate
>> > > > > > > well
>> > > > > > > > with this, it isn't designed for this, which is
>> understandable.
>> > > The
>> > > > > > > problem
>> > > > > > > > is there is a gap between real browser testing (owned by
>> third
>> > > > party
>> > > > > > > > companies) and open source tools (Jmeter). There's nothing in
>> > > > between
>> > > > > > for
>> > > > > > > > real-browser based performance testing. I could go into why,
>> > but
>> > > > its
>> > > > > > off
>> > > > > > > > topic of this list, and I'd rather spare everyone the gas.
>> > > > > > > >
>> > > > > > > > Point being, Jmeter cannot solve my problem, without some
>> > serious
>> > > > > > > > customization.
>> > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <
>> > shettyd@gmail.com
>> > > >
>> > > > > > wrote:
>> > > > > > > >
>> > > > > > > > > Hi
>> > > > > > > > > You are getting too caught up in the JMeter doesnt do
>> > > javascript
>> > > > > > thing.
>> > > > > > > > In
>> > > > > > > > > most cases it doesnt matter.
>> > > > > > > > > You have a webserver that is receiving HTTP requests -
>> > whether
>> > > > > those
>> > > > > > > > > requests are generated via the user clicking a link or via
>> > AJAX
>> > > > or
>> > > > > > via
>> > > > > > > > > flash is hardly relevant to the webserver. It sees HTTP
>> > > requests
>> > > > > and
>> > > > > > > > sends
>> > > > > > > > > HTTP responses.
>> > > > > > > > > JMeter deals with HTTP request and responses. As long as
>> you
>> > > can
>> > > > > make
>> > > > > > > the
>> > > > > > > > > same request that your javascript is making (which you can
>> > see
>> > > > via
>> > > > > > the
>> > > > > > > > > record
>> > > >
>> > >
>> >
>>

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


Re: complex javascript actions in jmeter load test

Posted by Deepak Shetty <sh...@gmail.com>.
>The other posts by Etsy and Steve Shouders are really misleading for people
which are not familiar with APM
which posts are you referring to?


On Thu, Feb 7, 2013 at 2:56 AM, Shmuel Krakower <sh...@gmail.com> wrote:

> Zippy,
> What is the point you are trying to set?
> I agree with some of the stuff you mention while some of it is incorrect.
>
> The other posts by Etsy and Steve Shouders are really misleading for people
> which are not familiar with APM and I wanted to post some feedback on that
> blog post by Steve for long time now, but haven't done so yet.
>
> My bottom line here is that it make no sense to compare RUM and Synthetic
> and trying to come up with numbers or any kind of a rule about the relation
> between them. The only true thing to say about the relation of them is that
> if you have synthetic monitoring trend that shows you an increase in
> response time, you will probably see the same trend in RUM and even this
> has exceptions(I.e. synthetic run from specific problematic network or
> monitoring specific problematic content).
>
> Do you have some new technology in mind to resolve the limits of load
> testing tools and bring the benefits from real browser profiling? Because
> as we use jmeter we try to understand what builds up the application and
> try to mimic that behavior as much as possible with our scripts.. nothing
> fancy about it.
> On Feb 7, 2013 6:17 AM, "David Luu" <ma...@gmail.com> wrote:
>
> > So based on the discussion, I take it the OP/Zippy has decided that
> > integrating Selenium with JMeter (e.g. calling Selenium from JMeter) or
> > running a Selenium test separately but in parallel/simultaneously as
> JMeter
> > to assess browser DOM/AJAX rendering & response time is not acceptable?
> > Because those 2 approaches will tackle the problem just recently being
> > discussed. You create the needed synthetic load while at same time be
> able
> > to more accurately gauge browser performance (w/o having to do it
> manually
> > by hand).
> >
> > Just curious to know why not? Too much work & lack of a team member with
> > proper expertise to devise the JMeter/Selenium solution? Granted it does
> > take some work to build, but there's never good/perfect free lunches,
> > make/customize it yourself "to personal taste" or pay $$$ for it.
> >
> > On Wed, Feb 6, 2013 at 7:41 PM, Deepak Shetty <sh...@gmail.com> wrote:
> >
> > > I notice you didnt actually say whats the difference between two
> browsers
> > > and one.
> > >
> > > In any case web test tools have always been in two categories
> > > Those that drive the http request/response (JMeter, Grinder,older
> > versions
> > > of load runner) and those that drive the browser (selenium, watir, qtp,
> > > newer versions of load runner).
> > > Do you seriously think that people who develop and/or use the first
> > > category are measuring wind speed with
> > > a wet finger or is it more likely you dont get what you need to do if
> you
> > > want to use one of these tools to still get "true" response times?
> > >
> > >
> > >
> > >
> > > On Wed, Feb 6, 2013 at 7:13 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > > >wrote:
> > >
> > > > It's the difference between measuring wind speed with an anemometer
> and
> > > > your wet finger in the air.
> > > >
> > > > On Wednesday, February 6, 2013, Deepak Shetty wrote:
> > > >
> > > > > >I think you may be  missing the point.
> > > > > Heh - the feelings mutual
> > > > > >There is no DOM rendering happening...and it won't reflect the
> true
> > > > > response time
> > > > > If you need browser times , yes Jmeter cant help you directly.
> > > > >
> > > > > But browser render times are really irrelevant to a *load test*.
> Lets
> > > say
> > > > > using any tool you have loaded the server with some high load . Now
> > > Lets
> > > > > say you and I (assume the addition of two requests makes no
> > difference
> > > to
> > > > > the server). access this via a browser with similar conditions(same
> > > > > browser, network, cpu, memory etc). Is there any difference that
> you
> > > and
> > > > I
> > > > > will see? Do you really need two or many browsers to figure out how
> > > much
> > > > > time your DOM rendering is taking or will one browser suffice?(lets
> > > > ignore
> > > > > that you still arent getting "true" times - because browser times
> are
> > > > > dependent on what else the user is doing, what sort of network
> > > bandwidth
> > > > he
> > > > > has , what browser he is using, what are IE cache settings are and
> so
> > > > on).
> > > > >
> > > > > Pre - cloud , it was prohibitive to drive browsers to do load
> tests -
> > > now
> > > > > it is possible , but the amount of additional value that you get
> > over a
> > > > > http request/response load test and some browser analysis is
> minimal
> > to
> > > > > none. (Some types of scripts are easier to write with a browser
> > driven
> > > > tool
> > > > > though).
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Wed, Feb 6, 2013 at 4:30 PM, Zippy Zeppoli <
> > zippyzeppoli@gmail.com
> > > > <javascript:;>
> > > > > >wrote:
> > > > >
> > > > > > I think you may be  missing the point.
> > > > > > Real load cannot be tested via HTTP interactions.
> > > > > > There is no DOM rendering happening.
> > > > > > I can make HTTP requests all day and it won't reflect the true
> > > response
> > > > > > time unless it's done through a browser.
> > > > > >
> > > > > > Recording a script in Jmeter proxy is trivial. Simulating *real*
> > user
> > > > > load
> > > > > > is not it requires a browser and interactions with a web
> > application.
> > > > > >
> > > > > > On Tue, Feb 5, 2013 at 6:51 PM, Deepak Shetty <shettyd@gmail.com
> >
> > > > wrote:
> > > > > >
> > > > > > > >Actually that does matter it cannot do JavaScript. If a
> request
> > > > > requires
> > > > > > > >you need to be able to click a JavaScript button then the
> > request
> > > > will
> > > > > > > >never happen.
> > > > > > > The point is that what happens when the button is clicked?
> > Assuming
> > > > > its a
> > > > > > > server - ajax call then A HTTP call is made and some parameters
> > are
> > > > > > passed
> > > > > > > and some values are returned. Thats whats important for the
> load
> > > > test ,
> > > > > > not
> > > > > > > the fact that javascript was executed.
> > > > > > > So when you record the script , you will be the person clicking
> > the
> > > > > > > button(you are recording your actions) , JMeter will record
> every
> > > > > > > interaction that makes a call to the server and will record
> this
> > > as a
> > > > > > > separate HTTP request and when you run the script the same
> > request
> > > > will
> > > > > > be
> > > > > > > made as if someone clicked the button!
> > > > > > >
> > > > > > > You dont need to use the recorder either , you can modify the
> > > script
> > > > > > > yourself.
> > > > > > >
> > > > > > > If the javascript didnt actually make any server side call -
> then
> > > it
> > > > > > doesnt
> > > > > > > matter because you dont want to load test this anyway.
> > > > > > >
> > > > > > > Have you actually tried this? It sounds as if you have a
> problem
> > > > > > recording
> > > > > > > your script and you probably have concluded that JMeter doesnt
> do
> > > > > > > javascript (true) and hence cant test websites that do
> > > > javascript/ajax
> > > > > > > (false)
> > > > > > >
> > > > > > > >Real browser is needed
> > > > > > > Not for a good deal of use cases - as many of the people on
> this
> > > > > mailing
> > > > > > > list can attest too.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli <
> > > > zippyzeppoli@gmail.com
> > > > > > > >wrote:
> > > > > > >
> > > > > > > > Deepak,
> > > > > > > > Actually that does matter it cannot do JavaScript. If a
> request
> > > > > > requires
> > > > > > > > you need to be able to click a JavaScript button then the
> > request
> > > > > will
> > > > > > > > never happen. No request will ever be made.  Also testing
> true
> > > web
> > > > > > > > performance requires rendering the DOM, not just initiating
> > HTTP
> > > > > > requests
> > > > > > > > and recording the response time, rps, etc.
> > > > > > > >
> > > > > > > > Real browser is needed, with JavaScript, and Jmeter doesn't
> > > > integrate
> > > > > > > well
> > > > > > > > with this, it isn't designed for this, which is
> understandable.
> > > The
> > > > > > > problem
> > > > > > > > is there is a gap between real browser testing (owned by
> third
> > > > party
> > > > > > > > companies) and open source tools (Jmeter). There's nothing in
> > > > between
> > > > > > for
> > > > > > > > real-browser based performance testing. I could go into why,
> > but
> > > > its
> > > > > > off
> > > > > > > > topic of this list, and I'd rather spare everyone the gas.
> > > > > > > >
> > > > > > > > Point being, Jmeter cannot solve my problem, without some
> > serious
> > > > > > > > customization.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <
> > shettyd@gmail.com
> > > >
> > > > > > wrote:
> > > > > > > >
> > > > > > > > > Hi
> > > > > > > > > You are getting too caught up in the JMeter doesnt do
> > > javascript
> > > > > > thing.
> > > > > > > > In
> > > > > > > > > most cases it doesnt matter.
> > > > > > > > > You have a webserver that is receiving HTTP requests -
> > whether
> > > > > those
> > > > > > > > > requests are generated via the user clicking a link or via
> > AJAX
> > > > or
> > > > > > via
> > > > > > > > > flash is hardly relevant to the webserver. It sees HTTP
> > > requests
> > > > > and
> > > > > > > > sends
> > > > > > > > > HTTP responses.
> > > > > > > > > JMeter deals with HTTP request and responses. As long as
> you
> > > can
> > > > > make
> > > > > > > the
> > > > > > > > > same request that your javascript is making (which you can
> > see
> > > > via
> > > > > > the
> > > > > > > > > record
> > > >
> > >
> >
>

Re: complex javascript actions in jmeter load test

Posted by Shmuel Krakower <sh...@gmail.com>.
Zippy,
What is the point you are trying to set?
I agree with some of the stuff you mention while some of it is incorrect.

The other posts by Etsy and Steve Shouders are really misleading for people
which are not familiar with APM and I wanted to post some feedback on that
blog post by Steve for long time now, but haven't done so yet.

My bottom line here is that it make no sense to compare RUM and Synthetic
and trying to come up with numbers or any kind of a rule about the relation
between them. The only true thing to say about the relation of them is that
if you have synthetic monitoring trend that shows you an increase in
response time, you will probably see the same trend in RUM and even this
has exceptions(I.e. synthetic run from specific problematic network or
monitoring specific problematic content).

Do you have some new technology in mind to resolve the limits of load
testing tools and bring the benefits from real browser profiling? Because
as we use jmeter we try to understand what builds up the application and
try to mimic that behavior as much as possible with our scripts.. nothing
fancy about it.
On Feb 7, 2013 6:17 AM, "David Luu" <ma...@gmail.com> wrote:

> So based on the discussion, I take it the OP/Zippy has decided that
> integrating Selenium with JMeter (e.g. calling Selenium from JMeter) or
> running a Selenium test separately but in parallel/simultaneously as JMeter
> to assess browser DOM/AJAX rendering & response time is not acceptable?
> Because those 2 approaches will tackle the problem just recently being
> discussed. You create the needed synthetic load while at same time be able
> to more accurately gauge browser performance (w/o having to do it manually
> by hand).
>
> Just curious to know why not? Too much work & lack of a team member with
> proper expertise to devise the JMeter/Selenium solution? Granted it does
> take some work to build, but there's never good/perfect free lunches,
> make/customize it yourself "to personal taste" or pay $$$ for it.
>
> On Wed, Feb 6, 2013 at 7:41 PM, Deepak Shetty <sh...@gmail.com> wrote:
>
> > I notice you didnt actually say whats the difference between two browsers
> > and one.
> >
> > In any case web test tools have always been in two categories
> > Those that drive the http request/response (JMeter, Grinder,older
> versions
> > of load runner) and those that drive the browser (selenium, watir, qtp,
> > newer versions of load runner).
> > Do you seriously think that people who develop and/or use the first
> > category are measuring wind speed with
> > a wet finger or is it more likely you dont get what you need to do if you
> > want to use one of these tools to still get "true" response times?
> >
> >
> >
> >
> > On Wed, Feb 6, 2013 at 7:13 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > >wrote:
> >
> > > It's the difference between measuring wind speed with an anemometer and
> > > your wet finger in the air.
> > >
> > > On Wednesday, February 6, 2013, Deepak Shetty wrote:
> > >
> > > > >I think you may be  missing the point.
> > > > Heh - the feelings mutual
> > > > >There is no DOM rendering happening...and it won't reflect the true
> > > > response time
> > > > If you need browser times , yes Jmeter cant help you directly.
> > > >
> > > > But browser render times are really irrelevant to a *load test*. Lets
> > say
> > > > using any tool you have loaded the server with some high load . Now
> > Lets
> > > > say you and I (assume the addition of two requests makes no
> difference
> > to
> > > > the server). access this via a browser with similar conditions(same
> > > > browser, network, cpu, memory etc). Is there any difference that you
> > and
> > > I
> > > > will see? Do you really need two or many browsers to figure out how
> > much
> > > > time your DOM rendering is taking or will one browser suffice?(lets
> > > ignore
> > > > that you still arent getting "true" times - because browser times are
> > > > dependent on what else the user is doing, what sort of network
> > bandwidth
> > > he
> > > > has , what browser he is using, what are IE cache settings are and so
> > > on).
> > > >
> > > > Pre - cloud , it was prohibitive to drive browsers to do load tests -
> > now
> > > > it is possible , but the amount of additional value that you get
> over a
> > > > http request/response load test and some browser analysis is minimal
> to
> > > > none. (Some types of scripts are easier to write with a browser
> driven
> > > tool
> > > > though).
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Wed, Feb 6, 2013 at 4:30 PM, Zippy Zeppoli <
> zippyzeppoli@gmail.com
> > > <javascript:;>
> > > > >wrote:
> > > >
> > > > > I think you may be  missing the point.
> > > > > Real load cannot be tested via HTTP interactions.
> > > > > There is no DOM rendering happening.
> > > > > I can make HTTP requests all day and it won't reflect the true
> > response
> > > > > time unless it's done through a browser.
> > > > >
> > > > > Recording a script in Jmeter proxy is trivial. Simulating *real*
> user
> > > > load
> > > > > is not it requires a browser and interactions with a web
> application.
> > > > >
> > > > > On Tue, Feb 5, 2013 at 6:51 PM, Deepak Shetty <sh...@gmail.com>
> > > wrote:
> > > > >
> > > > > > >Actually that does matter it cannot do JavaScript. If a request
> > > > requires
> > > > > > >you need to be able to click a JavaScript button then the
> request
> > > will
> > > > > > >never happen.
> > > > > > The point is that what happens when the button is clicked?
> Assuming
> > > > its a
> > > > > > server - ajax call then A HTTP call is made and some parameters
> are
> > > > > passed
> > > > > > and some values are returned. Thats whats important for the load
> > > test ,
> > > > > not
> > > > > > the fact that javascript was executed.
> > > > > > So when you record the script , you will be the person clicking
> the
> > > > > > button(you are recording your actions) , JMeter will record every
> > > > > > interaction that makes a call to the server and will record this
> > as a
> > > > > > separate HTTP request and when you run the script the same
> request
> > > will
> > > > > be
> > > > > > made as if someone clicked the button!
> > > > > >
> > > > > > You dont need to use the recorder either , you can modify the
> > script
> > > > > > yourself.
> > > > > >
> > > > > > If the javascript didnt actually make any server side call - then
> > it
> > > > > doesnt
> > > > > > matter because you dont want to load test this anyway.
> > > > > >
> > > > > > Have you actually tried this? It sounds as if you have a problem
> > > > > recording
> > > > > > your script and you probably have concluded that JMeter doesnt do
> > > > > > javascript (true) and hence cant test websites that do
> > > javascript/ajax
> > > > > > (false)
> > > > > >
> > > > > > >Real browser is needed
> > > > > > Not for a good deal of use cases - as many of the people on this
> > > > mailing
> > > > > > list can attest too.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli <
> > > zippyzeppoli@gmail.com
> > > > > > >wrote:
> > > > > >
> > > > > > > Deepak,
> > > > > > > Actually that does matter it cannot do JavaScript. If a request
> > > > > requires
> > > > > > > you need to be able to click a JavaScript button then the
> request
> > > > will
> > > > > > > never happen. No request will ever be made.  Also testing true
> > web
> > > > > > > performance requires rendering the DOM, not just initiating
> HTTP
> > > > > requests
> > > > > > > and recording the response time, rps, etc.
> > > > > > >
> > > > > > > Real browser is needed, with JavaScript, and Jmeter doesn't
> > > integrate
> > > > > > well
> > > > > > > with this, it isn't designed for this, which is understandable.
> > The
> > > > > > problem
> > > > > > > is there is a gap between real browser testing (owned by third
> > > party
> > > > > > > companies) and open source tools (Jmeter). There's nothing in
> > > between
> > > > > for
> > > > > > > real-browser based performance testing. I could go into why,
> but
> > > its
> > > > > off
> > > > > > > topic of this list, and I'd rather spare everyone the gas.
> > > > > > >
> > > > > > > Point being, Jmeter cannot solve my problem, without some
> serious
> > > > > > > customization.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <
> shettyd@gmail.com
> > >
> > > > > wrote:
> > > > > > >
> > > > > > > > Hi
> > > > > > > > You are getting too caught up in the JMeter doesnt do
> > javascript
> > > > > thing.
> > > > > > > In
> > > > > > > > most cases it doesnt matter.
> > > > > > > > You have a webserver that is receiving HTTP requests -
> whether
> > > > those
> > > > > > > > requests are generated via the user clicking a link or via
> AJAX
> > > or
> > > > > via
> > > > > > > > flash is hardly relevant to the webserver. It sees HTTP
> > requests
> > > > and
> > > > > > > sends
> > > > > > > > HTTP responses.
> > > > > > > > JMeter deals with HTTP request and responses. As long as you
> > can
> > > > make
> > > > > > the
> > > > > > > > same request that your javascript is making (which you can
> see
> > > via
> > > > > the
> > > > > > > > record
> > >
> >
>

Re: complex javascript actions in jmeter load test

Posted by David Luu <ma...@gmail.com>.
So based on the discussion, I take it the OP/Zippy has decided that
integrating Selenium with JMeter (e.g. calling Selenium from JMeter) or
running a Selenium test separately but in parallel/simultaneously as JMeter
to assess browser DOM/AJAX rendering & response time is not acceptable?
Because those 2 approaches will tackle the problem just recently being
discussed. You create the needed synthetic load while at same time be able
to more accurately gauge browser performance (w/o having to do it manually
by hand).

Just curious to know why not? Too much work & lack of a team member with
proper expertise to devise the JMeter/Selenium solution? Granted it does
take some work to build, but there's never good/perfect free lunches,
make/customize it yourself "to personal taste" or pay $$$ for it.

On Wed, Feb 6, 2013 at 7:41 PM, Deepak Shetty <sh...@gmail.com> wrote:

> I notice you didnt actually say whats the difference between two browsers
> and one.
>
> In any case web test tools have always been in two categories
> Those that drive the http request/response (JMeter, Grinder,older versions
> of load runner) and those that drive the browser (selenium, watir, qtp,
> newer versions of load runner).
> Do you seriously think that people who develop and/or use the first
> category are measuring wind speed with
> a wet finger or is it more likely you dont get what you need to do if you
> want to use one of these tools to still get "true" response times?
>
>
>
>
> On Wed, Feb 6, 2013 at 7:13 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> >wrote:
>
> > It's the difference between measuring wind speed with an anemometer and
> > your wet finger in the air.
> >
> > On Wednesday, February 6, 2013, Deepak Shetty wrote:
> >
> > > >I think you may be  missing the point.
> > > Heh - the feelings mutual
> > > >There is no DOM rendering happening...and it won't reflect the true
> > > response time
> > > If you need browser times , yes Jmeter cant help you directly.
> > >
> > > But browser render times are really irrelevant to a *load test*. Lets
> say
> > > using any tool you have loaded the server with some high load . Now
> Lets
> > > say you and I (assume the addition of two requests makes no difference
> to
> > > the server). access this via a browser with similar conditions(same
> > > browser, network, cpu, memory etc). Is there any difference that you
> and
> > I
> > > will see? Do you really need two or many browsers to figure out how
> much
> > > time your DOM rendering is taking or will one browser suffice?(lets
> > ignore
> > > that you still arent getting "true" times - because browser times are
> > > dependent on what else the user is doing, what sort of network
> bandwidth
> > he
> > > has , what browser he is using, what are IE cache settings are and so
> > on).
> > >
> > > Pre - cloud , it was prohibitive to drive browsers to do load tests -
> now
> > > it is possible , but the amount of additional value that you get over a
> > > http request/response load test and some browser analysis is minimal to
> > > none. (Some types of scripts are easier to write with a browser driven
> > tool
> > > though).
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Wed, Feb 6, 2013 at 4:30 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > <javascript:;>
> > > >wrote:
> > >
> > > > I think you may be  missing the point.
> > > > Real load cannot be tested via HTTP interactions.
> > > > There is no DOM rendering happening.
> > > > I can make HTTP requests all day and it won't reflect the true
> response
> > > > time unless it's done through a browser.
> > > >
> > > > Recording a script in Jmeter proxy is trivial. Simulating *real* user
> > > load
> > > > is not it requires a browser and interactions with a web application.
> > > >
> > > > On Tue, Feb 5, 2013 at 6:51 PM, Deepak Shetty <sh...@gmail.com>
> > wrote:
> > > >
> > > > > >Actually that does matter it cannot do JavaScript. If a request
> > > requires
> > > > > >you need to be able to click a JavaScript button then the request
> > will
> > > > > >never happen.
> > > > > The point is that what happens when the button is clicked? Assuming
> > > its a
> > > > > server - ajax call then A HTTP call is made and some parameters are
> > > > passed
> > > > > and some values are returned. Thats whats important for the load
> > test ,
> > > > not
> > > > > the fact that javascript was executed.
> > > > > So when you record the script , you will be the person clicking the
> > > > > button(you are recording your actions) , JMeter will record every
> > > > > interaction that makes a call to the server and will record this
> as a
> > > > > separate HTTP request and when you run the script the same request
> > will
> > > > be
> > > > > made as if someone clicked the button!
> > > > >
> > > > > You dont need to use the recorder either , you can modify the
> script
> > > > > yourself.
> > > > >
> > > > > If the javascript didnt actually make any server side call - then
> it
> > > > doesnt
> > > > > matter because you dont want to load test this anyway.
> > > > >
> > > > > Have you actually tried this? It sounds as if you have a problem
> > > > recording
> > > > > your script and you probably have concluded that JMeter doesnt do
> > > > > javascript (true) and hence cant test websites that do
> > javascript/ajax
> > > > > (false)
> > > > >
> > > > > >Real browser is needed
> > > > > Not for a good deal of use cases - as many of the people on this
> > > mailing
> > > > > list can attest too.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli <
> > zippyzeppoli@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > Deepak,
> > > > > > Actually that does matter it cannot do JavaScript. If a request
> > > > requires
> > > > > > you need to be able to click a JavaScript button then the request
> > > will
> > > > > > never happen. No request will ever be made.  Also testing true
> web
> > > > > > performance requires rendering the DOM, not just initiating HTTP
> > > > requests
> > > > > > and recording the response time, rps, etc.
> > > > > >
> > > > > > Real browser is needed, with JavaScript, and Jmeter doesn't
> > integrate
> > > > > well
> > > > > > with this, it isn't designed for this, which is understandable.
> The
> > > > > problem
> > > > > > is there is a gap between real browser testing (owned by third
> > party
> > > > > > companies) and open source tools (Jmeter). There's nothing in
> > between
> > > > for
> > > > > > real-browser based performance testing. I could go into why, but
> > its
> > > > off
> > > > > > topic of this list, and I'd rather spare everyone the gas.
> > > > > >
> > > > > > Point being, Jmeter cannot solve my problem, without some serious
> > > > > > customization.
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <shettyd@gmail.com
> >
> > > > wrote:
> > > > > >
> > > > > > > Hi
> > > > > > > You are getting too caught up in the JMeter doesnt do
> javascript
> > > > thing.
> > > > > > In
> > > > > > > most cases it doesnt matter.
> > > > > > > You have a webserver that is receiving HTTP requests - whether
> > > those
> > > > > > > requests are generated via the user clicking a link or via AJAX
> > or
> > > > via
> > > > > > > flash is hardly relevant to the webserver. It sees HTTP
> requests
> > > and
> > > > > > sends
> > > > > > > HTTP responses.
> > > > > > > JMeter deals with HTTP request and responses. As long as you
> can
> > > make
> > > > > the
> > > > > > > same request that your javascript is making (which you can see
> > via
> > > > the
> > > > > > > record
> >
>

Re: complex javascript actions in jmeter load test

Posted by Deepak Shetty <sh...@gmail.com>.
I notice you didnt actually say whats the difference between two browsers
and one.

In any case web test tools have always been in two categories
Those that drive the http request/response (JMeter, Grinder,older versions
of load runner) and those that drive the browser (selenium, watir, qtp,
newer versions of load runner).
Do you seriously think that people who develop and/or use the first
category are measuring wind speed with
a wet finger or is it more likely you dont get what you need to do if you
want to use one of these tools to still get "true" response times?




On Wed, Feb 6, 2013 at 7:13 PM, Zippy Zeppoli <zi...@gmail.com>wrote:

> It's the difference between measuring wind speed with an anemometer and
> your wet finger in the air.
>
> On Wednesday, February 6, 2013, Deepak Shetty wrote:
>
> > >I think you may be  missing the point.
> > Heh - the feelings mutual
> > >There is no DOM rendering happening...and it won't reflect the true
> > response time
> > If you need browser times , yes Jmeter cant help you directly.
> >
> > But browser render times are really irrelevant to a *load test*. Lets say
> > using any tool you have loaded the server with some high load . Now Lets
> > say you and I (assume the addition of two requests makes no difference to
> > the server). access this via a browser with similar conditions(same
> > browser, network, cpu, memory etc). Is there any difference that you and
> I
> > will see? Do you really need two or many browsers to figure out how much
> > time your DOM rendering is taking or will one browser suffice?(lets
> ignore
> > that you still arent getting "true" times - because browser times are
> > dependent on what else the user is doing, what sort of network bandwidth
> he
> > has , what browser he is using, what are IE cache settings are and so
> on).
> >
> > Pre - cloud , it was prohibitive to drive browsers to do load tests - now
> > it is possible , but the amount of additional value that you get over a
> > http request/response load test and some browser analysis is minimal to
> > none. (Some types of scripts are easier to write with a browser driven
> tool
> > though).
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Wed, Feb 6, 2013 at 4:30 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> <javascript:;>
> > >wrote:
> >
> > > I think you may be  missing the point.
> > > Real load cannot be tested via HTTP interactions.
> > > There is no DOM rendering happening.
> > > I can make HTTP requests all day and it won't reflect the true response
> > > time unless it's done through a browser.
> > >
> > > Recording a script in Jmeter proxy is trivial. Simulating *real* user
> > load
> > > is not it requires a browser and interactions with a web application.
> > >
> > > On Tue, Feb 5, 2013 at 6:51 PM, Deepak Shetty <sh...@gmail.com>
> wrote:
> > >
> > > > >Actually that does matter it cannot do JavaScript. If a request
> > requires
> > > > >you need to be able to click a JavaScript button then the request
> will
> > > > >never happen.
> > > > The point is that what happens when the button is clicked? Assuming
> > its a
> > > > server - ajax call then A HTTP call is made and some parameters are
> > > passed
> > > > and some values are returned. Thats whats important for the load
> test ,
> > > not
> > > > the fact that javascript was executed.
> > > > So when you record the script , you will be the person clicking the
> > > > button(you are recording your actions) , JMeter will record every
> > > > interaction that makes a call to the server and will record this as a
> > > > separate HTTP request and when you run the script the same request
> will
> > > be
> > > > made as if someone clicked the button!
> > > >
> > > > You dont need to use the recorder either , you can modify the script
> > > > yourself.
> > > >
> > > > If the javascript didnt actually make any server side call - then it
> > > doesnt
> > > > matter because you dont want to load test this anyway.
> > > >
> > > > Have you actually tried this? It sounds as if you have a problem
> > > recording
> > > > your script and you probably have concluded that JMeter doesnt do
> > > > javascript (true) and hence cant test websites that do
> javascript/ajax
> > > > (false)
> > > >
> > > > >Real browser is needed
> > > > Not for a good deal of use cases - as many of the people on this
> > mailing
> > > > list can attest too.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli <
> zippyzeppoli@gmail.com
> > > > >wrote:
> > > >
> > > > > Deepak,
> > > > > Actually that does matter it cannot do JavaScript. If a request
> > > requires
> > > > > you need to be able to click a JavaScript button then the request
> > will
> > > > > never happen. No request will ever be made.  Also testing true web
> > > > > performance requires rendering the DOM, not just initiating HTTP
> > > requests
> > > > > and recording the response time, rps, etc.
> > > > >
> > > > > Real browser is needed, with JavaScript, and Jmeter doesn't
> integrate
> > > > well
> > > > > with this, it isn't designed for this, which is understandable. The
> > > > problem
> > > > > is there is a gap between real browser testing (owned by third
> party
> > > > > companies) and open source tools (Jmeter). There's nothing in
> between
> > > for
> > > > > real-browser based performance testing. I could go into why, but
> its
> > > off
> > > > > topic of this list, and I'd rather spare everyone the gas.
> > > > >
> > > > > Point being, Jmeter cannot solve my problem, without some serious
> > > > > customization.
> > > > >
> > > > >
> > > > >
> > > > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <sh...@gmail.com>
> > > wrote:
> > > > >
> > > > > > Hi
> > > > > > You are getting too caught up in the JMeter doesnt do javascript
> > > thing.
> > > > > In
> > > > > > most cases it doesnt matter.
> > > > > > You have a webserver that is receiving HTTP requests - whether
> > those
> > > > > > requests are generated via the user clicking a link or via AJAX
> or
> > > via
> > > > > > flash is hardly relevant to the webserver. It sees HTTP requests
> > and
> > > > > sends
> > > > > > HTTP responses.
> > > > > > JMeter deals with HTTP request and responses. As long as you can
> > make
> > > > the
> > > > > > same request that your javascript is making (which you can see
> via
> > > the
> > > > > > record
>

Re: complex javascript actions in jmeter load test

Posted by Zippy Zeppoli <zi...@gmail.com>.
It's the difference between measuring wind speed with an anemometer and
your wet finger in the air.

On Wednesday, February 6, 2013, Deepak Shetty wrote:

> >I think you may be  missing the point.
> Heh - the feelings mutual
> >There is no DOM rendering happening...and it won't reflect the true
> response time
> If you need browser times , yes Jmeter cant help you directly.
>
> But browser render times are really irrelevant to a *load test*. Lets say
> using any tool you have loaded the server with some high load . Now Lets
> say you and I (assume the addition of two requests makes no difference to
> the server). access this via a browser with similar conditions(same
> browser, network, cpu, memory etc). Is there any difference that you and I
> will see? Do you really need two or many browsers to figure out how much
> time your DOM rendering is taking or will one browser suffice?(lets ignore
> that you still arent getting "true" times - because browser times are
> dependent on what else the user is doing, what sort of network bandwidth he
> has , what browser he is using, what are IE cache settings are and so on).
>
> Pre - cloud , it was prohibitive to drive browsers to do load tests - now
> it is possible , but the amount of additional value that you get over a
> http request/response load test and some browser analysis is minimal to
> none. (Some types of scripts are easier to write with a browser driven tool
> though).
>
>
>
>
>
>
>
>
>
> On Wed, Feb 6, 2013 at 4:30 PM, Zippy Zeppoli <zippyzeppoli@gmail.com<javascript:;>
> >wrote:
>
> > I think you may be  missing the point.
> > Real load cannot be tested via HTTP interactions.
> > There is no DOM rendering happening.
> > I can make HTTP requests all day and it won't reflect the true response
> > time unless it's done through a browser.
> >
> > Recording a script in Jmeter proxy is trivial. Simulating *real* user
> load
> > is not it requires a browser and interactions with a web application.
> >
> > On Tue, Feb 5, 2013 at 6:51 PM, Deepak Shetty <sh...@gmail.com> wrote:
> >
> > > >Actually that does matter it cannot do JavaScript. If a request
> requires
> > > >you need to be able to click a JavaScript button then the request will
> > > >never happen.
> > > The point is that what happens when the button is clicked? Assuming
> its a
> > > server - ajax call then A HTTP call is made and some parameters are
> > passed
> > > and some values are returned. Thats whats important for the load test ,
> > not
> > > the fact that javascript was executed.
> > > So when you record the script , you will be the person clicking the
> > > button(you are recording your actions) , JMeter will record every
> > > interaction that makes a call to the server and will record this as a
> > > separate HTTP request and when you run the script the same request will
> > be
> > > made as if someone clicked the button!
> > >
> > > You dont need to use the recorder either , you can modify the script
> > > yourself.
> > >
> > > If the javascript didnt actually make any server side call - then it
> > doesnt
> > > matter because you dont want to load test this anyway.
> > >
> > > Have you actually tried this? It sounds as if you have a problem
> > recording
> > > your script and you probably have concluded that JMeter doesnt do
> > > javascript (true) and hence cant test websites that do javascript/ajax
> > > (false)
> > >
> > > >Real browser is needed
> > > Not for a good deal of use cases - as many of the people on this
> mailing
> > > list can attest too.
> > >
> > >
> > >
> > >
> > >
> > > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > > >wrote:
> > >
> > > > Deepak,
> > > > Actually that does matter it cannot do JavaScript. If a request
> > requires
> > > > you need to be able to click a JavaScript button then the request
> will
> > > > never happen. No request will ever be made.  Also testing true web
> > > > performance requires rendering the DOM, not just initiating HTTP
> > requests
> > > > and recording the response time, rps, etc.
> > > >
> > > > Real browser is needed, with JavaScript, and Jmeter doesn't integrate
> > > well
> > > > with this, it isn't designed for this, which is understandable. The
> > > problem
> > > > is there is a gap between real browser testing (owned by third party
> > > > companies) and open source tools (Jmeter). There's nothing in between
> > for
> > > > real-browser based performance testing. I could go into why, but its
> > off
> > > > topic of this list, and I'd rather spare everyone the gas.
> > > >
> > > > Point being, Jmeter cannot solve my problem, without some serious
> > > > customization.
> > > >
> > > >
> > > >
> > > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <sh...@gmail.com>
> > wrote:
> > > >
> > > > > Hi
> > > > > You are getting too caught up in the JMeter doesnt do javascript
> > thing.
> > > > In
> > > > > most cases it doesnt matter.
> > > > > You have a webserver that is receiving HTTP requests - whether
> those
> > > > > requests are generated via the user clicking a link or via AJAX or
> > via
> > > > > flash is hardly relevant to the webserver. It sees HTTP requests
> and
> > > > sends
> > > > > HTTP responses.
> > > > > JMeter deals with HTTP request and responses. As long as you can
> make
> > > the
> > > > > same request that your javascript is making (which you can see via
> > the
> > > > > record

Re: complex javascript actions in jmeter load test

Posted by Deepak Shetty <sh...@gmail.com>.
>I think you may be  missing the point.
Heh - the feelings mutual
>There is no DOM rendering happening...and it won't reflect the true
response time
If you need browser times , yes Jmeter cant help you directly.

But browser render times are really irrelevant to a *load test*. Lets say
using any tool you have loaded the server with some high load . Now Lets
say you and I (assume the addition of two requests makes no difference to
the server). access this via a browser with similar conditions(same
browser, network, cpu, memory etc). Is there any difference that you and I
will see? Do you really need two or many browsers to figure out how much
time your DOM rendering is taking or will one browser suffice?(lets ignore
that you still arent getting "true" times - because browser times are
dependent on what else the user is doing, what sort of network bandwidth he
has , what browser he is using, what are IE cache settings are and so on).

Pre - cloud , it was prohibitive to drive browsers to do load tests - now
it is possible , but the amount of additional value that you get over a
http request/response load test and some browser analysis is minimal to
none. (Some types of scripts are easier to write with a browser driven tool
though).









On Wed, Feb 6, 2013 at 4:30 PM, Zippy Zeppoli <zi...@gmail.com>wrote:

> I think you may be  missing the point.
> Real load cannot be tested via HTTP interactions.
> There is no DOM rendering happening.
> I can make HTTP requests all day and it won't reflect the true response
> time unless it's done through a browser.
>
> Recording a script in Jmeter proxy is trivial. Simulating *real* user load
> is not it requires a browser and interactions with a web application.
>
> On Tue, Feb 5, 2013 at 6:51 PM, Deepak Shetty <sh...@gmail.com> wrote:
>
> > >Actually that does matter it cannot do JavaScript. If a request requires
> > >you need to be able to click a JavaScript button then the request will
> > >never happen.
> > The point is that what happens when the button is clicked? Assuming its a
> > server - ajax call then A HTTP call is made and some parameters are
> passed
> > and some values are returned. Thats whats important for the load test ,
> not
> > the fact that javascript was executed.
> > So when you record the script , you will be the person clicking the
> > button(you are recording your actions) , JMeter will record every
> > interaction that makes a call to the server and will record this as a
> > separate HTTP request and when you run the script the same request will
> be
> > made as if someone clicked the button!
> >
> > You dont need to use the recorder either , you can modify the script
> > yourself.
> >
> > If the javascript didnt actually make any server side call - then it
> doesnt
> > matter because you dont want to load test this anyway.
> >
> > Have you actually tried this? It sounds as if you have a problem
> recording
> > your script and you probably have concluded that JMeter doesnt do
> > javascript (true) and hence cant test websites that do javascript/ajax
> > (false)
> >
> > >Real browser is needed
> > Not for a good deal of use cases - as many of the people on this mailing
> > list can attest too.
> >
> >
> >
> >
> >
> > On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > >wrote:
> >
> > > Deepak,
> > > Actually that does matter it cannot do JavaScript. If a request
> requires
> > > you need to be able to click a JavaScript button then the request will
> > > never happen. No request will ever be made.  Also testing true web
> > > performance requires rendering the DOM, not just initiating HTTP
> requests
> > > and recording the response time, rps, etc.
> > >
> > > Real browser is needed, with JavaScript, and Jmeter doesn't integrate
> > well
> > > with this, it isn't designed for this, which is understandable. The
> > problem
> > > is there is a gap between real browser testing (owned by third party
> > > companies) and open source tools (Jmeter). There's nothing in between
> for
> > > real-browser based performance testing. I could go into why, but its
> off
> > > topic of this list, and I'd rather spare everyone the gas.
> > >
> > > Point being, Jmeter cannot solve my problem, without some serious
> > > customization.
> > >
> > >
> > >
> > > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <sh...@gmail.com>
> wrote:
> > >
> > > > Hi
> > > > You are getting too caught up in the JMeter doesnt do javascript
> thing.
> > > In
> > > > most cases it doesnt matter.
> > > > You have a webserver that is receiving HTTP requests - whether those
> > > > requests are generated via the user clicking a link or via AJAX or
> via
> > > > flash is hardly relevant to the webserver. It sees HTTP requests and
> > > sends
> > > > HTTP responses.
> > > > JMeter deals with HTTP request and responses. As long as you can make
> > the
> > > > same request that your javascript is making (which you can see via
> the
> > > > recording feature) , you can test it with Jmeter. The fact that the
> > proxy
> > > > cant record javascript is irrelevant - it only needs to record the
> > > > requests. If your javascript is responsible for generating the
> requests
> > > in
> > > > some way , then you have to replicate that within JMeter.
> > > >
> > > > Some caveats here are
> > > > a. Your toolkit should be good when you need to parameterise(JQuery
> is
> > > > great , GWT sucks)
> > > > b. If you need to perform some AJAX requests in parallel then JMeter
> > isnt
> > > > quite there yet.
> > > >
> > > > Its probably true that it is easier writing scripts for Selenium like
> > > tools
> > > > - but they also need more resources as well as given how often a UI
> > > changes
> > > > as opposed to the HTTP request/response pair , sometimes JMeter
> scripts
> > > are
> > > > more resilient to change.
> > > >
> > > > regards
> > > > deepak
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Tue, Feb 5, 2013 at 5:29 PM, Zippy Zeppoli <
> zippyzeppoli@gmail.com
> > > > >wrote:
> > > >
> > > > > Proxy won't work for clicking on JavaScript.
> > > > > Selenium will, however, Selenium isn't designed for performance
> > > testing,
> > > > > with the exception of BrowserMob, who has perfected it.
> > > > >
> > > > > If JMeter had some kind of (good) Selenium integration then it
> might
> > be
> > > > > able to achieve it.
> > > > >
> > > > > I think JMeter is a good tool, but it's not built for this kind of
> > > work.
> > > > >
> > > > > On Tue, Feb 5, 2013 at 5:20 PM, David Luu <ma...@gmail.com>
> > wrote:
> > > > >
> > > > > > I'm not familiar with the full feature set of BrowserMob, but
> > JMeter
> > > > can
> > > > > do
> > > > > > what you want, easy or hard, depending on your needs.
> > > > > >
> > > > > > If all you need is simple record & playback, JMeter proxy is best
> > > > option.
> > > > > > Just record w/ proxy, it generates a basic test plan that you can
> > > save
> > > > to
> > > > > > file and run w/ X threads to generate load, etc.
> > > > > >
> > > > > > But that approach will always use the same user, same data in the
> > > AJAX
> > > > > > calls during load generation.
> > > > > >
> > > > > > If you need them to be unique & parameterized, that's where it
> > takes
> > > > some
> > > > > > work to go in and cleanup the proxy recording w/ paramaterized
> > data,
> > > > > > response checking (if more than just checking HTTP 200 OKs). And
> > > you'll
> > > > > > find proxy recording generates a lot of unnecessary HTTP requests
> > for
> > > > > HTML,
> > > > > > CSS, image files that aren't necessary of interest as you're
> > testing
> > > > the
> > > > > > AJAX calls, which is where you filter out only the requests of
> > > interest
> > > > > and
> > > > > > only use those in test plan, etc.
> > > > > >
> > > > > > I believe this kind of work is needed regardless of what tool you
> > > use,
> > > > > some
> > > > > > tools just make it easier, but there's still work to do. Not
> just a
> > > one
> > > > > > touch button approach unless all you need is simple record &
> > > playback.
> > > > > >
> > > > > > On Tue, Feb 5, 2013 at 5:08 PM, Zippy Zeppoli <
> > > zippyzeppoli@gmail.com
> > > > > > >wrote:
> > > > > >
> > > > > > > Will probably just buy BrowserMob.
> > > > > > > Too bad there isn't an open source framework to already do
> this.
> > > > > > >
> > > > > > > Building this is a yak shave, and I need to be testing, not
> > > building
> > > > a
> > > > > > test
> > > > > > > harness thats probably going to break on the next release.
> > > > > > >
> > > > > > > On Tue, Feb 5, 2013 at 3:40 PM, David Luu <ma...@gmail.com>
> > > > wrote:
> > > > > > >
> > > > > > > > JMeter proxy is the most integrated approach, but I find it
> > gives
> > > > > "too
> > > > > > > much
> > > > > > > > information", so I tend to use external tools like browser
> > > traffic
> > > > > > > sniffers
> > > > > > > > (HttpFox, livehttpheaders, ieHttpHeaders) to see what HTTP
> > > requests
> > > > > are
> > > > > > > > made for AJAX calls for just the requests & responses I'm
> > > > interested
> > > > > > in,
> > > > > > > > easier to manage. But that's just my opinion, others might
> find
> > > the
> > > > > > > JMeter
> > > > > > > > proxy easier to use.
> > > > > > > >
> > > > > > > > Whatever approach you take, you just need to know what HTTP
> > > > requests
> > > > > > are
> > > > > > > > made by the AJAX calls to replicate in JMeter, and
> parameterize
> > > > those
> > > > > > > > requests to take in dynamic/test data as needed, assert
> > > appropriate
> > > > > > > > response data, etc. In this case, WebDriver can be dropped
> from
> > > the
> > > > > > > > equation, just gives more overhead and lowers scalability in
> > load
> > > > > > > > generation.
> > > > > > > >
> > > > > > > > On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
> > > > > > > > p.mouawad@ubik-ingenierie.com> wrote:
> > > > > > > >
> > > > > > > > > AjaxCall will emit a network call which JMeter will
> capture.
> > > > > > > > >
> > > > > > > > > Use JMeter Server Proxy and you should have the Ajax Calls
> > > > > recorded.
> > > > > > > > >
> > > > > > > > > Regards
> > > > > > > > > Philippe M.
> > > > > > > > >
> > > > > > > > > Follow me on twitter <https://twitter.com/philmdot>
> > > > > > > > >
> > > > > > > > > UBIK-INGENIERIE on TWITTER <
> > https://twitter.com/ubikingenierie
> > > >
> > > > > > > > >
> > > > > > > > > UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/>
> > > > > > > > >
> > > > > > > > > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <
> > > > > > zippyzeppoli@gmail.com
> > > > > > > > > >wrote:
> > > > > > > > >
> > > > > > > > > > To clarify:
> > > > > > > > > > An example would be:
> > > > > > > > > > 1) log in via a form post
> > > > > > > > > > 2) look at orders in an ecommerce interface (AJAX call)
> > > > > > > > > > 3) click on result to view order detail (AJAX)
> > > > > > > > > >
> > > > > > > > > > Pretty much a standard ecommerce transaction, but the
> > > interface
> > > > > is
> > > > > > > all
> > > > > > > > > > javascript.
> > > > > > > > > >
> > > > > > > > > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <
> > > > CStott@tnsi.com>
> > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > From: David Luu [mailto:mangaroo@gmail.com]
> > > > > > > > > > > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > > Subject: Re: complex javascript actions in jmeter
> load
> > > test
> > > > > > > > > > > >
> > > > > > > > > > > >  >> You can use webdriver from jmeter.  Create a
> > > webdriver
> > > > > > class
> > > > > > > > that
> > > > > > > > > > > > performs the requests and runs the javascript via the
> > > > > browser,
> > > > > > > then
> > > > > > > > > > > run/call
> > > > > > > > > > > > it from a BSF or JSR sampler.
> > > > > > > > > > > >
> > > > > > > > > > > > Just to clarify, I take it that's only worthwhile to
> do
> > > (in
> > > > > > terms
> > > > > > > > of
> > > > > > > > > > > > scalability) when using PhantomJSDriver or
> > HtmlUnitDriver
> > > > or
> > > > > > > > > > > FirefoxDriver
> > > > > > > > > > > > (on Linux with xvfb) with JMeter this way?
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > "Worthwhile" depends on assumptions.
> > > > > > > > > > >
> > > > > > > > > > > > Because otherwise, the browser GUI is the scalability
> > > > > limiting
> > > > > > > > factor
> > > > > > > > > > > even
> > > > > > > > > > > > with JMeter and Grid deployment, and in that case, no
> > > > > > difference
> > > > > > > in
> > > > > > > > > > using
> > > > > > > > > > > > WebDriver outside JMeter to do performance tests
> except
> > > if
> > > > > one
> > > > > > > > wants
> > > > > > > > > > the
> > > > > > > > > > > > JMeter logging/reporting facilities to help
> performance
> > > > test,
> > > > > > > > because
> > > > > > > > > > > there's
> > > > > > > > > > > > no or minimal scalabiity gain.
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Seems the poster is more at the capability/viability
> > stage
> > > of
> > > > > > > > > developing
> > > > > > > > > > > tests?  We would need much more information to start
> > > advising
> > > > > on
> > > > > > > the
> > > > > > > > > > entire
> > > > > > > > > > > load testing process, start to finish, and what
> > challenges
> > > > may
> > > > > > face
> > > > > > > > the
> > > > > > > > > > > poster along the way.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <
> > > > > > CStott@tnsi.com>
> > > > > > > > > > wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > You can use webdriver from jmeter.  Create a
> > webdriver
> > > > > class
> > > > > > > that
> > > > > > > > > > > > > performs the requests and runs the javascript via
> the
> > > > > > browser,
> > > > > > > > then
> > > > > > > > > > > > > run/call it from a BSF or JSR sampler.
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > > > From: Zippy Zeppoli [mailto:
> zippyzeppoli@gmail.com
> > ]
> > > > > > > > > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > > > > Subject: Re: complex javascript actions in jmeter
> > > load
> > > > > test
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > The problem is Selenium has no performance
> testing
> > > > > harness.
> > > > > > > > > > > > > > Sucks that it seems BrowserMob (paid solution) is
> > the
> > > > > only
> > > > > > > > solid
> > > > > > > > > > > option.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Until someone builds something with Phantom.js,
> but
> > > it
> > > > > > seems
> > > > > > > > > JMeter
> > > > > > > > > > > > > > isn't going to cut it here.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <
> > > > > > > mangaroo@gmail.com>
> > > > > > > > > > > wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > > You'll need to figure out what the complex
> > > javascript
> > > > > > does.
> > > > > > > > > Does
> > > > > > > > > > > > > > > it make any AJAX requests, or is it all local
> > > client
> > > > > side
> > > > > > > > > > > > > processing/rendering?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > If it's all local, then there's no point
> testing
> > it
> > > > > with
> > > > > > > > > JMeter,
> > > > > > > > > > > > > > > that's client side browser testing better done
> > with
> > > > > > > Selenium.
> > > > > > > > > It
> > > > > > > > > > > > > > > won't impact the server side load test (except
> > > delay
> > > > in
> > > > > > > > server
> > > > > > > > > > > > > > > response time for fetching files will impact
> the
> > > > > > javascript
> > > > > > > > > > > > > > > execution on client side, but that can be
> > > compensated
> > > > > w/
> > > > > > > > JMeter
> > > > > > > > > > > > > > > load test against server with 1+ Selenium test
> > > > running
> > > > > at
> > > > > > > > same
> > > > > > > > > > > > > > > time to gauge client side performance of
> site/app
> > > in
> > > > > > > > browser).
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > If the javascript does execute AJAX requests,
> you
> > > > need
> > > > > to
> > > > > > > > > figure
> > > > > > > > > > > > > > > out the HTTP requests made and mimic that in
> > JMeter
> > > > as
> > > > > > part
> > > > > > > > of
> > > > > > > > > > your
> > > > > > > > > > > > test.
> > > > > > > > > > > > > > > You can get that reading dev/design docs, or
> > > reverse
> > > > > > > > > > > > > > > engineer/traffic sniffing the app while doing
> > > manual
> > > > > > > testing.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > > > > > > > > > > > > <zippyzeppoli@gmail.com
> > > > > > > > > > > > > > > >wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > > > > If I have a website which requires logging
> in,
> > > and
> > > > > > > > executing
> > > > > > > > > > > > > > > > complex javascript actions, how would I do
> this
> > > (if
> > > > > at
> > > > > > > all)
> > > > > > > > > in
> > > > > > > > > > > jmeter?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > I've heard of writing groovy scripts to do
> this
> > > but
> > > > > > this
> > > > > > > > > sounds
> > > > > > > > > > > > > > > > like a
> > > > > > > > > > > > > > > lot
> > > > > > > > > > > > > > > > of work / maintenance.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Thank you.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > > > > > > > > To unsubscribe, e-mail:
> > > > user-unsubscribe@jmeter.apache.org
> > > > > > > > > > > > > For additional commands, e-mail:
> > > > > user-help@jmeter.apache.org
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > > > To unsubscribe, e-mail:
> > user-unsubscribe@jmeter.apache.org
> > > > > > > > > > > For additional commands, e-mail:
> > > user-help@jmeter.apache.org
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

RE: complex javascript actions in jmeter load test

Posted by "Stott, Charlie" <CS...@tnsi.com>.
What exactly are you trying to measure?

User experience, server capability, browser performance, etc?

There are obviously many aspects of load testing, and each serves a different purpose.  It seems you have started in one direction, and changed path along the way.

What statistics do you want to produce, in order to show what about your system?

Charlie

> -----Original Message-----
> From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
> Sent: Thursday, 7 February 2013 10:33 AM
> To: JMeter Users List
> Subject: Re: complex javascript actions in jmeter load test
>
> There seems to be a big misunderstanding of what is the benefit of using a
> browser.
> I think this thread at this point is far off topic, although it looks like a lot of
> good knowledge was shaken out of it, so I will consider it time well spent,
> and a question well asked.
>
> And now the clarification:
>
> Comparing RUM & Synthetic Page Load Times
>
> November 14, 2012 5:30 pm | 13 Comments
>
> Yesterday I read Etsy's October 2012 Site Performance Report. Etsy is one of
> only a handful of companies that publish their performance stats with
> explanations and future plans. It's really valuable (and brave!), and gives
> other developers an opportunity to learn from an industry leader. In this
> article Etsy mentions that the page load time stats are gathered from a
> private instance of WebPagetest. They explain their use of synthetically-
> generated measurements instead of RUM (Real User Monitoring) data:
>
> You might be surprised that we are using synthetic tests for this front-end
> report instead of Real User Monitoring (RUM) data.  RUM is a big part of
> performance monitoring at Etsy, but when we are looking at trends in front-
> end performance over time, synthetic testing allows us to eliminate much of
> the network variability that is inherent in real user data. This helps us tie
> performance regressions to specific code changes, and get a more stable
> view of performance overall.
>
> Etsy's choice of synthetic data for tracking performance as part of their
> automated build process totally makes sense. I've talked to many companies
> that do the same thing. Teams dealing with builds and code regressions
> should definitely do this. BUT... it's important to include RUM data when
> sharing performance measurements beyond the internal devops team.
>
> Why should RUM data always be used when talking beyond the core team?
>
> The issue with only showing synthetic data is that it typically makes a website
> appear much faster than it actually is. This has been true since I first started
> tracking real user metrics back in 2004. My rule-of-thumb is that your real
> users are experiencing page load times that are twice as long as their
> corresponding synthetic measurements.
>
> From http://www.stevesouders.com/blog/2012/11/14/comparing-rum-
> synthetic-page-load-times/
>
>
>
> On Wed, Feb 6, 2013 at 4:30 PM, Zippy Zeppoli <zi...@gmail.com>
> wrote:
> >
> > I think you may be  missing the point.
> > Real load cannot be tested via HTTP interactions.
> > There is no DOM rendering happening.
> > I can make HTTP requests all day and it won't reflect the true response time
> unless it's done through a browser.
> >
> > Recording a script in Jmeter proxy is trivial. Simulating *real* user load is
> not it requires a browser and interactions with a web application.
> >
> >
> > On Tue, Feb 5, 2013 at 6:51 PM, Deepak Shetty <sh...@gmail.com>
> wrote:
> >>
> >> >Actually that does matter it cannot do JavaScript. If a request
> >> >requires you need to be able to click a JavaScript button then the
> >> >request will never happen.
> >> The point is that what happens when the button is clicked? Assuming
> >> its a server - ajax call then A HTTP call is made and some parameters
> >> are passed and some values are returned. Thats whats important for
> >> the load test , not the fact that javascript was executed.
> >> So when you record the script , you will be the person clicking the
> >> button(you are recording your actions) , JMeter will record every
> >> interaction that makes a call to the server and will record this as a
> >> separate HTTP request and when you run the script the same request
> >> will be made as if someone clicked the button!
> >>
> >> You dont need to use the recorder either , you can modify the script
> >> yourself.
> >>
> >> If the javascript didnt actually make any server side call - then it
> >> doesnt matter because you dont want to load test this anyway.
> >>
> >> Have you actually tried this? It sounds as if you have a problem
> >> recording your script and you probably have concluded that JMeter
> >> doesnt do javascript (true) and hence cant test websites that do
> >> javascript/ajax
> >> (false)
> >>
> >> >Real browser is needed
> >> Not for a good deal of use cases - as many of the people on this
> >> mailing list can attest too.
> >>
> >>
> >>
> >>
> >>
> >> On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli
> <zi...@gmail.com>wrote:
> >>
> >> > Deepak,
> >> > Actually that does matter it cannot do JavaScript. If a request
> >> > requires you need to be able to click a JavaScript button then the
> >> > request will never happen. No request will ever be made.  Also
> >> > testing true web performance requires rendering the DOM, not just
> >> > initiating HTTP requests and recording the response time, rps, etc.
> >> >
> >> > Real browser is needed, with JavaScript, and Jmeter doesn't
> >> > integrate well with this, it isn't designed for this, which is
> >> > understandable. The problem is there is a gap between real browser
> >> > testing (owned by third party
> >> > companies) and open source tools (Jmeter). There's nothing in
> >> > between for real-browser based performance testing. I could go into
> >> > why, but its off topic of this list, and I'd rather spare everyone the gas.
> >> >
> >> > Point being, Jmeter cannot solve my problem, without some serious
> >> > customization.
> >> >
> >> >
> >> >
> >> > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <sh...@gmail.com>
> wrote:
> >> >
> >> > > Hi
> >> > > You are getting too caught up in the JMeter doesnt do javascript thing.
> >> > In
> >> > > most cases it doesnt matter.
> >> > > You have a webserver that is receiving HTTP requests - whether
> >> > > those requests are generated via the user clicking a link or via
> >> > > AJAX or via flash is hardly relevant to the webserver. It sees
> >> > > HTTP requests and
> >> > sends
> >> > > HTTP responses.
> >> > > JMeter deals with HTTP request and responses. As long as you can
> >> > > make the same request that your javascript is making (which you
> >> > > can see via the recording feature) , you can test it with Jmeter.
> >> > > The fact that the proxy cant record javascript is irrelevant - it
> >> > > only needs to record the requests. If your javascript is
> >> > > responsible for generating the requests
> >> > in
> >> > > some way , then you have to replicate that within JMeter.
> >> > >
> >> > > Some caveats here are
> >> > > a. Your toolkit should be good when you need to
> >> > > parameterise(JQuery is great , GWT sucks) b. If you need to
> >> > > perform some AJAX requests in parallel then JMeter isnt quite
> >> > > there yet.
> >> > >
> >> > > Its probably true that it is easier writing scripts for Selenium
> >> > > like
> >> > tools
> >> > > - but they also need more resources as well as given how often a
> >> > > UI
> >> > changes
> >> > > as opposed to the HTTP request/response pair , sometimes JMeter
> >> > > scripts
> >> > are
> >> > > more resilient to change.
> >> > >
> >> > > regards
> >> > > deepak
> >> > >
> >> > >
> >> > >
> >> > >
> >> > >
> >> > >
> >> > >
> >> > >
> >> > > On Tue, Feb 5, 2013 at 5:29 PM, Zippy Zeppoli
> >> > > <zippyzeppoli@gmail.com
> >> > > >wrote:
> >> > >
> >> > > > Proxy won't work for clicking on JavaScript.
> >> > > > Selenium will, however, Selenium isn't designed for performance
> >> > testing,
> >> > > > with the exception of BrowserMob, who has perfected it.
> >> > > >
> >> > > > If JMeter had some kind of (good) Selenium integration then it
> >> > > > might be able to achieve it.
> >> > > >
> >> > > > I think JMeter is a good tool, but it's not built for this kind
> >> > > > of
> >> > work.
> >> > > >
> >> > > > On Tue, Feb 5, 2013 at 5:20 PM, David Luu <ma...@gmail.com>
> wrote:
> >> > > >
> >> > > > > I'm not familiar with the full feature set of BrowserMob, but
> >> > > > > JMeter
> >> > > can
> >> > > > do
> >> > > > > what you want, easy or hard, depending on your needs.
> >> > > > >
> >> > > > > If all you need is simple record & playback, JMeter proxy is
> >> > > > > best
> >> > > option.
> >> > > > > Just record w/ proxy, it generates a basic test plan that you
> >> > > > > can
> >> > save
> >> > > to
> >> > > > > file and run w/ X threads to generate load, etc.
> >> > > > >
> >> > > > > But that approach will always use the same user, same data in
> >> > > > > the
> >> > AJAX
> >> > > > > calls during load generation.
> >> > > > >
> >> > > > > If you need them to be unique & parameterized, that's where
> >> > > > > it takes
> >> > > some
> >> > > > > work to go in and cleanup the proxy recording w/
> >> > > > > paramaterized data, response checking (if more than just
> >> > > > > checking HTTP 200 OKs). And
> >> > you'll
> >> > > > > find proxy recording generates a lot of unnecessary HTTP
> >> > > > > requests for
> >> > > > HTML,
> >> > > > > CSS, image files that aren't necessary of interest as you're
> >> > > > > testing
> >> > > the
> >> > > > > AJAX calls, which is where you filter out only the requests
> >> > > > > of
> >> > interest
> >> > > > and
> >> > > > > only use those in test plan, etc.
> >> > > > >
> >> > > > > I believe this kind of work is needed regardless of what tool
> >> > > > > you
> >> > use,
> >> > > > some
> >> > > > > tools just make it easier, but there's still work to do. Not
> >> > > > > just a
> >> > one
> >> > > > > touch button approach unless all you need is simple record &
> >> > playback.
> >> > > > >
> >> > > > > On Tue, Feb 5, 2013 at 5:08 PM, Zippy Zeppoli <
> >> > zippyzeppoli@gmail.com
> >> > > > > >wrote:
> >> > > > >
> >> > > > > > Will probably just buy BrowserMob.
> >> > > > > > Too bad there isn't an open source framework to already do this.
> >> > > > > >
> >> > > > > > Building this is a yak shave, and I need to be testing, not
> >> > building
> >> > > a
> >> > > > > test
> >> > > > > > harness thats probably going to break on the next release.
> >> > > > > >
> >> > > > > > On Tue, Feb 5, 2013 at 3:40 PM, David Luu
> >> > > > > > <ma...@gmail.com>
> >> > > wrote:
> >> > > > > >
> >> > > > > > > JMeter proxy is the most integrated approach, but I find
> >> > > > > > > it gives
> >> > > > "too
> >> > > > > > much
> >> > > > > > > information", so I tend to use external tools like
> >> > > > > > > browser
> >> > traffic
> >> > > > > > sniffers
> >> > > > > > > (HttpFox, livehttpheaders, ieHttpHeaders) to see what
> >> > > > > > > HTTP
> >> > requests
> >> > > > are
> >> > > > > > > made for AJAX calls for just the requests & responses I'm
> >> > > interested
> >> > > > > in,
> >> > > > > > > easier to manage. But that's just my opinion, others
> >> > > > > > > might find
> >> > the
> >> > > > > > JMeter
> >> > > > > > > proxy easier to use.
> >> > > > > > >
> >> > > > > > > Whatever approach you take, you just need to know what
> >> > > > > > > HTTP
> >> > > requests
> >> > > > > are
> >> > > > > > > made by the AJAX calls to replicate in JMeter, and
> >> > > > > > > parameterize
> >> > > those
> >> > > > > > > requests to take in dynamic/test data as needed, assert
> >> > appropriate
> >> > > > > > > response data, etc. In this case, WebDriver can be
> >> > > > > > > dropped from
> >> > the
> >> > > > > > > equation, just gives more overhead and lowers scalability
> >> > > > > > > in load generation.
> >> > > > > > >
> >> > > > > > > On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
> >> > > > > > > p.mouawad@ubik-ingenierie.com> wrote:
> >> > > > > > >
> >> > > > > > > > AjaxCall will emit a network call which JMeter will capture.
> >> > > > > > > >
> >> > > > > > > > Use JMeter Server Proxy and you should have the Ajax
> >> > > > > > > > Calls
> >> > > > recorded.
> >> > > > > > > >
> >> > > > > > > > Regards
> >> > > > > > > > Philippe M.
> >> > > > > > > >
> >> > > > > > > > Follow me on twitter <https://twitter.com/philmdot>
> >> > > > > > > >
> >> > > > > > > > UBIK-INGENIERIE on TWITTER
> >> > > > > > > > <https://twitter.com/ubikingenierie
> >> > >
> >> > > > > > > >
> >> > > > > > > > UBIK LOAD PACK BLOG
> >> > > > > > > > <http://www.ubik-ingenierie.com/blog/>
> >> > > > > > > >
> >> > > > > > > > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <
> >> > > > > zippyzeppoli@gmail.com
> >> > > > > > > > >wrote:
> >> > > > > > > >
> >> > > > > > > > > To clarify:
> >> > > > > > > > > An example would be:
> >> > > > > > > > > 1) log in via a form post
> >> > > > > > > > > 2) look at orders in an ecommerce interface (AJAX
> >> > > > > > > > > call)
> >> > > > > > > > > 3) click on result to view order detail (AJAX)
> >> > > > > > > > >
> >> > > > > > > > > Pretty much a standard ecommerce transaction, but the
> >> > interface
> >> > > > is
> >> > > > > > all
> >> > > > > > > > > javascript.
> >> > > > > > > > >
> >> > > > > > > > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <
> >> > > CStott@tnsi.com>
> >> > > > > > > wrote:
> >> > > > > > > > >
> >> > > > > > > > > > > -----Original Message-----
> >> > > > > > > > > > > From: David Luu [mailto:mangaroo@gmail.com]
> >> > > > > > > > > > > Sent: Tuesday, 5 February 2013 1:18 PM
> >> > > > > > > > > > > To: JMeter Users List
> >> > > > > > > > > > > Subject: Re: complex javascript actions in jmeter
> >> > > > > > > > > > > load
> >> > test
> >> > > > > > > > > > >
> >> > > > > > > > > > >  >> You can use webdriver from jmeter.  Create a
> >> > webdriver
> >> > > > > class
> >> > > > > > > that
> >> > > > > > > > > > > performs the requests and runs the javascript via
> >> > > > > > > > > > > the
> >> > > > browser,
> >> > > > > > then
> >> > > > > > > > > > run/call
> >> > > > > > > > > > > it from a BSF or JSR sampler.
> >> > > > > > > > > > >
> >> > > > > > > > > > > Just to clarify, I take it that's only worthwhile
> >> > > > > > > > > > > to do
> >> > (in
> >> > > > > terms
> >> > > > > > > of
> >> > > > > > > > > > > scalability) when using PhantomJSDriver or
> >> > > > > > > > > > > HtmlUnitDriver
> >> > > or
> >> > > > > > > > > > FirefoxDriver
> >> > > > > > > > > > > (on Linux with xvfb) with JMeter this way?
> >> > > > > > > > > > >
> >> > > > > > > > > >
> >> > > > > > > > > > "Worthwhile" depends on assumptions.
> >> > > > > > > > > >
> >> > > > > > > > > > > Because otherwise, the browser GUI is the
> >> > > > > > > > > > > scalability
> >> > > > limiting
> >> > > > > > > factor
> >> > > > > > > > > > even
> >> > > > > > > > > > > with JMeter and Grid deployment, and in that
> >> > > > > > > > > > > case, no
> >> > > > > difference
> >> > > > > > in
> >> > > > > > > > > using
> >> > > > > > > > > > > WebDriver outside JMeter to do performance tests
> >> > > > > > > > > > > except
> >> > if
> >> > > > one
> >> > > > > > > wants
> >> > > > > > > > > the
> >> > > > > > > > > > > JMeter logging/reporting facilities to help
> >> > > > > > > > > > > performance
> >> > > test,
> >> > > > > > > because
> >> > > > > > > > > > there's
> >> > > > > > > > > > > no or minimal scalabiity gain.
> >> > > > > > > > > > >
> >> > > > > > > > > >
> >> > > > > > > > > > Seems the poster is more at the
> >> > > > > > > > > > capability/viability stage
> >> > of
> >> > > > > > > > developing
> >> > > > > > > > > > tests?  We would need much more information to
> >> > > > > > > > > > start
> >> > advising
> >> > > > on
> >> > > > > > the
> >> > > > > > > > > entire
> >> > > > > > > > > > load testing process, start to finish, and what
> >> > > > > > > > > > challenges
> >> > > may
> >> > > > > face
> >> > > > > > > the
> >> > > > > > > > > > poster along the way.
> >> > > > > > > > > >
> >> > > > > > > > > >
> >> > > > > > > > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <
> >> > > > > CStott@tnsi.com>
> >> > > > > > > > > wrote:
> >> > > > > > > > > > >
> >> > > > > > > > > > > > You can use webdriver from jmeter.  Create a
> >> > > > > > > > > > > > webdriver
> >> > > > class
> >> > > > > > that
> >> > > > > > > > > > > > performs the requests and runs the javascript
> >> > > > > > > > > > > > via the
> >> > > > > browser,
> >> > > > > > > then
> >> > > > > > > > > > > > run/call it from a BSF or JSR sampler.
> >> > > > > > > > > > > >
> >> > > > > > > > > > > >
> >> > > > > > > > > > > > > -----Original Message-----
> >> > > > > > > > > > > > > From: Zippy Zeppoli
> >> > > > > > > > > > > > > [mailto:zippyzeppoli@gmail.com]
> >> > > > > > > > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> >> > > > > > > > > > > > > To: JMeter Users List
> >> > > > > > > > > > > > > Subject: Re: complex javascript actions in
> >> > > > > > > > > > > > > jmeter
> >> > load
> >> > > > test
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > The problem is Selenium has no performance
> >> > > > > > > > > > > > > testing
> >> > > > harness.
> >> > > > > > > > > > > > > Sucks that it seems BrowserMob (paid
> >> > > > > > > > > > > > > solution) is the
> >> > > > only
> >> > > > > > > solid
> >> > > > > > > > > > option.
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > Until someone builds something with
> >> > > > > > > > > > > > > Phantom.js, but
> >> > it
> >> > > > > seems
> >> > > > > > > > JMeter
> >> > > > > > > > > > > > > isn't going to cut it here.
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <
> >> > > > > > mangaroo@gmail.com>
> >> > > > > > > > > > wrote:
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > > You'll need to figure out what the complex
> >> > javascript
> >> > > > > does.
> >> > > > > > > > Does
> >> > > > > > > > > > > > > > it make any AJAX requests, or is it all
> >> > > > > > > > > > > > > > local
> >> > client
> >> > > > side
> >> > > > > > > > > > > > processing/rendering?
> >> > > > > > > > > > > > > >
> >> > > > > > > > > > > > > > If it's all local, then there's no point
> >> > > > > > > > > > > > > > testing it
> >> > > > with
> >> > > > > > > > JMeter,
> >> > > > > > > > > > > > > > that's client side browser testing better
> >> > > > > > > > > > > > > > done with
> >> > > > > > Selenium.
> >> > > > > > > > It
> >> > > > > > > > > > > > > > won't impact the server side load test
> >> > > > > > > > > > > > > > (except
> >> > delay
> >> > > in
> >> > > > > > > server
> >> > > > > > > > > > > > > > response time for fetching files will
> >> > > > > > > > > > > > > > impact the
> >> > > > > javascript
> >> > > > > > > > > > > > > > execution on client side, but that can be
> >> > compensated
> >> > > > w/
> >> > > > > > > JMeter
> >> > > > > > > > > > > > > > load test against server with 1+ Selenium
> >> > > > > > > > > > > > > > test
> >> > > running
> >> > > > at
> >> > > > > > > same
> >> > > > > > > > > > > > > > time to gauge client side performance of
> >> > > > > > > > > > > > > > site/app
> >> > in
> >> > > > > > > browser).
> >> > > > > > > > > > > > > >
> >> > > > > > > > > > > > > > If the javascript does execute AJAX
> >> > > > > > > > > > > > > > requests, you
> >> > > need
> >> > > > to
> >> > > > > > > > figure
> >> > > > > > > > > > > > > > out the HTTP requests made and mimic that
> >> > > > > > > > > > > > > > in JMeter
> >> > > as
> >> > > > > part
> >> > > > > > > of
> >> > > > > > > > > your
> >> > > > > > > > > > > test.
> >> > > > > > > > > > > > > > You can get that reading dev/design docs,
> >> > > > > > > > > > > > > > or
> >> > reverse
> >> > > > > > > > > > > > > > engineer/traffic sniffing the app while
> >> > > > > > > > > > > > > > doing
> >> > manual
> >> > > > > > testing.
> >> > > > > > > > > > > > > >
> >> > > > > > > > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy
> >> > > > > > > > > > > > > > Zeppoli <zippyzeppoli@gmail.com
> >> > > > > > > > > > > > > > >wrote:
> >> > > > > > > > > > > > > >
> >> > > > > > > > > > > > > > > Hello,
> >> > > > > > > > > > > > > > > If I have a website which requires
> >> > > > > > > > > > > > > > > logging in,
> >> > and
> >> > > > > > > executing
> >> > > > > > > > > > > > > > > complex javascript actions, how would I
> >> > > > > > > > > > > > > > > do this
> >> > (if
> >> > > > at
> >> > > > > > all)
> >> > > > > > > > in
> >> > > > > > > > > > jmeter?
> >> > > > > > > > > > > > > > >
> >> > > > > > > > > > > > > > > I've heard of writing groovy scripts to
> >> > > > > > > > > > > > > > > do this
> >> > but
> >> > > > > this
> >> > > > > > > > sounds
> >> > > > > > > > > > > > > > > like a
> >> > > > > > > > > > > > > > lot
> >> > > > > > > > > > > > > > > of work / maintenance.
> >> > > > > > > > > > > > > > >
> >> > > > > > > > > > > > > > > Thank you.
> >> > > > > > > > > > > > > > >
> >> > > > > > > > > > > > > >
> >> > > > > > > > > > > >
> >> > > > > > > > > > > >
> >> > > > > > > >
> >> > > > ---------------------------------------------------------------
> >> > > > ------
> >> > > > > > > > > > > > To unsubscribe, e-mail:
> >> > > user-unsubscribe@jmeter.apache.org
> >> > > > > > > > > > > > For additional commands, e-mail:
> >> > > > user-help@jmeter.apache.org
> >> > > > > > > > > > > >
> >> > > > > > > > > > > >
> >> > > > > > > > > >
> >> > > > > > > > > >
> >> > > > > >
> >> > -------------------------------------------------------------------
> >> > --
> >> > > > > > > > > > To unsubscribe, e-mail:
> >> > > > > > > > > > user-unsubscribe@jmeter.apache.org
> >> > > > > > > > > > For additional commands, e-mail:
> >> > user-help@jmeter.apache.org
> >> > > > > > > > > >
> >> > > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > >
> >> > > > > > >
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org


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


Re: complex javascript actions in jmeter load test

Posted by Zippy Zeppoli <zi...@gmail.com>.
There seems to be a big misunderstanding of what is the benefit of
using a browser.
I think this thread at this point is far off topic, although it looks
like a lot of good knowledge was shaken out of it, so I will consider
it time well spent, and a question well asked.

And now the clarification:

Comparing RUM & Synthetic Page Load Times

November 14, 2012 5:30 pm | 13 Comments

Yesterday I read Etsy’s October 2012 Site Performance Report. Etsy is
one of only a handful of companies that publish their performance
stats with explanations and future plans. It’s really valuable (and
brave!), and gives other developers an opportunity to learn from an
industry leader. In this article Etsy mentions that the page load time
stats are gathered from a private instance of WebPagetest. They
explain their use of synthetically-generated measurements instead of
RUM (Real User Monitoring) data:

You might be surprised that we are using synthetic tests for this
front-end report instead of Real User Monitoring (RUM) data.  RUM is a
big part of performance monitoring at Etsy, but when we are looking at
trends in front-end performance over time, synthetic testing allows us
to eliminate much of the network variability that is inherent in real
user data. This helps us tie performance regressions to specific code
changes, and get a more stable view of performance overall.

Etsy’s choice of synthetic data for tracking performance as part of
their automated build process totally makes sense. I’ve talked to many
companies that do the same thing. Teams dealing with builds and code
regressions should definitely do this. BUT… it’s important to include
RUM data when sharing performance measurements beyond the internal
devops team.

Why should RUM data always be used when talking beyond the core team?

The issue with only showing synthetic data is that it typically makes
a website appear much faster than it actually is. This has been true
since I first started tracking real user metrics back in 2004. My
rule-of-thumb is that your real users are experiencing page load times
that are twice as long as their corresponding synthetic measurements.

>From http://www.stevesouders.com/blog/2012/11/14/comparing-rum-synthetic-page-load-times/



On Wed, Feb 6, 2013 at 4:30 PM, Zippy Zeppoli <zi...@gmail.com> wrote:
>
> I think you may be  missing the point.
> Real load cannot be tested via HTTP interactions.
> There is no DOM rendering happening.
> I can make HTTP requests all day and it won't reflect the true response time unless it's done through a browser.
>
> Recording a script in Jmeter proxy is trivial. Simulating *real* user load is not it requires a browser and interactions with a web application.
>
>
> On Tue, Feb 5, 2013 at 6:51 PM, Deepak Shetty <sh...@gmail.com> wrote:
>>
>> >Actually that does matter it cannot do JavaScript. If a request requires
>> >you need to be able to click a JavaScript button then the request will
>> >never happen.
>> The point is that what happens when the button is clicked? Assuming its a
>> server - ajax call then A HTTP call is made and some parameters are passed
>> and some values are returned. Thats whats important for the load test , not
>> the fact that javascript was executed.
>> So when you record the script , you will be the person clicking the
>> button(you are recording your actions) , JMeter will record every
>> interaction that makes a call to the server and will record this as a
>> separate HTTP request and when you run the script the same request will be
>> made as if someone clicked the button!
>>
>> You dont need to use the recorder either , you can modify the script
>> yourself.
>>
>> If the javascript didnt actually make any server side call - then it doesnt
>> matter because you dont want to load test this anyway.
>>
>> Have you actually tried this? It sounds as if you have a problem recording
>> your script and you probably have concluded that JMeter doesnt do
>> javascript (true) and hence cant test websites that do javascript/ajax
>> (false)
>>
>> >Real browser is needed
>> Not for a good deal of use cases - as many of the people on this mailing
>> list can attest too.
>>
>>
>>
>>
>>
>> On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli <zi...@gmail.com>wrote:
>>
>> > Deepak,
>> > Actually that does matter it cannot do JavaScript. If a request requires
>> > you need to be able to click a JavaScript button then the request will
>> > never happen. No request will ever be made.  Also testing true web
>> > performance requires rendering the DOM, not just initiating HTTP requests
>> > and recording the response time, rps, etc.
>> >
>> > Real browser is needed, with JavaScript, and Jmeter doesn't integrate well
>> > with this, it isn't designed for this, which is understandable. The problem
>> > is there is a gap between real browser testing (owned by third party
>> > companies) and open source tools (Jmeter). There's nothing in between for
>> > real-browser based performance testing. I could go into why, but its off
>> > topic of this list, and I'd rather spare everyone the gas.
>> >
>> > Point being, Jmeter cannot solve my problem, without some serious
>> > customization.
>> >
>> >
>> >
>> > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <sh...@gmail.com> wrote:
>> >
>> > > Hi
>> > > You are getting too caught up in the JMeter doesnt do javascript thing.
>> > In
>> > > most cases it doesnt matter.
>> > > You have a webserver that is receiving HTTP requests - whether those
>> > > requests are generated via the user clicking a link or via AJAX or via
>> > > flash is hardly relevant to the webserver. It sees HTTP requests and
>> > sends
>> > > HTTP responses.
>> > > JMeter deals with HTTP request and responses. As long as you can make the
>> > > same request that your javascript is making (which you can see via the
>> > > recording feature) , you can test it with Jmeter. The fact that the proxy
>> > > cant record javascript is irrelevant - it only needs to record the
>> > > requests. If your javascript is responsible for generating the requests
>> > in
>> > > some way , then you have to replicate that within JMeter.
>> > >
>> > > Some caveats here are
>> > > a. Your toolkit should be good when you need to parameterise(JQuery is
>> > > great , GWT sucks)
>> > > b. If you need to perform some AJAX requests in parallel then JMeter isnt
>> > > quite there yet.
>> > >
>> > > Its probably true that it is easier writing scripts for Selenium like
>> > tools
>> > > - but they also need more resources as well as given how often a UI
>> > changes
>> > > as opposed to the HTTP request/response pair , sometimes JMeter scripts
>> > are
>> > > more resilient to change.
>> > >
>> > > regards
>> > > deepak
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > On Tue, Feb 5, 2013 at 5:29 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
>> > > >wrote:
>> > >
>> > > > Proxy won't work for clicking on JavaScript.
>> > > > Selenium will, however, Selenium isn't designed for performance
>> > testing,
>> > > > with the exception of BrowserMob, who has perfected it.
>> > > >
>> > > > If JMeter had some kind of (good) Selenium integration then it might be
>> > > > able to achieve it.
>> > > >
>> > > > I think JMeter is a good tool, but it's not built for this kind of
>> > work.
>> > > >
>> > > > On Tue, Feb 5, 2013 at 5:20 PM, David Luu <ma...@gmail.com> wrote:
>> > > >
>> > > > > I'm not familiar with the full feature set of BrowserMob, but JMeter
>> > > can
>> > > > do
>> > > > > what you want, easy or hard, depending on your needs.
>> > > > >
>> > > > > If all you need is simple record & playback, JMeter proxy is best
>> > > option.
>> > > > > Just record w/ proxy, it generates a basic test plan that you can
>> > save
>> > > to
>> > > > > file and run w/ X threads to generate load, etc.
>> > > > >
>> > > > > But that approach will always use the same user, same data in the
>> > AJAX
>> > > > > calls during load generation.
>> > > > >
>> > > > > If you need them to be unique & parameterized, that's where it takes
>> > > some
>> > > > > work to go in and cleanup the proxy recording w/ paramaterized data,
>> > > > > response checking (if more than just checking HTTP 200 OKs). And
>> > you'll
>> > > > > find proxy recording generates a lot of unnecessary HTTP requests for
>> > > > HTML,
>> > > > > CSS, image files that aren't necessary of interest as you're testing
>> > > the
>> > > > > AJAX calls, which is where you filter out only the requests of
>> > interest
>> > > > and
>> > > > > only use those in test plan, etc.
>> > > > >
>> > > > > I believe this kind of work is needed regardless of what tool you
>> > use,
>> > > > some
>> > > > > tools just make it easier, but there's still work to do. Not just a
>> > one
>> > > > > touch button approach unless all you need is simple record &
>> > playback.
>> > > > >
>> > > > > On Tue, Feb 5, 2013 at 5:08 PM, Zippy Zeppoli <
>> > zippyzeppoli@gmail.com
>> > > > > >wrote:
>> > > > >
>> > > > > > Will probably just buy BrowserMob.
>> > > > > > Too bad there isn't an open source framework to already do this.
>> > > > > >
>> > > > > > Building this is a yak shave, and I need to be testing, not
>> > building
>> > > a
>> > > > > test
>> > > > > > harness thats probably going to break on the next release.
>> > > > > >
>> > > > > > On Tue, Feb 5, 2013 at 3:40 PM, David Luu <ma...@gmail.com>
>> > > wrote:
>> > > > > >
>> > > > > > > JMeter proxy is the most integrated approach, but I find it gives
>> > > > "too
>> > > > > > much
>> > > > > > > information", so I tend to use external tools like browser
>> > traffic
>> > > > > > sniffers
>> > > > > > > (HttpFox, livehttpheaders, ieHttpHeaders) to see what HTTP
>> > requests
>> > > > are
>> > > > > > > made for AJAX calls for just the requests & responses I'm
>> > > interested
>> > > > > in,
>> > > > > > > easier to manage. But that's just my opinion, others might find
>> > the
>> > > > > > JMeter
>> > > > > > > proxy easier to use.
>> > > > > > >
>> > > > > > > Whatever approach you take, you just need to know what HTTP
>> > > requests
>> > > > > are
>> > > > > > > made by the AJAX calls to replicate in JMeter, and parameterize
>> > > those
>> > > > > > > requests to take in dynamic/test data as needed, assert
>> > appropriate
>> > > > > > > response data, etc. In this case, WebDriver can be dropped from
>> > the
>> > > > > > > equation, just gives more overhead and lowers scalability in load
>> > > > > > > generation.
>> > > > > > >
>> > > > > > > On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
>> > > > > > > p.mouawad@ubik-ingenierie.com> wrote:
>> > > > > > >
>> > > > > > > > AjaxCall will emit a network call which JMeter will capture.
>> > > > > > > >
>> > > > > > > > Use JMeter Server Proxy and you should have the Ajax Calls
>> > > > recorded.
>> > > > > > > >
>> > > > > > > > Regards
>> > > > > > > > Philippe M.
>> > > > > > > >
>> > > > > > > > Follow me on twitter <https://twitter.com/philmdot>
>> > > > > > > >
>> > > > > > > > UBIK-INGENIERIE on TWITTER <https://twitter.com/ubikingenierie
>> > >
>> > > > > > > >
>> > > > > > > > UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/>
>> > > > > > > >
>> > > > > > > > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <
>> > > > > zippyzeppoli@gmail.com
>> > > > > > > > >wrote:
>> > > > > > > >
>> > > > > > > > > To clarify:
>> > > > > > > > > An example would be:
>> > > > > > > > > 1) log in via a form post
>> > > > > > > > > 2) look at orders in an ecommerce interface (AJAX call)
>> > > > > > > > > 3) click on result to view order detail (AJAX)
>> > > > > > > > >
>> > > > > > > > > Pretty much a standard ecommerce transaction, but the
>> > interface
>> > > > is
>> > > > > > all
>> > > > > > > > > javascript.
>> > > > > > > > >
>> > > > > > > > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <
>> > > CStott@tnsi.com>
>> > > > > > > wrote:
>> > > > > > > > >
>> > > > > > > > > > > -----Original Message-----
>> > > > > > > > > > > From: David Luu [mailto:mangaroo@gmail.com]
>> > > > > > > > > > > Sent: Tuesday, 5 February 2013 1:18 PM
>> > > > > > > > > > > To: JMeter Users List
>> > > > > > > > > > > Subject: Re: complex javascript actions in jmeter load
>> > test
>> > > > > > > > > > >
>> > > > > > > > > > >  >> You can use webdriver from jmeter.  Create a
>> > webdriver
>> > > > > class
>> > > > > > > that
>> > > > > > > > > > > performs the requests and runs the javascript via the
>> > > > browser,
>> > > > > > then
>> > > > > > > > > > run/call
>> > > > > > > > > > > it from a BSF or JSR sampler.
>> > > > > > > > > > >
>> > > > > > > > > > > Just to clarify, I take it that's only worthwhile to do
>> > (in
>> > > > > terms
>> > > > > > > of
>> > > > > > > > > > > scalability) when using PhantomJSDriver or HtmlUnitDriver
>> > > or
>> > > > > > > > > > FirefoxDriver
>> > > > > > > > > > > (on Linux with xvfb) with JMeter this way?
>> > > > > > > > > > >
>> > > > > > > > > >
>> > > > > > > > > > "Worthwhile" depends on assumptions.
>> > > > > > > > > >
>> > > > > > > > > > > Because otherwise, the browser GUI is the scalability
>> > > > limiting
>> > > > > > > factor
>> > > > > > > > > > even
>> > > > > > > > > > > with JMeter and Grid deployment, and in that case, no
>> > > > > difference
>> > > > > > in
>> > > > > > > > > using
>> > > > > > > > > > > WebDriver outside JMeter to do performance tests except
>> > if
>> > > > one
>> > > > > > > wants
>> > > > > > > > > the
>> > > > > > > > > > > JMeter logging/reporting facilities to help performance
>> > > test,
>> > > > > > > because
>> > > > > > > > > > there's
>> > > > > > > > > > > no or minimal scalabiity gain.
>> > > > > > > > > > >
>> > > > > > > > > >
>> > > > > > > > > > Seems the poster is more at the capability/viability stage
>> > of
>> > > > > > > > developing
>> > > > > > > > > > tests?  We would need much more information to start
>> > advising
>> > > > on
>> > > > > > the
>> > > > > > > > > entire
>> > > > > > > > > > load testing process, start to finish, and what challenges
>> > > may
>> > > > > face
>> > > > > > > the
>> > > > > > > > > > poster along the way.
>> > > > > > > > > >
>> > > > > > > > > >
>> > > > > > > > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <
>> > > > > CStott@tnsi.com>
>> > > > > > > > > wrote:
>> > > > > > > > > > >
>> > > > > > > > > > > > You can use webdriver from jmeter.  Create a webdriver
>> > > > class
>> > > > > > that
>> > > > > > > > > > > > performs the requests and runs the javascript via the
>> > > > > browser,
>> > > > > > > then
>> > > > > > > > > > > > run/call it from a BSF or JSR sampler.
>> > > > > > > > > > > >
>> > > > > > > > > > > >
>> > > > > > > > > > > > > -----Original Message-----
>> > > > > > > > > > > > > From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
>> > > > > > > > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
>> > > > > > > > > > > > > To: JMeter Users List
>> > > > > > > > > > > > > Subject: Re: complex javascript actions in jmeter
>> > load
>> > > > test
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > The problem is Selenium has no performance testing
>> > > > harness.
>> > > > > > > > > > > > > Sucks that it seems BrowserMob (paid solution) is the
>> > > > only
>> > > > > > > solid
>> > > > > > > > > > option.
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > Until someone builds something with Phantom.js, but
>> > it
>> > > > > seems
>> > > > > > > > JMeter
>> > > > > > > > > > > > > isn't going to cut it here.
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <
>> > > > > > mangaroo@gmail.com>
>> > > > > > > > > > wrote:
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > > You'll need to figure out what the complex
>> > javascript
>> > > > > does.
>> > > > > > > > Does
>> > > > > > > > > > > > > > it make any AJAX requests, or is it all local
>> > client
>> > > > side
>> > > > > > > > > > > > processing/rendering?
>> > > > > > > > > > > > > >
>> > > > > > > > > > > > > > If it's all local, then there's no point testing it
>> > > > with
>> > > > > > > > JMeter,
>> > > > > > > > > > > > > > that's client side browser testing better done with
>> > > > > > Selenium.
>> > > > > > > > It
>> > > > > > > > > > > > > > won't impact the server side load test (except
>> > delay
>> > > in
>> > > > > > > server
>> > > > > > > > > > > > > > response time for fetching files will impact the
>> > > > > javascript
>> > > > > > > > > > > > > > execution on client side, but that can be
>> > compensated
>> > > > w/
>> > > > > > > JMeter
>> > > > > > > > > > > > > > load test against server with 1+ Selenium test
>> > > running
>> > > > at
>> > > > > > > same
>> > > > > > > > > > > > > > time to gauge client side performance of site/app
>> > in
>> > > > > > > browser).
>> > > > > > > > > > > > > >
>> > > > > > > > > > > > > > If the javascript does execute AJAX requests, you
>> > > need
>> > > > to
>> > > > > > > > figure
>> > > > > > > > > > > > > > out the HTTP requests made and mimic that in JMeter
>> > > as
>> > > > > part
>> > > > > > > of
>> > > > > > > > > your
>> > > > > > > > > > > test.
>> > > > > > > > > > > > > > You can get that reading dev/design docs, or
>> > reverse
>> > > > > > > > > > > > > > engineer/traffic sniffing the app while doing
>> > manual
>> > > > > > testing.
>> > > > > > > > > > > > > >
>> > > > > > > > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
>> > > > > > > > > > > > > > <zippyzeppoli@gmail.com
>> > > > > > > > > > > > > > >wrote:
>> > > > > > > > > > > > > >
>> > > > > > > > > > > > > > > Hello,
>> > > > > > > > > > > > > > > If I have a website which requires logging in,
>> > and
>> > > > > > > executing
>> > > > > > > > > > > > > > > complex javascript actions, how would I do this
>> > (if
>> > > > at
>> > > > > > all)
>> > > > > > > > in
>> > > > > > > > > > jmeter?
>> > > > > > > > > > > > > > >
>> > > > > > > > > > > > > > > I've heard of writing groovy scripts to do this
>> > but
>> > > > > this
>> > > > > > > > sounds
>> > > > > > > > > > > > > > > like a
>> > > > > > > > > > > > > > lot
>> > > > > > > > > > > > > > > of work / maintenance.
>> > > > > > > > > > > > > > >
>> > > > > > > > > > > > > > > Thank you.
>> > > > > > > > > > > > > > >
>> > > > > > > > > > > > > >
>> > > > > > > > > > > >
>> > > > > > > > > > > >
>> > > > > > > >
>> > > > ---------------------------------------------------------------------
>> > > > > > > > > > > > To unsubscribe, e-mail:
>> > > user-unsubscribe@jmeter.apache.org
>> > > > > > > > > > > > For additional commands, e-mail:
>> > > > user-help@jmeter.apache.org
>> > > > > > > > > > > >
>> > > > > > > > > > > >
>> > > > > > > > > >
>> > > > > > > > > >
>> > > > > >
>> > ---------------------------------------------------------------------
>> > > > > > > > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> > > > > > > > > > For additional commands, e-mail:
>> > user-help@jmeter.apache.org
>> > > > > > > > > >
>> > > > > > > > > >
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>
>

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


Re: complex javascript actions in jmeter load test

Posted by Zippy Zeppoli <zi...@gmail.com>.
I think you may be  missing the point.
Real load cannot be tested via HTTP interactions.
There is no DOM rendering happening.
I can make HTTP requests all day and it won't reflect the true response
time unless it's done through a browser.

Recording a script in Jmeter proxy is trivial. Simulating *real* user load
is not it requires a browser and interactions with a web application.

On Tue, Feb 5, 2013 at 6:51 PM, Deepak Shetty <sh...@gmail.com> wrote:

> >Actually that does matter it cannot do JavaScript. If a request requires
> >you need to be able to click a JavaScript button then the request will
> >never happen.
> The point is that what happens when the button is clicked? Assuming its a
> server - ajax call then A HTTP call is made and some parameters are passed
> and some values are returned. Thats whats important for the load test , not
> the fact that javascript was executed.
> So when you record the script , you will be the person clicking the
> button(you are recording your actions) , JMeter will record every
> interaction that makes a call to the server and will record this as a
> separate HTTP request and when you run the script the same request will be
> made as if someone clicked the button!
>
> You dont need to use the recorder either , you can modify the script
> yourself.
>
> If the javascript didnt actually make any server side call - then it doesnt
> matter because you dont want to load test this anyway.
>
> Have you actually tried this? It sounds as if you have a problem recording
> your script and you probably have concluded that JMeter doesnt do
> javascript (true) and hence cant test websites that do javascript/ajax
> (false)
>
> >Real browser is needed
> Not for a good deal of use cases - as many of the people on this mailing
> list can attest too.
>
>
>
>
>
> On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> >wrote:
>
> > Deepak,
> > Actually that does matter it cannot do JavaScript. If a request requires
> > you need to be able to click a JavaScript button then the request will
> > never happen. No request will ever be made.  Also testing true web
> > performance requires rendering the DOM, not just initiating HTTP requests
> > and recording the response time, rps, etc.
> >
> > Real browser is needed, with JavaScript, and Jmeter doesn't integrate
> well
> > with this, it isn't designed for this, which is understandable. The
> problem
> > is there is a gap between real browser testing (owned by third party
> > companies) and open source tools (Jmeter). There's nothing in between for
> > real-browser based performance testing. I could go into why, but its off
> > topic of this list, and I'd rather spare everyone the gas.
> >
> > Point being, Jmeter cannot solve my problem, without some serious
> > customization.
> >
> >
> >
> > On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <sh...@gmail.com> wrote:
> >
> > > Hi
> > > You are getting too caught up in the JMeter doesnt do javascript thing.
> > In
> > > most cases it doesnt matter.
> > > You have a webserver that is receiving HTTP requests - whether those
> > > requests are generated via the user clicking a link or via AJAX or via
> > > flash is hardly relevant to the webserver. It sees HTTP requests and
> > sends
> > > HTTP responses.
> > > JMeter deals with HTTP request and responses. As long as you can make
> the
> > > same request that your javascript is making (which you can see via the
> > > recording feature) , you can test it with Jmeter. The fact that the
> proxy
> > > cant record javascript is irrelevant - it only needs to record the
> > > requests. If your javascript is responsible for generating the requests
> > in
> > > some way , then you have to replicate that within JMeter.
> > >
> > > Some caveats here are
> > > a. Your toolkit should be good when you need to parameterise(JQuery is
> > > great , GWT sucks)
> > > b. If you need to perform some AJAX requests in parallel then JMeter
> isnt
> > > quite there yet.
> > >
> > > Its probably true that it is easier writing scripts for Selenium like
> > tools
> > > - but they also need more resources as well as given how often a UI
> > changes
> > > as opposed to the HTTP request/response pair , sometimes JMeter scripts
> > are
> > > more resilient to change.
> > >
> > > regards
> > > deepak
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Tue, Feb 5, 2013 at 5:29 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > > >wrote:
> > >
> > > > Proxy won't work for clicking on JavaScript.
> > > > Selenium will, however, Selenium isn't designed for performance
> > testing,
> > > > with the exception of BrowserMob, who has perfected it.
> > > >
> > > > If JMeter had some kind of (good) Selenium integration then it might
> be
> > > > able to achieve it.
> > > >
> > > > I think JMeter is a good tool, but it's not built for this kind of
> > work.
> > > >
> > > > On Tue, Feb 5, 2013 at 5:20 PM, David Luu <ma...@gmail.com>
> wrote:
> > > >
> > > > > I'm not familiar with the full feature set of BrowserMob, but
> JMeter
> > > can
> > > > do
> > > > > what you want, easy or hard, depending on your needs.
> > > > >
> > > > > If all you need is simple record & playback, JMeter proxy is best
> > > option.
> > > > > Just record w/ proxy, it generates a basic test plan that you can
> > save
> > > to
> > > > > file and run w/ X threads to generate load, etc.
> > > > >
> > > > > But that approach will always use the same user, same data in the
> > AJAX
> > > > > calls during load generation.
> > > > >
> > > > > If you need them to be unique & parameterized, that's where it
> takes
> > > some
> > > > > work to go in and cleanup the proxy recording w/ paramaterized
> data,
> > > > > response checking (if more than just checking HTTP 200 OKs). And
> > you'll
> > > > > find proxy recording generates a lot of unnecessary HTTP requests
> for
> > > > HTML,
> > > > > CSS, image files that aren't necessary of interest as you're
> testing
> > > the
> > > > > AJAX calls, which is where you filter out only the requests of
> > interest
> > > > and
> > > > > only use those in test plan, etc.
> > > > >
> > > > > I believe this kind of work is needed regardless of what tool you
> > use,
> > > > some
> > > > > tools just make it easier, but there's still work to do. Not just a
> > one
> > > > > touch button approach unless all you need is simple record &
> > playback.
> > > > >
> > > > > On Tue, Feb 5, 2013 at 5:08 PM, Zippy Zeppoli <
> > zippyzeppoli@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > Will probably just buy BrowserMob.
> > > > > > Too bad there isn't an open source framework to already do this.
> > > > > >
> > > > > > Building this is a yak shave, and I need to be testing, not
> > building
> > > a
> > > > > test
> > > > > > harness thats probably going to break on the next release.
> > > > > >
> > > > > > On Tue, Feb 5, 2013 at 3:40 PM, David Luu <ma...@gmail.com>
> > > wrote:
> > > > > >
> > > > > > > JMeter proxy is the most integrated approach, but I find it
> gives
> > > > "too
> > > > > > much
> > > > > > > information", so I tend to use external tools like browser
> > traffic
> > > > > > sniffers
> > > > > > > (HttpFox, livehttpheaders, ieHttpHeaders) to see what HTTP
> > requests
> > > > are
> > > > > > > made for AJAX calls for just the requests & responses I'm
> > > interested
> > > > > in,
> > > > > > > easier to manage. But that's just my opinion, others might find
> > the
> > > > > > JMeter
> > > > > > > proxy easier to use.
> > > > > > >
> > > > > > > Whatever approach you take, you just need to know what HTTP
> > > requests
> > > > > are
> > > > > > > made by the AJAX calls to replicate in JMeter, and parameterize
> > > those
> > > > > > > requests to take in dynamic/test data as needed, assert
> > appropriate
> > > > > > > response data, etc. In this case, WebDriver can be dropped from
> > the
> > > > > > > equation, just gives more overhead and lowers scalability in
> load
> > > > > > > generation.
> > > > > > >
> > > > > > > On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
> > > > > > > p.mouawad@ubik-ingenierie.com> wrote:
> > > > > > >
> > > > > > > > AjaxCall will emit a network call which JMeter will capture.
> > > > > > > >
> > > > > > > > Use JMeter Server Proxy and you should have the Ajax Calls
> > > > recorded.
> > > > > > > >
> > > > > > > > Regards
> > > > > > > > Philippe M.
> > > > > > > >
> > > > > > > > Follow me on twitter <https://twitter.com/philmdot>
> > > > > > > >
> > > > > > > > UBIK-INGENIERIE on TWITTER <
> https://twitter.com/ubikingenierie
> > >
> > > > > > > >
> > > > > > > > UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/>
> > > > > > > >
> > > > > > > > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <
> > > > > zippyzeppoli@gmail.com
> > > > > > > > >wrote:
> > > > > > > >
> > > > > > > > > To clarify:
> > > > > > > > > An example would be:
> > > > > > > > > 1) log in via a form post
> > > > > > > > > 2) look at orders in an ecommerce interface (AJAX call)
> > > > > > > > > 3) click on result to view order detail (AJAX)
> > > > > > > > >
> > > > > > > > > Pretty much a standard ecommerce transaction, but the
> > interface
> > > > is
> > > > > > all
> > > > > > > > > javascript.
> > > > > > > > >
> > > > > > > > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <
> > > CStott@tnsi.com>
> > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > From: David Luu [mailto:mangaroo@gmail.com]
> > > > > > > > > > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > Subject: Re: complex javascript actions in jmeter load
> > test
> > > > > > > > > > >
> > > > > > > > > > >  >> You can use webdriver from jmeter.  Create a
> > webdriver
> > > > > class
> > > > > > > that
> > > > > > > > > > > performs the requests and runs the javascript via the
> > > > browser,
> > > > > > then
> > > > > > > > > > run/call
> > > > > > > > > > > it from a BSF or JSR sampler.
> > > > > > > > > > >
> > > > > > > > > > > Just to clarify, I take it that's only worthwhile to do
> > (in
> > > > > terms
> > > > > > > of
> > > > > > > > > > > scalability) when using PhantomJSDriver or
> HtmlUnitDriver
> > > or
> > > > > > > > > > FirefoxDriver
> > > > > > > > > > > (on Linux with xvfb) with JMeter this way?
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > "Worthwhile" depends on assumptions.
> > > > > > > > > >
> > > > > > > > > > > Because otherwise, the browser GUI is the scalability
> > > > limiting
> > > > > > > factor
> > > > > > > > > > even
> > > > > > > > > > > with JMeter and Grid deployment, and in that case, no
> > > > > difference
> > > > > > in
> > > > > > > > > using
> > > > > > > > > > > WebDriver outside JMeter to do performance tests except
> > if
> > > > one
> > > > > > > wants
> > > > > > > > > the
> > > > > > > > > > > JMeter logging/reporting facilities to help performance
> > > test,
> > > > > > > because
> > > > > > > > > > there's
> > > > > > > > > > > no or minimal scalabiity gain.
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Seems the poster is more at the capability/viability
> stage
> > of
> > > > > > > > developing
> > > > > > > > > > tests?  We would need much more information to start
> > advising
> > > > on
> > > > > > the
> > > > > > > > > entire
> > > > > > > > > > load testing process, start to finish, and what
> challenges
> > > may
> > > > > face
> > > > > > > the
> > > > > > > > > > poster along the way.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <
> > > > > CStott@tnsi.com>
> > > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > > You can use webdriver from jmeter.  Create a
> webdriver
> > > > class
> > > > > > that
> > > > > > > > > > > > performs the requests and runs the javascript via the
> > > > > browser,
> > > > > > > then
> > > > > > > > > > > > run/call it from a BSF or JSR sampler.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > > From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com
> ]
> > > > > > > > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > > > Subject: Re: complex javascript actions in jmeter
> > load
> > > > test
> > > > > > > > > > > > >
> > > > > > > > > > > > > The problem is Selenium has no performance testing
> > > > harness.
> > > > > > > > > > > > > Sucks that it seems BrowserMob (paid solution) is
> the
> > > > only
> > > > > > > solid
> > > > > > > > > > option.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Until someone builds something with Phantom.js, but
> > it
> > > > > seems
> > > > > > > > JMeter
> > > > > > > > > > > > > isn't going to cut it here.
> > > > > > > > > > > > >
> > > > > > > > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <
> > > > > > mangaroo@gmail.com>
> > > > > > > > > > wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > > You'll need to figure out what the complex
> > javascript
> > > > > does.
> > > > > > > > Does
> > > > > > > > > > > > > > it make any AJAX requests, or is it all local
> > client
> > > > side
> > > > > > > > > > > > processing/rendering?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > If it's all local, then there's no point testing
> it
> > > > with
> > > > > > > > JMeter,
> > > > > > > > > > > > > > that's client side browser testing better done
> with
> > > > > > Selenium.
> > > > > > > > It
> > > > > > > > > > > > > > won't impact the server side load test (except
> > delay
> > > in
> > > > > > > server
> > > > > > > > > > > > > > response time for fetching files will impact the
> > > > > javascript
> > > > > > > > > > > > > > execution on client side, but that can be
> > compensated
> > > > w/
> > > > > > > JMeter
> > > > > > > > > > > > > > load test against server with 1+ Selenium test
> > > running
> > > > at
> > > > > > > same
> > > > > > > > > > > > > > time to gauge client side performance of site/app
> > in
> > > > > > > browser).
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > If the javascript does execute AJAX requests, you
> > > need
> > > > to
> > > > > > > > figure
> > > > > > > > > > > > > > out the HTTP requests made and mimic that in
> JMeter
> > > as
> > > > > part
> > > > > > > of
> > > > > > > > > your
> > > > > > > > > > > test.
> > > > > > > > > > > > > > You can get that reading dev/design docs, or
> > reverse
> > > > > > > > > > > > > > engineer/traffic sniffing the app while doing
> > manual
> > > > > > testing.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > > > > > > > > > > > <zippyzeppoli@gmail.com
> > > > > > > > > > > > > > >wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > > > If I have a website which requires logging in,
> > and
> > > > > > > executing
> > > > > > > > > > > > > > > complex javascript actions, how would I do this
> > (if
> > > > at
> > > > > > all)
> > > > > > > > in
> > > > > > > > > > jmeter?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > I've heard of writing groovy scripts to do this
> > but
> > > > > this
> > > > > > > > sounds
> > > > > > > > > > > > > > > like a
> > > > > > > > > > > > > > lot
> > > > > > > > > > > > > > > of work / maintenance.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Thank you.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > > > > > To unsubscribe, e-mail:
> > > user-unsubscribe@jmeter.apache.org
> > > > > > > > > > > > For additional commands, e-mail:
> > > > user-help@jmeter.apache.org
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> user-unsubscribe@jmeter.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > user-help@jmeter.apache.org
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: complex javascript actions in jmeter load test

Posted by Deepak Shetty <sh...@gmail.com>.
>Actually that does matter it cannot do JavaScript. If a request requires
>you need to be able to click a JavaScript button then the request will
>never happen.
The point is that what happens when the button is clicked? Assuming its a
server - ajax call then A HTTP call is made and some parameters are passed
and some values are returned. Thats whats important for the load test , not
the fact that javascript was executed.
So when you record the script , you will be the person clicking the
button(you are recording your actions) , JMeter will record every
interaction that makes a call to the server and will record this as a
separate HTTP request and when you run the script the same request will be
made as if someone clicked the button!

You dont need to use the recorder either , you can modify the script
yourself.

If the javascript didnt actually make any server side call - then it doesnt
matter because you dont want to load test this anyway.

Have you actually tried this? It sounds as if you have a problem recording
your script and you probably have concluded that JMeter doesnt do
javascript (true) and hence cant test websites that do javascript/ajax
(false)

>Real browser is needed
Not for a good deal of use cases - as many of the people on this mailing
list can attest too.





On Tue, Feb 5, 2013 at 6:44 PM, Zippy Zeppoli <zi...@gmail.com>wrote:

> Deepak,
> Actually that does matter it cannot do JavaScript. If a request requires
> you need to be able to click a JavaScript button then the request will
> never happen. No request will ever be made.  Also testing true web
> performance requires rendering the DOM, not just initiating HTTP requests
> and recording the response time, rps, etc.
>
> Real browser is needed, with JavaScript, and Jmeter doesn't integrate well
> with this, it isn't designed for this, which is understandable. The problem
> is there is a gap between real browser testing (owned by third party
> companies) and open source tools (Jmeter). There's nothing in between for
> real-browser based performance testing. I could go into why, but its off
> topic of this list, and I'd rather spare everyone the gas.
>
> Point being, Jmeter cannot solve my problem, without some serious
> customization.
>
>
>
> On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <sh...@gmail.com> wrote:
>
> > Hi
> > You are getting too caught up in the JMeter doesnt do javascript thing.
> In
> > most cases it doesnt matter.
> > You have a webserver that is receiving HTTP requests - whether those
> > requests are generated via the user clicking a link or via AJAX or via
> > flash is hardly relevant to the webserver. It sees HTTP requests and
> sends
> > HTTP responses.
> > JMeter deals with HTTP request and responses. As long as you can make the
> > same request that your javascript is making (which you can see via the
> > recording feature) , you can test it with Jmeter. The fact that the proxy
> > cant record javascript is irrelevant - it only needs to record the
> > requests. If your javascript is responsible for generating the requests
> in
> > some way , then you have to replicate that within JMeter.
> >
> > Some caveats here are
> > a. Your toolkit should be good when you need to parameterise(JQuery is
> > great , GWT sucks)
> > b. If you need to perform some AJAX requests in parallel then JMeter isnt
> > quite there yet.
> >
> > Its probably true that it is easier writing scripts for Selenium like
> tools
> > - but they also need more resources as well as given how often a UI
> changes
> > as opposed to the HTTP request/response pair , sometimes JMeter scripts
> are
> > more resilient to change.
> >
> > regards
> > deepak
> >
> >
> >
> >
> >
> >
> >
> >
> > On Tue, Feb 5, 2013 at 5:29 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > >wrote:
> >
> > > Proxy won't work for clicking on JavaScript.
> > > Selenium will, however, Selenium isn't designed for performance
> testing,
> > > with the exception of BrowserMob, who has perfected it.
> > >
> > > If JMeter had some kind of (good) Selenium integration then it might be
> > > able to achieve it.
> > >
> > > I think JMeter is a good tool, but it's not built for this kind of
> work.
> > >
> > > On Tue, Feb 5, 2013 at 5:20 PM, David Luu <ma...@gmail.com> wrote:
> > >
> > > > I'm not familiar with the full feature set of BrowserMob, but JMeter
> > can
> > > do
> > > > what you want, easy or hard, depending on your needs.
> > > >
> > > > If all you need is simple record & playback, JMeter proxy is best
> > option.
> > > > Just record w/ proxy, it generates a basic test plan that you can
> save
> > to
> > > > file and run w/ X threads to generate load, etc.
> > > >
> > > > But that approach will always use the same user, same data in the
> AJAX
> > > > calls during load generation.
> > > >
> > > > If you need them to be unique & parameterized, that's where it takes
> > some
> > > > work to go in and cleanup the proxy recording w/ paramaterized data,
> > > > response checking (if more than just checking HTTP 200 OKs). And
> you'll
> > > > find proxy recording generates a lot of unnecessary HTTP requests for
> > > HTML,
> > > > CSS, image files that aren't necessary of interest as you're testing
> > the
> > > > AJAX calls, which is where you filter out only the requests of
> interest
> > > and
> > > > only use those in test plan, etc.
> > > >
> > > > I believe this kind of work is needed regardless of what tool you
> use,
> > > some
> > > > tools just make it easier, but there's still work to do. Not just a
> one
> > > > touch button approach unless all you need is simple record &
> playback.
> > > >
> > > > On Tue, Feb 5, 2013 at 5:08 PM, Zippy Zeppoli <
> zippyzeppoli@gmail.com
> > > > >wrote:
> > > >
> > > > > Will probably just buy BrowserMob.
> > > > > Too bad there isn't an open source framework to already do this.
> > > > >
> > > > > Building this is a yak shave, and I need to be testing, not
> building
> > a
> > > > test
> > > > > harness thats probably going to break on the next release.
> > > > >
> > > > > On Tue, Feb 5, 2013 at 3:40 PM, David Luu <ma...@gmail.com>
> > wrote:
> > > > >
> > > > > > JMeter proxy is the most integrated approach, but I find it gives
> > > "too
> > > > > much
> > > > > > information", so I tend to use external tools like browser
> traffic
> > > > > sniffers
> > > > > > (HttpFox, livehttpheaders, ieHttpHeaders) to see what HTTP
> requests
> > > are
> > > > > > made for AJAX calls for just the requests & responses I'm
> > interested
> > > > in,
> > > > > > easier to manage. But that's just my opinion, others might find
> the
> > > > > JMeter
> > > > > > proxy easier to use.
> > > > > >
> > > > > > Whatever approach you take, you just need to know what HTTP
> > requests
> > > > are
> > > > > > made by the AJAX calls to replicate in JMeter, and parameterize
> > those
> > > > > > requests to take in dynamic/test data as needed, assert
> appropriate
> > > > > > response data, etc. In this case, WebDriver can be dropped from
> the
> > > > > > equation, just gives more overhead and lowers scalability in load
> > > > > > generation.
> > > > > >
> > > > > > On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
> > > > > > p.mouawad@ubik-ingenierie.com> wrote:
> > > > > >
> > > > > > > AjaxCall will emit a network call which JMeter will capture.
> > > > > > >
> > > > > > > Use JMeter Server Proxy and you should have the Ajax Calls
> > > recorded.
> > > > > > >
> > > > > > > Regards
> > > > > > > Philippe M.
> > > > > > >
> > > > > > > Follow me on twitter <https://twitter.com/philmdot>
> > > > > > >
> > > > > > > UBIK-INGENIERIE on TWITTER <https://twitter.com/ubikingenierie
> >
> > > > > > >
> > > > > > > UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/>
> > > > > > >
> > > > > > > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <
> > > > zippyzeppoli@gmail.com
> > > > > > > >wrote:
> > > > > > >
> > > > > > > > To clarify:
> > > > > > > > An example would be:
> > > > > > > > 1) log in via a form post
> > > > > > > > 2) look at orders in an ecommerce interface (AJAX call)
> > > > > > > > 3) click on result to view order detail (AJAX)
> > > > > > > >
> > > > > > > > Pretty much a standard ecommerce transaction, but the
> interface
> > > is
> > > > > all
> > > > > > > > javascript.
> > > > > > > >
> > > > > > > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <
> > CStott@tnsi.com>
> > > > > > wrote:
> > > > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: David Luu [mailto:mangaroo@gmail.com]
> > > > > > > > > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > > > > > > > > To: JMeter Users List
> > > > > > > > > > Subject: Re: complex javascript actions in jmeter load
> test
> > > > > > > > > >
> > > > > > > > > >  >> You can use webdriver from jmeter.  Create a
> webdriver
> > > > class
> > > > > > that
> > > > > > > > > > performs the requests and runs the javascript via the
> > > browser,
> > > > > then
> > > > > > > > > run/call
> > > > > > > > > > it from a BSF or JSR sampler.
> > > > > > > > > >
> > > > > > > > > > Just to clarify, I take it that's only worthwhile to do
> (in
> > > > terms
> > > > > > of
> > > > > > > > > > scalability) when using PhantomJSDriver or HtmlUnitDriver
> > or
> > > > > > > > > FirefoxDriver
> > > > > > > > > > (on Linux with xvfb) with JMeter this way?
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > "Worthwhile" depends on assumptions.
> > > > > > > > >
> > > > > > > > > > Because otherwise, the browser GUI is the scalability
> > > limiting
> > > > > > factor
> > > > > > > > > even
> > > > > > > > > > with JMeter and Grid deployment, and in that case, no
> > > > difference
> > > > > in
> > > > > > > > using
> > > > > > > > > > WebDriver outside JMeter to do performance tests except
> if
> > > one
> > > > > > wants
> > > > > > > > the
> > > > > > > > > > JMeter logging/reporting facilities to help performance
> > test,
> > > > > > because
> > > > > > > > > there's
> > > > > > > > > > no or minimal scalabiity gain.
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > Seems the poster is more at the capability/viability stage
> of
> > > > > > > developing
> > > > > > > > > tests?  We would need much more information to start
> advising
> > > on
> > > > > the
> > > > > > > > entire
> > > > > > > > > load testing process, start to finish, and what challenges
> > may
> > > > face
> > > > > > the
> > > > > > > > > poster along the way.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <
> > > > CStott@tnsi.com>
> > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > You can use webdriver from jmeter.  Create a webdriver
> > > class
> > > > > that
> > > > > > > > > > > performs the requests and runs the javascript via the
> > > > browser,
> > > > > > then
> > > > > > > > > > > run/call it from a BSF or JSR sampler.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
> > > > > > > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > > Subject: Re: complex javascript actions in jmeter
> load
> > > test
> > > > > > > > > > > >
> > > > > > > > > > > > The problem is Selenium has no performance testing
> > > harness.
> > > > > > > > > > > > Sucks that it seems BrowserMob (paid solution) is the
> > > only
> > > > > > solid
> > > > > > > > > option.
> > > > > > > > > > > >
> > > > > > > > > > > > Until someone builds something with Phantom.js, but
> it
> > > > seems
> > > > > > > JMeter
> > > > > > > > > > > > isn't going to cut it here.
> > > > > > > > > > > >
> > > > > > > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <
> > > > > mangaroo@gmail.com>
> > > > > > > > > wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > You'll need to figure out what the complex
> javascript
> > > > does.
> > > > > > > Does
> > > > > > > > > > > > > it make any AJAX requests, or is it all local
> client
> > > side
> > > > > > > > > > > processing/rendering?
> > > > > > > > > > > > >
> > > > > > > > > > > > > If it's all local, then there's no point testing it
> > > with
> > > > > > > JMeter,
> > > > > > > > > > > > > that's client side browser testing better done with
> > > > > Selenium.
> > > > > > > It
> > > > > > > > > > > > > won't impact the server side load test (except
> delay
> > in
> > > > > > server
> > > > > > > > > > > > > response time for fetching files will impact the
> > > > javascript
> > > > > > > > > > > > > execution on client side, but that can be
> compensated
> > > w/
> > > > > > JMeter
> > > > > > > > > > > > > load test against server with 1+ Selenium test
> > running
> > > at
> > > > > > same
> > > > > > > > > > > > > time to gauge client side performance of site/app
> in
> > > > > > browser).
> > > > > > > > > > > > >
> > > > > > > > > > > > > If the javascript does execute AJAX requests, you
> > need
> > > to
> > > > > > > figure
> > > > > > > > > > > > > out the HTTP requests made and mimic that in JMeter
> > as
> > > > part
> > > > > > of
> > > > > > > > your
> > > > > > > > > > test.
> > > > > > > > > > > > > You can get that reading dev/design docs, or
> reverse
> > > > > > > > > > > > > engineer/traffic sniffing the app while doing
> manual
> > > > > testing.
> > > > > > > > > > > > >
> > > > > > > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > > > > > > > > > > <zippyzeppoli@gmail.com
> > > > > > > > > > > > > >wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > > If I have a website which requires logging in,
> and
> > > > > > executing
> > > > > > > > > > > > > > complex javascript actions, how would I do this
> (if
> > > at
> > > > > all)
> > > > > > > in
> > > > > > > > > jmeter?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I've heard of writing groovy scripts to do this
> but
> > > > this
> > > > > > > sounds
> > > > > > > > > > > > > > like a
> > > > > > > > > > > > > lot
> > > > > > > > > > > > > > of work / maintenance.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Thank you.
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > > > To unsubscribe, e-mail:
> > user-unsubscribe@jmeter.apache.org
> > > > > > > > > > > For additional commands, e-mail:
> > > user-help@jmeter.apache.org
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > > > > > > For additional commands, e-mail:
> user-help@jmeter.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: complex javascript actions in jmeter load test

Posted by Zippy Zeppoli <zi...@gmail.com>.
Deepak,
Actually that does matter it cannot do JavaScript. If a request requires
you need to be able to click a JavaScript button then the request will
never happen. No request will ever be made.  Also testing true web
performance requires rendering the DOM, not just initiating HTTP requests
and recording the response time, rps, etc.

Real browser is needed, with JavaScript, and Jmeter doesn't integrate well
with this, it isn't designed for this, which is understandable. The problem
is there is a gap between real browser testing (owned by third party
companies) and open source tools (Jmeter). There's nothing in between for
real-browser based performance testing. I could go into why, but its off
topic of this list, and I'd rather spare everyone the gas.

Point being, Jmeter cannot solve my problem, without some serious
customization.



On Tue, Feb 5, 2013 at 6:33 PM, Deepak Shetty <sh...@gmail.com> wrote:

> Hi
> You are getting too caught up in the JMeter doesnt do javascript thing. In
> most cases it doesnt matter.
> You have a webserver that is receiving HTTP requests - whether those
> requests are generated via the user clicking a link or via AJAX or via
> flash is hardly relevant to the webserver. It sees HTTP requests and sends
> HTTP responses.
> JMeter deals with HTTP request and responses. As long as you can make the
> same request that your javascript is making (which you can see via the
> recording feature) , you can test it with Jmeter. The fact that the proxy
> cant record javascript is irrelevant - it only needs to record the
> requests. If your javascript is responsible for generating the requests in
> some way , then you have to replicate that within JMeter.
>
> Some caveats here are
> a. Your toolkit should be good when you need to parameterise(JQuery is
> great , GWT sucks)
> b. If you need to perform some AJAX requests in parallel then JMeter isnt
> quite there yet.
>
> Its probably true that it is easier writing scripts for Selenium like tools
> - but they also need more resources as well as given how often a UI changes
> as opposed to the HTTP request/response pair , sometimes JMeter scripts are
> more resilient to change.
>
> regards
> deepak
>
>
>
>
>
>
>
>
> On Tue, Feb 5, 2013 at 5:29 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> >wrote:
>
> > Proxy won't work for clicking on JavaScript.
> > Selenium will, however, Selenium isn't designed for performance testing,
> > with the exception of BrowserMob, who has perfected it.
> >
> > If JMeter had some kind of (good) Selenium integration then it might be
> > able to achieve it.
> >
> > I think JMeter is a good tool, but it's not built for this kind of work.
> >
> > On Tue, Feb 5, 2013 at 5:20 PM, David Luu <ma...@gmail.com> wrote:
> >
> > > I'm not familiar with the full feature set of BrowserMob, but JMeter
> can
> > do
> > > what you want, easy or hard, depending on your needs.
> > >
> > > If all you need is simple record & playback, JMeter proxy is best
> option.
> > > Just record w/ proxy, it generates a basic test plan that you can save
> to
> > > file and run w/ X threads to generate load, etc.
> > >
> > > But that approach will always use the same user, same data in the AJAX
> > > calls during load generation.
> > >
> > > If you need them to be unique & parameterized, that's where it takes
> some
> > > work to go in and cleanup the proxy recording w/ paramaterized data,
> > > response checking (if more than just checking HTTP 200 OKs). And you'll
> > > find proxy recording generates a lot of unnecessary HTTP requests for
> > HTML,
> > > CSS, image files that aren't necessary of interest as you're testing
> the
> > > AJAX calls, which is where you filter out only the requests of interest
> > and
> > > only use those in test plan, etc.
> > >
> > > I believe this kind of work is needed regardless of what tool you use,
> > some
> > > tools just make it easier, but there's still work to do. Not just a one
> > > touch button approach unless all you need is simple record & playback.
> > >
> > > On Tue, Feb 5, 2013 at 5:08 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > > >wrote:
> > >
> > > > Will probably just buy BrowserMob.
> > > > Too bad there isn't an open source framework to already do this.
> > > >
> > > > Building this is a yak shave, and I need to be testing, not building
> a
> > > test
> > > > harness thats probably going to break on the next release.
> > > >
> > > > On Tue, Feb 5, 2013 at 3:40 PM, David Luu <ma...@gmail.com>
> wrote:
> > > >
> > > > > JMeter proxy is the most integrated approach, but I find it gives
> > "too
> > > > much
> > > > > information", so I tend to use external tools like browser traffic
> > > > sniffers
> > > > > (HttpFox, livehttpheaders, ieHttpHeaders) to see what HTTP requests
> > are
> > > > > made for AJAX calls for just the requests & responses I'm
> interested
> > > in,
> > > > > easier to manage. But that's just my opinion, others might find the
> > > > JMeter
> > > > > proxy easier to use.
> > > > >
> > > > > Whatever approach you take, you just need to know what HTTP
> requests
> > > are
> > > > > made by the AJAX calls to replicate in JMeter, and parameterize
> those
> > > > > requests to take in dynamic/test data as needed, assert appropriate
> > > > > response data, etc. In this case, WebDriver can be dropped from the
> > > > > equation, just gives more overhead and lowers scalability in load
> > > > > generation.
> > > > >
> > > > > On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
> > > > > p.mouawad@ubik-ingenierie.com> wrote:
> > > > >
> > > > > > AjaxCall will emit a network call which JMeter will capture.
> > > > > >
> > > > > > Use JMeter Server Proxy and you should have the Ajax Calls
> > recorded.
> > > > > >
> > > > > > Regards
> > > > > > Philippe M.
> > > > > >
> > > > > > Follow me on twitter <https://twitter.com/philmdot>
> > > > > >
> > > > > > UBIK-INGENIERIE on TWITTER <https://twitter.com/ubikingenierie>
> > > > > >
> > > > > > UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/>
> > > > > >
> > > > > > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <
> > > zippyzeppoli@gmail.com
> > > > > > >wrote:
> > > > > >
> > > > > > > To clarify:
> > > > > > > An example would be:
> > > > > > > 1) log in via a form post
> > > > > > > 2) look at orders in an ecommerce interface (AJAX call)
> > > > > > > 3) click on result to view order detail (AJAX)
> > > > > > >
> > > > > > > Pretty much a standard ecommerce transaction, but the interface
> > is
> > > > all
> > > > > > > javascript.
> > > > > > >
> > > > > > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <
> CStott@tnsi.com>
> > > > > wrote:
> > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: David Luu [mailto:mangaroo@gmail.com]
> > > > > > > > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > > > > > > > To: JMeter Users List
> > > > > > > > > Subject: Re: complex javascript actions in jmeter load test
> > > > > > > > >
> > > > > > > > >  >> You can use webdriver from jmeter.  Create a webdriver
> > > class
> > > > > that
> > > > > > > > > performs the requests and runs the javascript via the
> > browser,
> > > > then
> > > > > > > > run/call
> > > > > > > > > it from a BSF or JSR sampler.
> > > > > > > > >
> > > > > > > > > Just to clarify, I take it that's only worthwhile to do (in
> > > terms
> > > > > of
> > > > > > > > > scalability) when using PhantomJSDriver or HtmlUnitDriver
> or
> > > > > > > > FirefoxDriver
> > > > > > > > > (on Linux with xvfb) with JMeter this way?
> > > > > > > > >
> > > > > > > >
> > > > > > > > "Worthwhile" depends on assumptions.
> > > > > > > >
> > > > > > > > > Because otherwise, the browser GUI is the scalability
> > limiting
> > > > > factor
> > > > > > > > even
> > > > > > > > > with JMeter and Grid deployment, and in that case, no
> > > difference
> > > > in
> > > > > > > using
> > > > > > > > > WebDriver outside JMeter to do performance tests except if
> > one
> > > > > wants
> > > > > > > the
> > > > > > > > > JMeter logging/reporting facilities to help performance
> test,
> > > > > because
> > > > > > > > there's
> > > > > > > > > no or minimal scalabiity gain.
> > > > > > > > >
> > > > > > > >
> > > > > > > > Seems the poster is more at the capability/viability stage of
> > > > > > developing
> > > > > > > > tests?  We would need much more information to start advising
> > on
> > > > the
> > > > > > > entire
> > > > > > > > load testing process, start to finish, and what challenges
> may
> > > face
> > > > > the
> > > > > > > > poster along the way.
> > > > > > > >
> > > > > > > >
> > > > > > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <
> > > CStott@tnsi.com>
> > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > You can use webdriver from jmeter.  Create a webdriver
> > class
> > > > that
> > > > > > > > > > performs the requests and runs the javascript via the
> > > browser,
> > > > > then
> > > > > > > > > > run/call it from a BSF or JSR sampler.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
> > > > > > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > > > > > > > To: JMeter Users List
> > > > > > > > > > > Subject: Re: complex javascript actions in jmeter load
> > test
> > > > > > > > > > >
> > > > > > > > > > > The problem is Selenium has no performance testing
> > harness.
> > > > > > > > > > > Sucks that it seems BrowserMob (paid solution) is the
> > only
> > > > > solid
> > > > > > > > option.
> > > > > > > > > > >
> > > > > > > > > > > Until someone builds something with Phantom.js, but it
> > > seems
> > > > > > JMeter
> > > > > > > > > > > isn't going to cut it here.
> > > > > > > > > > >
> > > > > > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <
> > > > mangaroo@gmail.com>
> > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > > You'll need to figure out what the complex javascript
> > > does.
> > > > > > Does
> > > > > > > > > > > > it make any AJAX requests, or is it all local client
> > side
> > > > > > > > > > processing/rendering?
> > > > > > > > > > > >
> > > > > > > > > > > > If it's all local, then there's no point testing it
> > with
> > > > > > JMeter,
> > > > > > > > > > > > that's client side browser testing better done with
> > > > Selenium.
> > > > > > It
> > > > > > > > > > > > won't impact the server side load test (except delay
> in
> > > > > server
> > > > > > > > > > > > response time for fetching files will impact the
> > > javascript
> > > > > > > > > > > > execution on client side, but that can be compensated
> > w/
> > > > > JMeter
> > > > > > > > > > > > load test against server with 1+ Selenium test
> running
> > at
> > > > > same
> > > > > > > > > > > > time to gauge client side performance of site/app in
> > > > > browser).
> > > > > > > > > > > >
> > > > > > > > > > > > If the javascript does execute AJAX requests, you
> need
> > to
> > > > > > figure
> > > > > > > > > > > > out the HTTP requests made and mimic that in JMeter
> as
> > > part
> > > > > of
> > > > > > > your
> > > > > > > > > test.
> > > > > > > > > > > > You can get that reading dev/design docs, or reverse
> > > > > > > > > > > > engineer/traffic sniffing the app while doing manual
> > > > testing.
> > > > > > > > > > > >
> > > > > > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > > > > > > > > > <zippyzeppoli@gmail.com
> > > > > > > > > > > > >wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > If I have a website which requires logging in, and
> > > > > executing
> > > > > > > > > > > > > complex javascript actions, how would I do this (if
> > at
> > > > all)
> > > > > > in
> > > > > > > > jmeter?
> > > > > > > > > > > > >
> > > > > > > > > > > > > I've heard of writing groovy scripts to do this but
> > > this
> > > > > > sounds
> > > > > > > > > > > > > like a
> > > > > > > > > > > > lot
> > > > > > > > > > > > > of work / maintenance.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Thank you.
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> user-unsubscribe@jmeter.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > user-help@jmeter.apache.org
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > > > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: complex javascript actions in jmeter load test

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
You are getting too caught up in the JMeter doesnt do javascript thing. In
most cases it doesnt matter.
You have a webserver that is receiving HTTP requests - whether those
requests are generated via the user clicking a link or via AJAX or via
flash is hardly relevant to the webserver. It sees HTTP requests and sends
HTTP responses.
JMeter deals with HTTP request and responses. As long as you can make the
same request that your javascript is making (which you can see via the
recording feature) , you can test it with Jmeter. The fact that the proxy
cant record javascript is irrelevant - it only needs to record the
requests. If your javascript is responsible for generating the requests in
some way , then you have to replicate that within JMeter.

Some caveats here are
a. Your toolkit should be good when you need to parameterise(JQuery is
great , GWT sucks)
b. If you need to perform some AJAX requests in parallel then JMeter isnt
quite there yet.

Its probably true that it is easier writing scripts for Selenium like tools
- but they also need more resources as well as given how often a UI changes
as opposed to the HTTP request/response pair , sometimes JMeter scripts are
more resilient to change.

regards
deepak








On Tue, Feb 5, 2013 at 5:29 PM, Zippy Zeppoli <zi...@gmail.com>wrote:

> Proxy won't work for clicking on JavaScript.
> Selenium will, however, Selenium isn't designed for performance testing,
> with the exception of BrowserMob, who has perfected it.
>
> If JMeter had some kind of (good) Selenium integration then it might be
> able to achieve it.
>
> I think JMeter is a good tool, but it's not built for this kind of work.
>
> On Tue, Feb 5, 2013 at 5:20 PM, David Luu <ma...@gmail.com> wrote:
>
> > I'm not familiar with the full feature set of BrowserMob, but JMeter can
> do
> > what you want, easy or hard, depending on your needs.
> >
> > If all you need is simple record & playback, JMeter proxy is best option.
> > Just record w/ proxy, it generates a basic test plan that you can save to
> > file and run w/ X threads to generate load, etc.
> >
> > But that approach will always use the same user, same data in the AJAX
> > calls during load generation.
> >
> > If you need them to be unique & parameterized, that's where it takes some
> > work to go in and cleanup the proxy recording w/ paramaterized data,
> > response checking (if more than just checking HTTP 200 OKs). And you'll
> > find proxy recording generates a lot of unnecessary HTTP requests for
> HTML,
> > CSS, image files that aren't necessary of interest as you're testing the
> > AJAX calls, which is where you filter out only the requests of interest
> and
> > only use those in test plan, etc.
> >
> > I believe this kind of work is needed regardless of what tool you use,
> some
> > tools just make it easier, but there's still work to do. Not just a one
> > touch button approach unless all you need is simple record & playback.
> >
> > On Tue, Feb 5, 2013 at 5:08 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > >wrote:
> >
> > > Will probably just buy BrowserMob.
> > > Too bad there isn't an open source framework to already do this.
> > >
> > > Building this is a yak shave, and I need to be testing, not building a
> > test
> > > harness thats probably going to break on the next release.
> > >
> > > On Tue, Feb 5, 2013 at 3:40 PM, David Luu <ma...@gmail.com> wrote:
> > >
> > > > JMeter proxy is the most integrated approach, but I find it gives
> "too
> > > much
> > > > information", so I tend to use external tools like browser traffic
> > > sniffers
> > > > (HttpFox, livehttpheaders, ieHttpHeaders) to see what HTTP requests
> are
> > > > made for AJAX calls for just the requests & responses I'm interested
> > in,
> > > > easier to manage. But that's just my opinion, others might find the
> > > JMeter
> > > > proxy easier to use.
> > > >
> > > > Whatever approach you take, you just need to know what HTTP requests
> > are
> > > > made by the AJAX calls to replicate in JMeter, and parameterize those
> > > > requests to take in dynamic/test data as needed, assert appropriate
> > > > response data, etc. In this case, WebDriver can be dropped from the
> > > > equation, just gives more overhead and lowers scalability in load
> > > > generation.
> > > >
> > > > On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
> > > > p.mouawad@ubik-ingenierie.com> wrote:
> > > >
> > > > > AjaxCall will emit a network call which JMeter will capture.
> > > > >
> > > > > Use JMeter Server Proxy and you should have the Ajax Calls
> recorded.
> > > > >
> > > > > Regards
> > > > > Philippe M.
> > > > >
> > > > > Follow me on twitter <https://twitter.com/philmdot>
> > > > >
> > > > > UBIK-INGENIERIE on TWITTER <https://twitter.com/ubikingenierie>
> > > > >
> > > > > UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/>
> > > > >
> > > > > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <
> > zippyzeppoli@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > To clarify:
> > > > > > An example would be:
> > > > > > 1) log in via a form post
> > > > > > 2) look at orders in an ecommerce interface (AJAX call)
> > > > > > 3) click on result to view order detail (AJAX)
> > > > > >
> > > > > > Pretty much a standard ecommerce transaction, but the interface
> is
> > > all
> > > > > > javascript.
> > > > > >
> > > > > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <CS...@tnsi.com>
> > > > wrote:
> > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: David Luu [mailto:mangaroo@gmail.com]
> > > > > > > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > > > > > > To: JMeter Users List
> > > > > > > > Subject: Re: complex javascript actions in jmeter load test
> > > > > > > >
> > > > > > > >  >> You can use webdriver from jmeter.  Create a webdriver
> > class
> > > > that
> > > > > > > > performs the requests and runs the javascript via the
> browser,
> > > then
> > > > > > > run/call
> > > > > > > > it from a BSF or JSR sampler.
> > > > > > > >
> > > > > > > > Just to clarify, I take it that's only worthwhile to do (in
> > terms
> > > > of
> > > > > > > > scalability) when using PhantomJSDriver or HtmlUnitDriver or
> > > > > > > FirefoxDriver
> > > > > > > > (on Linux with xvfb) with JMeter this way?
> > > > > > > >
> > > > > > >
> > > > > > > "Worthwhile" depends on assumptions.
> > > > > > >
> > > > > > > > Because otherwise, the browser GUI is the scalability
> limiting
> > > > factor
> > > > > > > even
> > > > > > > > with JMeter and Grid deployment, and in that case, no
> > difference
> > > in
> > > > > > using
> > > > > > > > WebDriver outside JMeter to do performance tests except if
> one
> > > > wants
> > > > > > the
> > > > > > > > JMeter logging/reporting facilities to help performance test,
> > > > because
> > > > > > > there's
> > > > > > > > no or minimal scalabiity gain.
> > > > > > > >
> > > > > > >
> > > > > > > Seems the poster is more at the capability/viability stage of
> > > > > developing
> > > > > > > tests?  We would need much more information to start advising
> on
> > > the
> > > > > > entire
> > > > > > > load testing process, start to finish, and what challenges may
> > face
> > > > the
> > > > > > > poster along the way.
> > > > > > >
> > > > > > >
> > > > > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <
> > CStott@tnsi.com>
> > > > > > wrote:
> > > > > > > >
> > > > > > > > > You can use webdriver from jmeter.  Create a webdriver
> class
> > > that
> > > > > > > > > performs the requests and runs the javascript via the
> > browser,
> > > > then
> > > > > > > > > run/call it from a BSF or JSR sampler.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
> > > > > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > > > > > > To: JMeter Users List
> > > > > > > > > > Subject: Re: complex javascript actions in jmeter load
> test
> > > > > > > > > >
> > > > > > > > > > The problem is Selenium has no performance testing
> harness.
> > > > > > > > > > Sucks that it seems BrowserMob (paid solution) is the
> only
> > > > solid
> > > > > > > option.
> > > > > > > > > >
> > > > > > > > > > Until someone builds something with Phantom.js, but it
> > seems
> > > > > JMeter
> > > > > > > > > > isn't going to cut it here.
> > > > > > > > > >
> > > > > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <
> > > mangaroo@gmail.com>
> > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > You'll need to figure out what the complex javascript
> > does.
> > > > > Does
> > > > > > > > > > > it make any AJAX requests, or is it all local client
> side
> > > > > > > > > processing/rendering?
> > > > > > > > > > >
> > > > > > > > > > > If it's all local, then there's no point testing it
> with
> > > > > JMeter,
> > > > > > > > > > > that's client side browser testing better done with
> > > Selenium.
> > > > > It
> > > > > > > > > > > won't impact the server side load test (except delay in
> > > > server
> > > > > > > > > > > response time for fetching files will impact the
> > javascript
> > > > > > > > > > > execution on client side, but that can be compensated
> w/
> > > > JMeter
> > > > > > > > > > > load test against server with 1+ Selenium test running
> at
> > > > same
> > > > > > > > > > > time to gauge client side performance of site/app in
> > > > browser).
> > > > > > > > > > >
> > > > > > > > > > > If the javascript does execute AJAX requests, you need
> to
> > > > > figure
> > > > > > > > > > > out the HTTP requests made and mimic that in JMeter as
> > part
> > > > of
> > > > > > your
> > > > > > > > test.
> > > > > > > > > > > You can get that reading dev/design docs, or reverse
> > > > > > > > > > > engineer/traffic sniffing the app while doing manual
> > > testing.
> > > > > > > > > > >
> > > > > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > > > > > > > > <zippyzeppoli@gmail.com
> > > > > > > > > > > >wrote:
> > > > > > > > > > >
> > > > > > > > > > > > Hello,
> > > > > > > > > > > > If I have a website which requires logging in, and
> > > > executing
> > > > > > > > > > > > complex javascript actions, how would I do this (if
> at
> > > all)
> > > > > in
> > > > > > > jmeter?
> > > > > > > > > > > >
> > > > > > > > > > > > I've heard of writing groovy scripts to do this but
> > this
> > > > > sounds
> > > > > > > > > > > > like a
> > > > > > > > > > > lot
> > > > > > > > > > > > of work / maintenance.
> > > > > > > > > > > >
> > > > > > > > > > > > Thank you.
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > > > > > > For additional commands, e-mail:
> user-help@jmeter.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: complex javascript actions in jmeter load test

Posted by Zippy Zeppoli <zi...@gmail.com>.
Proxy won't work for clicking on JavaScript.
Selenium will, however, Selenium isn't designed for performance testing,
with the exception of BrowserMob, who has perfected it.

If JMeter had some kind of (good) Selenium integration then it might be
able to achieve it.

I think JMeter is a good tool, but it's not built for this kind of work.

On Tue, Feb 5, 2013 at 5:20 PM, David Luu <ma...@gmail.com> wrote:

> I'm not familiar with the full feature set of BrowserMob, but JMeter can do
> what you want, easy or hard, depending on your needs.
>
> If all you need is simple record & playback, JMeter proxy is best option.
> Just record w/ proxy, it generates a basic test plan that you can save to
> file and run w/ X threads to generate load, etc.
>
> But that approach will always use the same user, same data in the AJAX
> calls during load generation.
>
> If you need them to be unique & parameterized, that's where it takes some
> work to go in and cleanup the proxy recording w/ paramaterized data,
> response checking (if more than just checking HTTP 200 OKs). And you'll
> find proxy recording generates a lot of unnecessary HTTP requests for HTML,
> CSS, image files that aren't necessary of interest as you're testing the
> AJAX calls, which is where you filter out only the requests of interest and
> only use those in test plan, etc.
>
> I believe this kind of work is needed regardless of what tool you use, some
> tools just make it easier, but there's still work to do. Not just a one
> touch button approach unless all you need is simple record & playback.
>
> On Tue, Feb 5, 2013 at 5:08 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> >wrote:
>
> > Will probably just buy BrowserMob.
> > Too bad there isn't an open source framework to already do this.
> >
> > Building this is a yak shave, and I need to be testing, not building a
> test
> > harness thats probably going to break on the next release.
> >
> > On Tue, Feb 5, 2013 at 3:40 PM, David Luu <ma...@gmail.com> wrote:
> >
> > > JMeter proxy is the most integrated approach, but I find it gives "too
> > much
> > > information", so I tend to use external tools like browser traffic
> > sniffers
> > > (HttpFox, livehttpheaders, ieHttpHeaders) to see what HTTP requests are
> > > made for AJAX calls for just the requests & responses I'm interested
> in,
> > > easier to manage. But that's just my opinion, others might find the
> > JMeter
> > > proxy easier to use.
> > >
> > > Whatever approach you take, you just need to know what HTTP requests
> are
> > > made by the AJAX calls to replicate in JMeter, and parameterize those
> > > requests to take in dynamic/test data as needed, assert appropriate
> > > response data, etc. In this case, WebDriver can be dropped from the
> > > equation, just gives more overhead and lowers scalability in load
> > > generation.
> > >
> > > On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
> > > p.mouawad@ubik-ingenierie.com> wrote:
> > >
> > > > AjaxCall will emit a network call which JMeter will capture.
> > > >
> > > > Use JMeter Server Proxy and you should have the Ajax Calls recorded.
> > > >
> > > > Regards
> > > > Philippe M.
> > > >
> > > > Follow me on twitter <https://twitter.com/philmdot>
> > > >
> > > > UBIK-INGENIERIE on TWITTER <https://twitter.com/ubikingenierie>
> > > >
> > > > UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/>
> > > >
> > > > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <
> zippyzeppoli@gmail.com
> > > > >wrote:
> > > >
> > > > > To clarify:
> > > > > An example would be:
> > > > > 1) log in via a form post
> > > > > 2) look at orders in an ecommerce interface (AJAX call)
> > > > > 3) click on result to view order detail (AJAX)
> > > > >
> > > > > Pretty much a standard ecommerce transaction, but the interface is
> > all
> > > > > javascript.
> > > > >
> > > > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <CS...@tnsi.com>
> > > wrote:
> > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: David Luu [mailto:mangaroo@gmail.com]
> > > > > > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > > > > > To: JMeter Users List
> > > > > > > Subject: Re: complex javascript actions in jmeter load test
> > > > > > >
> > > > > > >  >> You can use webdriver from jmeter.  Create a webdriver
> class
> > > that
> > > > > > > performs the requests and runs the javascript via the browser,
> > then
> > > > > > run/call
> > > > > > > it from a BSF or JSR sampler.
> > > > > > >
> > > > > > > Just to clarify, I take it that's only worthwhile to do (in
> terms
> > > of
> > > > > > > scalability) when using PhantomJSDriver or HtmlUnitDriver or
> > > > > > FirefoxDriver
> > > > > > > (on Linux with xvfb) with JMeter this way?
> > > > > > >
> > > > > >
> > > > > > "Worthwhile" depends on assumptions.
> > > > > >
> > > > > > > Because otherwise, the browser GUI is the scalability limiting
> > > factor
> > > > > > even
> > > > > > > with JMeter and Grid deployment, and in that case, no
> difference
> > in
> > > > > using
> > > > > > > WebDriver outside JMeter to do performance tests except if one
> > > wants
> > > > > the
> > > > > > > JMeter logging/reporting facilities to help performance test,
> > > because
> > > > > > there's
> > > > > > > no or minimal scalabiity gain.
> > > > > > >
> > > > > >
> > > > > > Seems the poster is more at the capability/viability stage of
> > > > developing
> > > > > > tests?  We would need much more information to start advising on
> > the
> > > > > entire
> > > > > > load testing process, start to finish, and what challenges may
> face
> > > the
> > > > > > poster along the way.
> > > > > >
> > > > > >
> > > > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <
> CStott@tnsi.com>
> > > > > wrote:
> > > > > > >
> > > > > > > > You can use webdriver from jmeter.  Create a webdriver class
> > that
> > > > > > > > performs the requests and runs the javascript via the
> browser,
> > > then
> > > > > > > > run/call it from a BSF or JSR sampler.
> > > > > > > >
> > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
> > > > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > > > > > To: JMeter Users List
> > > > > > > > > Subject: Re: complex javascript actions in jmeter load test
> > > > > > > > >
> > > > > > > > > The problem is Selenium has no performance testing harness.
> > > > > > > > > Sucks that it seems BrowserMob (paid solution) is the only
> > > solid
> > > > > > option.
> > > > > > > > >
> > > > > > > > > Until someone builds something with Phantom.js, but it
> seems
> > > > JMeter
> > > > > > > > > isn't going to cut it here.
> > > > > > > > >
> > > > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <
> > mangaroo@gmail.com>
> > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > You'll need to figure out what the complex javascript
> does.
> > > > Does
> > > > > > > > > > it make any AJAX requests, or is it all local client side
> > > > > > > > processing/rendering?
> > > > > > > > > >
> > > > > > > > > > If it's all local, then there's no point testing it with
> > > > JMeter,
> > > > > > > > > > that's client side browser testing better done with
> > Selenium.
> > > > It
> > > > > > > > > > won't impact the server side load test (except delay in
> > > server
> > > > > > > > > > response time for fetching files will impact the
> javascript
> > > > > > > > > > execution on client side, but that can be compensated w/
> > > JMeter
> > > > > > > > > > load test against server with 1+ Selenium test running at
> > > same
> > > > > > > > > > time to gauge client side performance of site/app in
> > > browser).
> > > > > > > > > >
> > > > > > > > > > If the javascript does execute AJAX requests, you need to
> > > > figure
> > > > > > > > > > out the HTTP requests made and mimic that in JMeter as
> part
> > > of
> > > > > your
> > > > > > > test.
> > > > > > > > > > You can get that reading dev/design docs, or reverse
> > > > > > > > > > engineer/traffic sniffing the app while doing manual
> > testing.
> > > > > > > > > >
> > > > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > > > > > > > <zippyzeppoli@gmail.com
> > > > > > > > > > >wrote:
> > > > > > > > > >
> > > > > > > > > > > Hello,
> > > > > > > > > > > If I have a website which requires logging in, and
> > > executing
> > > > > > > > > > > complex javascript actions, how would I do this (if at
> > all)
> > > > in
> > > > > > jmeter?
> > > > > > > > > > >
> > > > > > > > > > > I've heard of writing groovy scripts to do this but
> this
> > > > sounds
> > > > > > > > > > > like a
> > > > > > > > > > lot
> > > > > > > > > > > of work / maintenance.
> > > > > > > > > > >
> > > > > > > > > > > Thank you.
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > > > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: complex javascript actions in jmeter load test

Posted by David Luu <ma...@gmail.com>.
I'm not familiar with the full feature set of BrowserMob, but JMeter can do
what you want, easy or hard, depending on your needs.

If all you need is simple record & playback, JMeter proxy is best option.
Just record w/ proxy, it generates a basic test plan that you can save to
file and run w/ X threads to generate load, etc.

But that approach will always use the same user, same data in the AJAX
calls during load generation.

If you need them to be unique & parameterized, that's where it takes some
work to go in and cleanup the proxy recording w/ paramaterized data,
response checking (if more than just checking HTTP 200 OKs). And you'll
find proxy recording generates a lot of unnecessary HTTP requests for HTML,
CSS, image files that aren't necessary of interest as you're testing the
AJAX calls, which is where you filter out only the requests of interest and
only use those in test plan, etc.

I believe this kind of work is needed regardless of what tool you use, some
tools just make it easier, but there's still work to do. Not just a one
touch button approach unless all you need is simple record & playback.

On Tue, Feb 5, 2013 at 5:08 PM, Zippy Zeppoli <zi...@gmail.com>wrote:

> Will probably just buy BrowserMob.
> Too bad there isn't an open source framework to already do this.
>
> Building this is a yak shave, and I need to be testing, not building a test
> harness thats probably going to break on the next release.
>
> On Tue, Feb 5, 2013 at 3:40 PM, David Luu <ma...@gmail.com> wrote:
>
> > JMeter proxy is the most integrated approach, but I find it gives "too
> much
> > information", so I tend to use external tools like browser traffic
> sniffers
> > (HttpFox, livehttpheaders, ieHttpHeaders) to see what HTTP requests are
> > made for AJAX calls for just the requests & responses I'm interested in,
> > easier to manage. But that's just my opinion, others might find the
> JMeter
> > proxy easier to use.
> >
> > Whatever approach you take, you just need to know what HTTP requests are
> > made by the AJAX calls to replicate in JMeter, and parameterize those
> > requests to take in dynamic/test data as needed, assert appropriate
> > response data, etc. In this case, WebDriver can be dropped from the
> > equation, just gives more overhead and lowers scalability in load
> > generation.
> >
> > On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
> > p.mouawad@ubik-ingenierie.com> wrote:
> >
> > > AjaxCall will emit a network call which JMeter will capture.
> > >
> > > Use JMeter Server Proxy and you should have the Ajax Calls recorded.
> > >
> > > Regards
> > > Philippe M.
> > >
> > > Follow me on twitter <https://twitter.com/philmdot>
> > >
> > > UBIK-INGENIERIE on TWITTER <https://twitter.com/ubikingenierie>
> > >
> > > UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/>
> > >
> > > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > > >wrote:
> > >
> > > > To clarify:
> > > > An example would be:
> > > > 1) log in via a form post
> > > > 2) look at orders in an ecommerce interface (AJAX call)
> > > > 3) click on result to view order detail (AJAX)
> > > >
> > > > Pretty much a standard ecommerce transaction, but the interface is
> all
> > > > javascript.
> > > >
> > > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <CS...@tnsi.com>
> > wrote:
> > > >
> > > > > > -----Original Message-----
> > > > > > From: David Luu [mailto:mangaroo@gmail.com]
> > > > > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > > > > To: JMeter Users List
> > > > > > Subject: Re: complex javascript actions in jmeter load test
> > > > > >
> > > > > >  >> You can use webdriver from jmeter.  Create a webdriver class
> > that
> > > > > > performs the requests and runs the javascript via the browser,
> then
> > > > > run/call
> > > > > > it from a BSF or JSR sampler.
> > > > > >
> > > > > > Just to clarify, I take it that's only worthwhile to do (in terms
> > of
> > > > > > scalability) when using PhantomJSDriver or HtmlUnitDriver or
> > > > > FirefoxDriver
> > > > > > (on Linux with xvfb) with JMeter this way?
> > > > > >
> > > > >
> > > > > "Worthwhile" depends on assumptions.
> > > > >
> > > > > > Because otherwise, the browser GUI is the scalability limiting
> > factor
> > > > > even
> > > > > > with JMeter and Grid deployment, and in that case, no difference
> in
> > > > using
> > > > > > WebDriver outside JMeter to do performance tests except if one
> > wants
> > > > the
> > > > > > JMeter logging/reporting facilities to help performance test,
> > because
> > > > > there's
> > > > > > no or minimal scalabiity gain.
> > > > > >
> > > > >
> > > > > Seems the poster is more at the capability/viability stage of
> > > developing
> > > > > tests?  We would need much more information to start advising on
> the
> > > > entire
> > > > > load testing process, start to finish, and what challenges may face
> > the
> > > > > poster along the way.
> > > > >
> > > > >
> > > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <CS...@tnsi.com>
> > > > wrote:
> > > > > >
> > > > > > > You can use webdriver from jmeter.  Create a webdriver class
> that
> > > > > > > performs the requests and runs the javascript via the browser,
> > then
> > > > > > > run/call it from a BSF or JSR sampler.
> > > > > > >
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
> > > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > > > > To: JMeter Users List
> > > > > > > > Subject: Re: complex javascript actions in jmeter load test
> > > > > > > >
> > > > > > > > The problem is Selenium has no performance testing harness.
> > > > > > > > Sucks that it seems BrowserMob (paid solution) is the only
> > solid
> > > > > option.
> > > > > > > >
> > > > > > > > Until someone builds something with Phantom.js, but it seems
> > > JMeter
> > > > > > > > isn't going to cut it here.
> > > > > > > >
> > > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <
> mangaroo@gmail.com>
> > > > > wrote:
> > > > > > > >
> > > > > > > > > You'll need to figure out what the complex javascript does.
> > > Does
> > > > > > > > > it make any AJAX requests, or is it all local client side
> > > > > > > processing/rendering?
> > > > > > > > >
> > > > > > > > > If it's all local, then there's no point testing it with
> > > JMeter,
> > > > > > > > > that's client side browser testing better done with
> Selenium.
> > > It
> > > > > > > > > won't impact the server side load test (except delay in
> > server
> > > > > > > > > response time for fetching files will impact the javascript
> > > > > > > > > execution on client side, but that can be compensated w/
> > JMeter
> > > > > > > > > load test against server with 1+ Selenium test running at
> > same
> > > > > > > > > time to gauge client side performance of site/app in
> > browser).
> > > > > > > > >
> > > > > > > > > If the javascript does execute AJAX requests, you need to
> > > figure
> > > > > > > > > out the HTTP requests made and mimic that in JMeter as part
> > of
> > > > your
> > > > > > test.
> > > > > > > > > You can get that reading dev/design docs, or reverse
> > > > > > > > > engineer/traffic sniffing the app while doing manual
> testing.
> > > > > > > > >
> > > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > > > > > > <zippyzeppoli@gmail.com
> > > > > > > > > >wrote:
> > > > > > > > >
> > > > > > > > > > Hello,
> > > > > > > > > > If I have a website which requires logging in, and
> > executing
> > > > > > > > > > complex javascript actions, how would I do this (if at
> all)
> > > in
> > > > > jmeter?
> > > > > > > > > >
> > > > > > > > > > I've heard of writing groovy scripts to do this but this
> > > sounds
> > > > > > > > > > like a
> > > > > > > > > lot
> > > > > > > > > > of work / maintenance.
> > > > > > > > > >
> > > > > > > > > > Thank you.
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > > > > >
> > > > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: complex javascript actions in jmeter load test

Posted by Zippy Zeppoli <zi...@gmail.com>.
Will probably just buy BrowserMob.
Too bad there isn't an open source framework to already do this.

Building this is a yak shave, and I need to be testing, not building a test
harness thats probably going to break on the next release.

On Tue, Feb 5, 2013 at 3:40 PM, David Luu <ma...@gmail.com> wrote:

> JMeter proxy is the most integrated approach, but I find it gives "too much
> information", so I tend to use external tools like browser traffic sniffers
> (HttpFox, livehttpheaders, ieHttpHeaders) to see what HTTP requests are
> made for AJAX calls for just the requests & responses I'm interested in,
> easier to manage. But that's just my opinion, others might find the JMeter
> proxy easier to use.
>
> Whatever approach you take, you just need to know what HTTP requests are
> made by the AJAX calls to replicate in JMeter, and parameterize those
> requests to take in dynamic/test data as needed, assert appropriate
> response data, etc. In this case, WebDriver can be dropped from the
> equation, just gives more overhead and lowers scalability in load
> generation.
>
> On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
> p.mouawad@ubik-ingenierie.com> wrote:
>
> > AjaxCall will emit a network call which JMeter will capture.
> >
> > Use JMeter Server Proxy and you should have the Ajax Calls recorded.
> >
> > Regards
> > Philippe M.
> >
> > Follow me on twitter <https://twitter.com/philmdot>
> >
> > UBIK-INGENIERIE on TWITTER <https://twitter.com/ubikingenierie>
> >
> > UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/>
> >
> > On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > >wrote:
> >
> > > To clarify:
> > > An example would be:
> > > 1) log in via a form post
> > > 2) look at orders in an ecommerce interface (AJAX call)
> > > 3) click on result to view order detail (AJAX)
> > >
> > > Pretty much a standard ecommerce transaction, but the interface is all
> > > javascript.
> > >
> > > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <CS...@tnsi.com>
> wrote:
> > >
> > > > > -----Original Message-----
> > > > > From: David Luu [mailto:mangaroo@gmail.com]
> > > > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > > > To: JMeter Users List
> > > > > Subject: Re: complex javascript actions in jmeter load test
> > > > >
> > > > >  >> You can use webdriver from jmeter.  Create a webdriver class
> that
> > > > > performs the requests and runs the javascript via the browser, then
> > > > run/call
> > > > > it from a BSF or JSR sampler.
> > > > >
> > > > > Just to clarify, I take it that's only worthwhile to do (in terms
> of
> > > > > scalability) when using PhantomJSDriver or HtmlUnitDriver or
> > > > FirefoxDriver
> > > > > (on Linux with xvfb) with JMeter this way?
> > > > >
> > > >
> > > > "Worthwhile" depends on assumptions.
> > > >
> > > > > Because otherwise, the browser GUI is the scalability limiting
> factor
> > > > even
> > > > > with JMeter and Grid deployment, and in that case, no difference in
> > > using
> > > > > WebDriver outside JMeter to do performance tests except if one
> wants
> > > the
> > > > > JMeter logging/reporting facilities to help performance test,
> because
> > > > there's
> > > > > no or minimal scalabiity gain.
> > > > >
> > > >
> > > > Seems the poster is more at the capability/viability stage of
> > developing
> > > > tests?  We would need much more information to start advising on the
> > > entire
> > > > load testing process, start to finish, and what challenges may face
> the
> > > > poster along the way.
> > > >
> > > >
> > > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <CS...@tnsi.com>
> > > wrote:
> > > > >
> > > > > > You can use webdriver from jmeter.  Create a webdriver class that
> > > > > > performs the requests and runs the javascript via the browser,
> then
> > > > > > run/call it from a BSF or JSR sampler.
> > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
> > > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > > > To: JMeter Users List
> > > > > > > Subject: Re: complex javascript actions in jmeter load test
> > > > > > >
> > > > > > > The problem is Selenium has no performance testing harness.
> > > > > > > Sucks that it seems BrowserMob (paid solution) is the only
> solid
> > > > option.
> > > > > > >
> > > > > > > Until someone builds something with Phantom.js, but it seems
> > JMeter
> > > > > > > isn't going to cut it here.
> > > > > > >
> > > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <ma...@gmail.com>
> > > > wrote:
> > > > > > >
> > > > > > > > You'll need to figure out what the complex javascript does.
> > Does
> > > > > > > > it make any AJAX requests, or is it all local client side
> > > > > > processing/rendering?
> > > > > > > >
> > > > > > > > If it's all local, then there's no point testing it with
> > JMeter,
> > > > > > > > that's client side browser testing better done with Selenium.
> > It
> > > > > > > > won't impact the server side load test (except delay in
> server
> > > > > > > > response time for fetching files will impact the javascript
> > > > > > > > execution on client side, but that can be compensated w/
> JMeter
> > > > > > > > load test against server with 1+ Selenium test running at
> same
> > > > > > > > time to gauge client side performance of site/app in
> browser).
> > > > > > > >
> > > > > > > > If the javascript does execute AJAX requests, you need to
> > figure
> > > > > > > > out the HTTP requests made and mimic that in JMeter as part
> of
> > > your
> > > > > test.
> > > > > > > > You can get that reading dev/design docs, or reverse
> > > > > > > > engineer/traffic sniffing the app while doing manual testing.
> > > > > > > >
> > > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > > > > > <zippyzeppoli@gmail.com
> > > > > > > > >wrote:
> > > > > > > >
> > > > > > > > > Hello,
> > > > > > > > > If I have a website which requires logging in, and
> executing
> > > > > > > > > complex javascript actions, how would I do this (if at all)
> > in
> > > > jmeter?
> > > > > > > > >
> > > > > > > > > I've heard of writing groovy scripts to do this but this
> > sounds
> > > > > > > > > like a
> > > > > > > > lot
> > > > > > > > > of work / maintenance.
> > > > > > > > >
> > > > > > > > > Thank you.
> > > > > > > > >
> > > > > > > >
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > > > >
> > > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > >
> > > >
> > >
> >
>

Re: complex javascript actions in jmeter load test

Posted by David Luu <ma...@gmail.com>.
JMeter proxy is the most integrated approach, but I find it gives "too much
information", so I tend to use external tools like browser traffic sniffers
(HttpFox, livehttpheaders, ieHttpHeaders) to see what HTTP requests are
made for AJAX calls for just the requests & responses I'm interested in,
easier to manage. But that's just my opinion, others might find the JMeter
proxy easier to use.

Whatever approach you take, you just need to know what HTTP requests are
made by the AJAX calls to replicate in JMeter, and parameterize those
requests to take in dynamic/test data as needed, assert appropriate
response data, etc. In this case, WebDriver can be dropped from the
equation, just gives more overhead and lowers scalability in load
generation.

On Tue, Feb 5, 2013 at 1:55 PM, Philippe Mouawad <
p.mouawad@ubik-ingenierie.com> wrote:

> AjaxCall will emit a network call which JMeter will capture.
>
> Use JMeter Server Proxy and you should have the Ajax Calls recorded.
>
> Regards
> Philippe M.
>
> Follow me on twitter <https://twitter.com/philmdot>
>
> UBIK-INGENIERIE on TWITTER <https://twitter.com/ubikingenierie>
>
> UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/>
>
> On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> >wrote:
>
> > To clarify:
> > An example would be:
> > 1) log in via a form post
> > 2) look at orders in an ecommerce interface (AJAX call)
> > 3) click on result to view order detail (AJAX)
> >
> > Pretty much a standard ecommerce transaction, but the interface is all
> > javascript.
> >
> > On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <CS...@tnsi.com> wrote:
> >
> > > > -----Original Message-----
> > > > From: David Luu [mailto:mangaroo@gmail.com]
> > > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > > To: JMeter Users List
> > > > Subject: Re: complex javascript actions in jmeter load test
> > > >
> > > >  >> You can use webdriver from jmeter.  Create a webdriver class that
> > > > performs the requests and runs the javascript via the browser, then
> > > run/call
> > > > it from a BSF or JSR sampler.
> > > >
> > > > Just to clarify, I take it that's only worthwhile to do (in terms of
> > > > scalability) when using PhantomJSDriver or HtmlUnitDriver or
> > > FirefoxDriver
> > > > (on Linux with xvfb) with JMeter this way?
> > > >
> > >
> > > "Worthwhile" depends on assumptions.
> > >
> > > > Because otherwise, the browser GUI is the scalability limiting factor
> > > even
> > > > with JMeter and Grid deployment, and in that case, no difference in
> > using
> > > > WebDriver outside JMeter to do performance tests except if one wants
> > the
> > > > JMeter logging/reporting facilities to help performance test, because
> > > there's
> > > > no or minimal scalabiity gain.
> > > >
> > >
> > > Seems the poster is more at the capability/viability stage of
> developing
> > > tests?  We would need much more information to start advising on the
> > entire
> > > load testing process, start to finish, and what challenges may face the
> > > poster along the way.
> > >
> > >
> > > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <CS...@tnsi.com>
> > wrote:
> > > >
> > > > > You can use webdriver from jmeter.  Create a webdriver class that
> > > > > performs the requests and runs the javascript via the browser, then
> > > > > run/call it from a BSF or JSR sampler.
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
> > > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > > To: JMeter Users List
> > > > > > Subject: Re: complex javascript actions in jmeter load test
> > > > > >
> > > > > > The problem is Selenium has no performance testing harness.
> > > > > > Sucks that it seems BrowserMob (paid solution) is the only solid
> > > option.
> > > > > >
> > > > > > Until someone builds something with Phantom.js, but it seems
> JMeter
> > > > > > isn't going to cut it here.
> > > > > >
> > > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <ma...@gmail.com>
> > > wrote:
> > > > > >
> > > > > > > You'll need to figure out what the complex javascript does.
> Does
> > > > > > > it make any AJAX requests, or is it all local client side
> > > > > processing/rendering?
> > > > > > >
> > > > > > > If it's all local, then there's no point testing it with
> JMeter,
> > > > > > > that's client side browser testing better done with Selenium.
> It
> > > > > > > won't impact the server side load test (except delay in server
> > > > > > > response time for fetching files will impact the javascript
> > > > > > > execution on client side, but that can be compensated w/ JMeter
> > > > > > > load test against server with 1+ Selenium test running at same
> > > > > > > time to gauge client side performance of site/app in browser).
> > > > > > >
> > > > > > > If the javascript does execute AJAX requests, you need to
> figure
> > > > > > > out the HTTP requests made and mimic that in JMeter as part of
> > your
> > > > test.
> > > > > > > You can get that reading dev/design docs, or reverse
> > > > > > > engineer/traffic sniffing the app while doing manual testing.
> > > > > > >
> > > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > > > > <zippyzeppoli@gmail.com
> > > > > > > >wrote:
> > > > > > >
> > > > > > > > Hello,
> > > > > > > > If I have a website which requires logging in, and executing
> > > > > > > > complex javascript actions, how would I do this (if at all)
> in
> > > jmeter?
> > > > > > > >
> > > > > > > > I've heard of writing groovy scripts to do this but this
> sounds
> > > > > > > > like a
> > > > > > > lot
> > > > > > > > of work / maintenance.
> > > > > > > >
> > > > > > > > Thank you.
> > > > > > > >
> > > > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > > >
> > > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > For additional commands, e-mail: user-help@jmeter.apache.org
> > >
> > >
> >
>

Re: complex javascript actions in jmeter load test

Posted by Philippe Mouawad <p....@ubik-ingenierie.com>.
AjaxCall will emit a network call which JMeter will capture.

Use JMeter Server Proxy and you should have the Ajax Calls recorded.

Regards
Philippe M.

Follow me on twitter <https://twitter.com/philmdot>

UBIK-INGENIERIE on TWITTER <https://twitter.com/ubikingenierie>

UBIK LOAD PACK BLOG <http://www.ubik-ingenierie.com/blog/>

On Tue, Feb 5, 2013 at 10:52 PM, Zippy Zeppoli <zi...@gmail.com>wrote:

> To clarify:
> An example would be:
> 1) log in via a form post
> 2) look at orders in an ecommerce interface (AJAX call)
> 3) click on result to view order detail (AJAX)
>
> Pretty much a standard ecommerce transaction, but the interface is all
> javascript.
>
> On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <CS...@tnsi.com> wrote:
>
> > > -----Original Message-----
> > > From: David Luu [mailto:mangaroo@gmail.com]
> > > Sent: Tuesday, 5 February 2013 1:18 PM
> > > To: JMeter Users List
> > > Subject: Re: complex javascript actions in jmeter load test
> > >
> > >  >> You can use webdriver from jmeter.  Create a webdriver class that
> > > performs the requests and runs the javascript via the browser, then
> > run/call
> > > it from a BSF or JSR sampler.
> > >
> > > Just to clarify, I take it that's only worthwhile to do (in terms of
> > > scalability) when using PhantomJSDriver or HtmlUnitDriver or
> > FirefoxDriver
> > > (on Linux with xvfb) with JMeter this way?
> > >
> >
> > "Worthwhile" depends on assumptions.
> >
> > > Because otherwise, the browser GUI is the scalability limiting factor
> > even
> > > with JMeter and Grid deployment, and in that case, no difference in
> using
> > > WebDriver outside JMeter to do performance tests except if one wants
> the
> > > JMeter logging/reporting facilities to help performance test, because
> > there's
> > > no or minimal scalabiity gain.
> > >
> >
> > Seems the poster is more at the capability/viability stage of developing
> > tests?  We would need much more information to start advising on the
> entire
> > load testing process, start to finish, and what challenges may face the
> > poster along the way.
> >
> >
> > > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <CS...@tnsi.com>
> wrote:
> > >
> > > > You can use webdriver from jmeter.  Create a webdriver class that
> > > > performs the requests and runs the javascript via the browser, then
> > > > run/call it from a BSF or JSR sampler.
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
> > > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > > To: JMeter Users List
> > > > > Subject: Re: complex javascript actions in jmeter load test
> > > > >
> > > > > The problem is Selenium has no performance testing harness.
> > > > > Sucks that it seems BrowserMob (paid solution) is the only solid
> > option.
> > > > >
> > > > > Until someone builds something with Phantom.js, but it seems JMeter
> > > > > isn't going to cut it here.
> > > > >
> > > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <ma...@gmail.com>
> > wrote:
> > > > >
> > > > > > You'll need to figure out what the complex javascript does. Does
> > > > > > it make any AJAX requests, or is it all local client side
> > > > processing/rendering?
> > > > > >
> > > > > > If it's all local, then there's no point testing it with JMeter,
> > > > > > that's client side browser testing better done with Selenium. It
> > > > > > won't impact the server side load test (except delay in server
> > > > > > response time for fetching files will impact the javascript
> > > > > > execution on client side, but that can be compensated w/ JMeter
> > > > > > load test against server with 1+ Selenium test running at same
> > > > > > time to gauge client side performance of site/app in browser).
> > > > > >
> > > > > > If the javascript does execute AJAX requests, you need to figure
> > > > > > out the HTTP requests made and mimic that in JMeter as part of
> your
> > > test.
> > > > > > You can get that reading dev/design docs, or reverse
> > > > > > engineer/traffic sniffing the app while doing manual testing.
> > > > > >
> > > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > > > <zippyzeppoli@gmail.com
> > > > > > >wrote:
> > > > > >
> > > > > > > Hello,
> > > > > > > If I have a website which requires logging in, and executing
> > > > > > > complex javascript actions, how would I do this (if at all) in
> > jmeter?
> > > > > > >
> > > > > > > I've heard of writing groovy scripts to do this but this sounds
> > > > > > > like a
> > > > > > lot
> > > > > > > of work / maintenance.
> > > > > > >
> > > > > > > Thank you.
> > > > > > >
> > > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > >
> > > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
> >
>

Re: complex javascript actions in jmeter load test

Posted by Zippy Zeppoli <zi...@gmail.com>.
To clarify:
An example would be:
1) log in via a form post
2) look at orders in an ecommerce interface (AJAX call)
3) click on result to view order detail (AJAX)

Pretty much a standard ecommerce transaction, but the interface is all
javascript.

On Mon, Feb 4, 2013 at 7:40 PM, Stott, Charlie <CS...@tnsi.com> wrote:

> > -----Original Message-----
> > From: David Luu [mailto:mangaroo@gmail.com]
> > Sent: Tuesday, 5 February 2013 1:18 PM
> > To: JMeter Users List
> > Subject: Re: complex javascript actions in jmeter load test
> >
> >  >> You can use webdriver from jmeter.  Create a webdriver class that
> > performs the requests and runs the javascript via the browser, then
> run/call
> > it from a BSF or JSR sampler.
> >
> > Just to clarify, I take it that's only worthwhile to do (in terms of
> > scalability) when using PhantomJSDriver or HtmlUnitDriver or
> FirefoxDriver
> > (on Linux with xvfb) with JMeter this way?
> >
>
> "Worthwhile" depends on assumptions.
>
> > Because otherwise, the browser GUI is the scalability limiting factor
> even
> > with JMeter and Grid deployment, and in that case, no difference in using
> > WebDriver outside JMeter to do performance tests except if one wants the
> > JMeter logging/reporting facilities to help performance test, because
> there's
> > no or minimal scalabiity gain.
> >
>
> Seems the poster is more at the capability/viability stage of developing
> tests?  We would need much more information to start advising on the entire
> load testing process, start to finish, and what challenges may face the
> poster along the way.
>
>
> > On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <CS...@tnsi.com> wrote:
> >
> > > You can use webdriver from jmeter.  Create a webdriver class that
> > > performs the requests and runs the javascript via the browser, then
> > > run/call it from a BSF or JSR sampler.
> > >
> > >
> > > > -----Original Message-----
> > > > From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
> > > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > > To: JMeter Users List
> > > > Subject: Re: complex javascript actions in jmeter load test
> > > >
> > > > The problem is Selenium has no performance testing harness.
> > > > Sucks that it seems BrowserMob (paid solution) is the only solid
> option.
> > > >
> > > > Until someone builds something with Phantom.js, but it seems JMeter
> > > > isn't going to cut it here.
> > > >
> > > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <ma...@gmail.com>
> wrote:
> > > >
> > > > > You'll need to figure out what the complex javascript does. Does
> > > > > it make any AJAX requests, or is it all local client side
> > > processing/rendering?
> > > > >
> > > > > If it's all local, then there's no point testing it with JMeter,
> > > > > that's client side browser testing better done with Selenium. It
> > > > > won't impact the server side load test (except delay in server
> > > > > response time for fetching files will impact the javascript
> > > > > execution on client side, but that can be compensated w/ JMeter
> > > > > load test against server with 1+ Selenium test running at same
> > > > > time to gauge client side performance of site/app in browser).
> > > > >
> > > > > If the javascript does execute AJAX requests, you need to figure
> > > > > out the HTTP requests made and mimic that in JMeter as part of your
> > test.
> > > > > You can get that reading dev/design docs, or reverse
> > > > > engineer/traffic sniffing the app while doing manual testing.
> > > > >
> > > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > > <zippyzeppoli@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > Hello,
> > > > > > If I have a website which requires logging in, and executing
> > > > > > complex javascript actions, how would I do this (if at all) in
> jmeter?
> > > > > >
> > > > > > I've heard of writing groovy scripts to do this but this sounds
> > > > > > like a
> > > > > lot
> > > > > > of work / maintenance.
> > > > > >
> > > > > > Thank you.
> > > > > >
> > > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > For additional commands, e-mail: user-help@jmeter.apache.org
> > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

RE: complex javascript actions in jmeter load test

Posted by "Stott, Charlie" <CS...@tnsi.com>.
> -----Original Message-----
> From: David Luu [mailto:mangaroo@gmail.com]
> Sent: Tuesday, 5 February 2013 1:18 PM
> To: JMeter Users List
> Subject: Re: complex javascript actions in jmeter load test
> 
>  >> You can use webdriver from jmeter.  Create a webdriver class that
> performs the requests and runs the javascript via the browser, then run/call
> it from a BSF or JSR sampler.
> 
> Just to clarify, I take it that's only worthwhile to do (in terms of
> scalability) when using PhantomJSDriver or HtmlUnitDriver or FirefoxDriver
> (on Linux with xvfb) with JMeter this way?
> 

"Worthwhile" depends on assumptions.

> Because otherwise, the browser GUI is the scalability limiting factor even
> with JMeter and Grid deployment, and in that case, no difference in using
> WebDriver outside JMeter to do performance tests except if one wants the
> JMeter logging/reporting facilities to help performance test, because there's
> no or minimal scalabiity gain.
> 

Seems the poster is more at the capability/viability stage of developing tests?  We would need much more information to start advising on the entire load testing process, start to finish, and what challenges may face the poster along the way.


> On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <CS...@tnsi.com> wrote:
> 
> > You can use webdriver from jmeter.  Create a webdriver class that
> > performs the requests and runs the javascript via the browser, then
> > run/call it from a BSF or JSR sampler.
> >
> >
> > > -----Original Message-----
> > > From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
> > > Sent: Tuesday, 5 February 2013 9:28 AM
> > > To: JMeter Users List
> > > Subject: Re: complex javascript actions in jmeter load test
> > >
> > > The problem is Selenium has no performance testing harness.
> > > Sucks that it seems BrowserMob (paid solution) is the only solid option.
> > >
> > > Until someone builds something with Phantom.js, but it seems JMeter
> > > isn't going to cut it here.
> > >
> > > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <ma...@gmail.com> wrote:
> > >
> > > > You'll need to figure out what the complex javascript does. Does
> > > > it make any AJAX requests, or is it all local client side
> > processing/rendering?
> > > >
> > > > If it's all local, then there's no point testing it with JMeter,
> > > > that's client side browser testing better done with Selenium. It
> > > > won't impact the server side load test (except delay in server
> > > > response time for fetching files will impact the javascript
> > > > execution on client side, but that can be compensated w/ JMeter
> > > > load test against server with 1+ Selenium test running at same
> > > > time to gauge client side performance of site/app in browser).
> > > >
> > > > If the javascript does execute AJAX requests, you need to figure
> > > > out the HTTP requests made and mimic that in JMeter as part of your
> test.
> > > > You can get that reading dev/design docs, or reverse
> > > > engineer/traffic sniffing the app while doing manual testing.
> > > >
> > > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli
> > > > <zippyzeppoli@gmail.com
> > > > >wrote:
> > > >
> > > > > Hello,
> > > > > If I have a website which requires logging in, and executing
> > > > > complex javascript actions, how would I do this (if at all) in jmeter?
> > > > >
> > > > > I've heard of writing groovy scripts to do this but this sounds
> > > > > like a
> > > > lot
> > > > > of work / maintenance.
> > > > >
> > > > > Thank you.
> > > > >
> > > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
> >

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


Re: complex javascript actions in jmeter load test

Posted by David Luu <ma...@gmail.com>.
 >> You can use webdriver from jmeter.  Create a webdriver class that
performs the requests and runs the javascript via the browser, then
run/call it from a BSF or JSR sampler.

Just to clarify, I take it that's only worthwhile to do (in terms of
scalability) when using PhantomJSDriver or HtmlUnitDriver or FirefoxDriver
(on Linux with xvfb) with JMeter this way?

Because otherwise, the browser GUI is the scalability limiting factor even
with JMeter and Grid deployment, and in that case, no difference in using
WebDriver outside JMeter to do performance tests except if one wants the
JMeter logging/reporting facilities to help performance test, because
there's no or minimal scalabiity gain.

On Mon, Feb 4, 2013 at 4:42 PM, Stott, Charlie <CS...@tnsi.com> wrote:

> You can use webdriver from jmeter.  Create a webdriver class that performs
> the requests and runs the javascript via the browser, then run/call it from
> a BSF or JSR sampler.
>
>
> > -----Original Message-----
> > From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
> > Sent: Tuesday, 5 February 2013 9:28 AM
> > To: JMeter Users List
> > Subject: Re: complex javascript actions in jmeter load test
> >
> > The problem is Selenium has no performance testing harness.
> > Sucks that it seems BrowserMob (paid solution) is the only solid option.
> >
> > Until someone builds something with Phantom.js, but it seems JMeter isn't
> > going to cut it here.
> >
> > On Fri, Feb 1, 2013 at 5:40 PM, David Luu <ma...@gmail.com> wrote:
> >
> > > You'll need to figure out what the complex javascript does. Does it
> > > make any AJAX requests, or is it all local client side
> processing/rendering?
> > >
> > > If it's all local, then there's no point testing it with JMeter,
> > > that's client side browser testing better done with Selenium. It won't
> > > impact the server side load test (except delay in server response time
> > > for fetching files will impact the javascript execution on client
> > > side, but that can be compensated w/ JMeter load test against server
> > > with 1+ Selenium test running at same time to gauge client side
> > > performance of site/app in browser).
> > >
> > > If the javascript does execute AJAX requests, you need to figure out
> > > the HTTP requests made and mimic that in JMeter as part of your test.
> > > You can get that reading dev/design docs, or reverse engineer/traffic
> > > sniffing the app while doing manual testing.
> > >
> > > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > > >wrote:
> > >
> > > > Hello,
> > > > If I have a website which requires logging in, and executing complex
> > > > javascript actions, how would I do this (if at all) in jmeter?
> > > >
> > > > I've heard of writing groovy scripts to do this but this sounds like
> > > > a
> > > lot
> > > > of work / maintenance.
> > > >
> > > > Thank you.
> > > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

RE: complex javascript actions in jmeter load test

Posted by "Stott, Charlie" <CS...@tnsi.com>.
You can use webdriver from jmeter.  Create a webdriver class that performs the requests and runs the javascript via the browser, then run/call it from a BSF or JSR sampler.


> -----Original Message-----
> From: Zippy Zeppoli [mailto:zippyzeppoli@gmail.com]
> Sent: Tuesday, 5 February 2013 9:28 AM
> To: JMeter Users List
> Subject: Re: complex javascript actions in jmeter load test
> 
> The problem is Selenium has no performance testing harness.
> Sucks that it seems BrowserMob (paid solution) is the only solid option.
> 
> Until someone builds something with Phantom.js, but it seems JMeter isn't
> going to cut it here.
> 
> On Fri, Feb 1, 2013 at 5:40 PM, David Luu <ma...@gmail.com> wrote:
> 
> > You'll need to figure out what the complex javascript does. Does it
> > make any AJAX requests, or is it all local client side processing/rendering?
> >
> > If it's all local, then there's no point testing it with JMeter,
> > that's client side browser testing better done with Selenium. It won't
> > impact the server side load test (except delay in server response time
> > for fetching files will impact the javascript execution on client
> > side, but that can be compensated w/ JMeter load test against server
> > with 1+ Selenium test running at same time to gauge client side
> > performance of site/app in browser).
> >
> > If the javascript does execute AJAX requests, you need to figure out
> > the HTTP requests made and mimic that in JMeter as part of your test.
> > You can get that reading dev/design docs, or reverse engineer/traffic
> > sniffing the app while doing manual testing.
> >
> > On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> > >wrote:
> >
> > > Hello,
> > > If I have a website which requires logging in, and executing complex
> > > javascript actions, how would I do this (if at all) in jmeter?
> > >
> > > I've heard of writing groovy scripts to do this but this sounds like
> > > a
> > lot
> > > of work / maintenance.
> > >
> > > Thank you.
> > >
> >

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


Re: complex javascript actions in jmeter load test

Posted by Zippy Zeppoli <zi...@gmail.com>.
The problem is Selenium has no performance testing harness.
Sucks that it seems BrowserMob (paid solution) is the only solid option.

Until someone builds something with Phantom.js, but it seems JMeter isn't
going to cut it here.

On Fri, Feb 1, 2013 at 5:40 PM, David Luu <ma...@gmail.com> wrote:

> You'll need to figure out what the complex javascript does. Does it make
> any AJAX requests, or is it all local client side processing/rendering?
>
> If it's all local, then there's no point testing it with JMeter, that's
> client side browser testing better done with Selenium. It won't impact the
> server side load test (except delay in server response time for fetching
> files will impact the javascript execution on client side, but that can be
> compensated w/ JMeter load test against server with 1+ Selenium test
> running at same time to gauge client side performance of site/app in
> browser).
>
> If the javascript does execute AJAX requests, you need to figure out the
> HTTP requests made and mimic that in JMeter as part of your test. You can
> get that reading dev/design docs, or reverse engineer/traffic sniffing the
> app while doing manual testing.
>
> On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli <zippyzeppoli@gmail.com
> >wrote:
>
> > Hello,
> > If I have a website which requires logging in, and executing complex
> > javascript actions, how would I do this (if at all) in jmeter?
> >
> > I've heard of writing groovy scripts to do this but this sounds like a
> lot
> > of work / maintenance.
> >
> > Thank you.
> >
>

Re: complex javascript actions in jmeter load test

Posted by David Luu <ma...@gmail.com>.
You'll need to figure out what the complex javascript does. Does it make
any AJAX requests, or is it all local client side processing/rendering?

If it's all local, then there's no point testing it with JMeter, that's
client side browser testing better done with Selenium. It won't impact the
server side load test (except delay in server response time for fetching
files will impact the javascript execution on client side, but that can be
compensated w/ JMeter load test against server with 1+ Selenium test
running at same time to gauge client side performance of site/app in
browser).

If the javascript does execute AJAX requests, you need to figure out the
HTTP requests made and mimic that in JMeter as part of your test. You can
get that reading dev/design docs, or reverse engineer/traffic sniffing the
app while doing manual testing.

On Fri, Feb 1, 2013 at 1:45 PM, Zippy Zeppoli <zi...@gmail.com>wrote:

> Hello,
> If I have a website which requires logging in, and executing complex
> javascript actions, how would I do this (if at all) in jmeter?
>
> I've heard of writing groovy scripts to do this but this sounds like a lot
> of work / maintenance.
>
> Thank you.
>