Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 98300 invoked from network); 2 Mar 2010 01:25:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Mar 2010 01:25:07 -0000 Received: (qmail 99320 invoked by uid 500); 2 Mar 2010 01:25:04 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 99300 invoked by uid 500); 2 Mar 2010 01:25:04 -0000 Mailing-List: contact jmeter-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "JMeter Users List" Reply-To: "JMeter Users List" Delivered-To: mailing list jmeter-user@jakarta.apache.org Received: (qmail 99292 invoked by uid 99); 2 Mar 2010 01:25:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Mar 2010 01:25:04 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shettyd@gmail.com designates 209.85.160.44 as permitted sender) Received: from [209.85.160.44] (HELO mail-pw0-f44.google.com) (209.85.160.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Mar 2010 01:24:57 +0000 Received: by pwi3 with SMTP id 3so2229199pwi.31 for ; Mon, 01 Mar 2010 17:24:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=GpxgGsnYqcpLbi7SGNG385u4WN9iE9gOT6M2hVBL6lQ=; b=DzdKfo8f+HhiA/tbb78FveYOFQ9Udh9MRSS6oz+k4HgVoI2ckG8+5/zFypUJf2OI4Q YPVmTDGeyGGTX7CbdkCHVbElHzIC0o560t6Em4da+LGVAq/CEH2/KS+QHioX+xsT6lht WTNpXQg2IhqeA9CAaztSHwnlxkNOGAtE5On2M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=pkwGANdgL/oYUzlQw5UsoK7qWbHMB3mpK3Lnd0X4tgmsZAOgr2GKJPxfd27vAOjBGb VQf3rZGHAYTXPWixLglJ16UXs+0ssLj2gPXKJNNm7OO5rBkSamn1w840PZl/Co8u1DYt D1ZpZ1LcFKS9uoP9mIB7fS+ph8lv7GFfDIyVY= MIME-Version: 1.0 Received: by 10.141.214.1 with SMTP id r1mr2908477rvq.251.1267493076918; Mon, 01 Mar 2010 17:24:36 -0800 (PST) In-Reply-To: <700680061003011714r2e3e3480h151290cff8d802bf@mail.gmail.com> References: <700680061003011539t3be77c51x495d038fbeceb658@mail.gmail.com> <4483c26c1003011545o4252dc09s972ecda0e2150ecd@mail.gmail.com> <700680061003011714r2e3e3480h151290cff8d802bf@mail.gmail.com> Date: Mon, 1 Mar 2010 17:24:36 -0800 Message-ID: <4483c26c1003011724j45797008y1541da48abb9a5c8@mail.gmail.com> Subject: Re: cache.html From: Deepak Shetty To: JMeter Users List Content-Type: multipart/alternative; boundary=000e0cd1b36e9ae1070480c73a88 --000e0cd1b36e9ae1070480c73a88 Content-Type: text/plain; charset=ISO-8859-1 >What would be "good assertions" in this case? Anything that determines that your page is as it should be. Typically there is a title/header that is unique to the page (or some combination). May also be something like the standard error message shown shouldn't be there. This is application specific. Anything that gives you reasonable confidence that the right page was reached. >Do you know a link that explains how can I extract this string using a post-processor and regex/xpath extractor? http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor http://jakarta.apache.org/jmeter/usermanual/regular_expressions.html for an example (using google!) http://cwiki.apache.org/WICKET/wicket-and-jmeter-with-regular-expressions.html In your case something like RefName= varCacheUrl Regex = wb=['"]([^'"]*)['"] Template=$1$ MatchNo=1 DEFAULT_VALUE=failed and in request3 you could use /MainPortal/${varCacheUrl} //same as ref name defined above You can also use debug sampler + view results tree listener after request2 so that you can see that your regex ran correctly and extracted the value into the variable defined by ref name >Is the post processor a child of the second http request? Yes it should be a child of the request whose response you want to parse (in your case) Testing AJAX apps is a degree more difficult in JMeter family of testing tools (non browser driven) regards deepak On Mon, Mar 1, 2010 at 5:14 PM, Rodolfo Landa wrote: > Hi Deepak, > > Thanks for your quick answer. > > This is a simple test that opens the main page (mainPortal). Manually I > open the portal with a url: http://localhost:8080/mainPortal/ui.html. When > it opens I can see some Titles, Graphs, Totals, Buttons. What would be > "good > assertions" in this case? > > BTW, I am not the programmer of this development. I do know my way around > Java. I research a bit more and this is a GWT development and when I > recorded the above url I get (among many other things) these 3: > > url 1 looks like: /mainPortal/ui.html > url 2 looks like: /mainPortal/com.mycompnay.swt.mymodule.ui.nocache.js > url 3 looks like: /mainPortal/B895E5E418BB75D0FA2FC15B392635C3.cache.html > > After I added the View Results Tree as you suggested I found that the > Response Data tab, for the *.nocache.js url, shows a string like this: > "...wb='B895E5E418BB75D0FA2FC15B392635C3.cache.html'" which is part of the > url 3. > > Do you know a link that explains how can I extract this string using a > post-processor and regex/xpath extractor? > > Is the post processor a child of the second http request? > > Thanks, > > Rodolfo > > > > On Mon, Mar 1, 2010 at 3:45 PM, Deepak Shetty wrote: > > > >I run the test and everything is alright. No errors on Error % column. > > Merely means that there are no HTTP errors, not that there are no errors > , > > unless you add good assertions to your test , you cannot rely on this > > column > > >1) How do I know which urls not to include in the test plan (*.png, > *gif. > > etc). > > Because you should know what your app does and what is significant to it. > > In > > this case one of the previous request (probably the HTML one) should have > > had the path to this cache file and you should be able to dyanmically > > extract the name(using regex/xpath extractors) into a variable and use > the > > variable in your next request > > >2) Is this *.cache.html a url that I should include in my test > > You should know that. if you dont you'll have to ask the developers of > your > > app. If in doubt , include it. > > > > Add a View Results Tree Listener (or do a view source in the browser) and > > see which request has the path to your cache file and extract it using a > > post processor into a vraible. > > There should be examples in this mailing archive > > regards > > deepak > > > > > > On Mon, Mar 1, 2010 at 3:39 PM, Rodolfo Landa > >wrote: > > > > > Hi all, > > > > > > I recorded a test in my client A against a Server A (This is my > > "developer" > > > environment. The HTTP Requests that the Proxy Server returns have paths > > > like: > > > - *.html > > > - *.js > > > - *.css > > > - *.gif > > > - *.png > > > - *schema > > > > > > I deleted all except the ones ended with ".html" and moved them to a > Plan > > > that looks like: > > > > > > Test Plan My Test > > > Thread Group - Main Page > > > HTTP Request - url 1 > > > HTTP Header Manager (recorded by Proxy as well) > > > HTTP Request - url 2 > > > HTTP Header Manager > > > Summary Report > > > > > > Where: > > > > > > url 1 looks like: /mainPortal/ui.html > > > url2 looks like: > /mainPortal/B895E5E418BB75D0FA2FC15B392635C3.cache.html > > > > > > I run the test and everything is alright. No errors on Error % column. > > > > > > I take the Plan to the Client that is going to be used for running > JMeter > > > and change the Server Name to the real one (Staging). When I run the > plan > > I > > > get 100% error in the url with *.cache.html. > > > > > > If I re-record I noticed that url 1 is the same but url 2 is different > in > > > the big number between "/" and .cache.html. > > > > > > I have two questions: > > > > > > 1) How do I know which urls not to include in the test plan (*.png, > *gif. > > > etc). > > > 2) Is this *.cache.html a url that I should include in my test? If yes: > > is > > > there a way to use a variable so the url works in both environments. > > > > > > Regards, > > > > > > Rodolfo > > > > > > --000e0cd1b36e9ae1070480c73a88--