Return-Path: X-Original-To: apmail-jmeter-user-archive@www.apache.org Delivered-To: apmail-jmeter-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 83B1AE56B for ; Wed, 6 Feb 2013 01:29:42 +0000 (UTC) Received: (qmail 59800 invoked by uid 500); 6 Feb 2013 01:29:41 -0000 Delivered-To: apmail-jmeter-user-archive@jmeter.apache.org Received: (qmail 59771 invoked by uid 500); 6 Feb 2013 01:29:41 -0000 Mailing-List: contact user-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JMeter Users List" Delivered-To: mailing list user@jmeter.apache.org Received: (qmail 59761 invoked by uid 99); 6 Feb 2013 01:29:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2013 01:29:41 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of zippyzeppoli@gmail.com designates 209.85.214.49 as permitted sender) Received: from [209.85.214.49] (HELO mail-bk0-f49.google.com) (209.85.214.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2013 01:29:36 +0000 Received: by mail-bk0-f49.google.com with SMTP id w11so396214bku.22 for ; Tue, 05 Feb 2013 17:29:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=tSy/2kx8pEShPX2Z3fmxeiexzyh9puV0i+azP9CiAQo=; b=bsW7Otp3GUislhSC4lprFzGha1AzWNJwletEAkNSwKNRjS1hA4Tx1kstA7cvxk3Hk2 5tip4pdoPCcQsraafAmsrfrb2vE9M92AUQCGqw1BMjYLFN8rNQfjwRSUrepztkUedI/A TvRrCSKEaumXw/ldE3DYmGJJMZd/TQHJapt0LpltOz0vzN7/OGQpsbMPbI7fsQncphvC ZinyNCyMnY2cAj9dgpHsvLs6MZEcGxv2UM0jDcSMGTkhlMlrsLUN+EibhdAJI9s/Cjso HkuEIjEOnkl/F/HAcj/Jntyk835PoY4+ELpks8WWtLytpORdNTejvx5ue3lbDCTTLXI0 Z0pg== MIME-Version: 1.0 X-Received: by 10.204.152.28 with SMTP id e28mr3259535bkw.85.1360114154431; Tue, 05 Feb 2013 17:29:14 -0800 (PST) Received: by 10.204.231.79 with HTTP; Tue, 5 Feb 2013 17:29:14 -0800 (PST) In-Reply-To: References: <2DB71565D9DF26409875BE0660934F6B5F5920260C@TNS-MAIL-AP.win2k.corp.tnsi.com> <2DB71565D9DF26409875BE0660934F6B5F59202678@TNS-MAIL-AP.win2k.corp.tnsi.com> Date: Tue, 5 Feb 2013 17:29:14 -0800 Message-ID: Subject: Re: complex javascript actions in jmeter load test From: Zippy Zeppoli To: JMeter Users List Content-Type: multipart/alternative; boundary=0015175defee0763ef04d50441d1 X-Virus-Checked: Checked by ClamAV on apache.org --0015175defee0763ef04d50441d1 Content-Type: text/plain; charset=ISO-8859-1 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 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 >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 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 > > > > > > > > UBIK-INGENIERIE on TWITTER > > > > > > > > UBIK LOAD PACK 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 > > > 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 > > > > > > > > > > > > > > > > > > > >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 > > > > > > > > > > > > > > > > > > > > > > > > > > > --0015175defee0763ef04d50441d1--