Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 7552 invoked from network); 20 Jan 2009 18:51:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Jan 2009 18:51:28 -0000 Received: (qmail 73278 invoked by uid 500); 20 Jan 2009 18:51:25 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 73264 invoked by uid 500); 20 Jan 2009 18:51:25 -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 73253 invoked by uid 99); 20 Jan 2009 18:51:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jan 2009 10:51:25 -0800 X-ASF-Spam-Status: No, hits=-1.4 required=10.0 tests=NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_MED,RCVD_NUMERIC_HELO,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [137.191.227.44] (HELO prim-smtp-2.revenue.ie) (137.191.227.44) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 20 Jan 2009 18:51:16 +0000 Received: from localhost (localhost [127.0.0.1]) by prim-smtp-2.revenue.ie (Postfix) with ESMTP id AA4757DC880 for ; Tue, 20 Jan 2009 18:50:53 +0000 (GMT) X-Virus-Scanned: by Copperfasten Mail Firewall at revenue.ie Received: from revjnrdcont03 (unknown [25.4.1.90]) by prim-smtp-2.revenue.ie (Postfix) with ESMTP id 66E6E7DC856 for ; Tue, 20 Jan 2009 18:50:53 +0000 (GMT) Received: from localhost ([25.4.1.89]) by revjnrdcont03 with InterScan Message Security Suite; Tue, 20 Jan 2009 18:50:23 -0000 Received: from 25.3.1.211 ([25.3.1.211]) by localhost (PostX Enterprise 5.3.1 SMTP Adapter) with SMTP ID 282 for ; Tue, 20 Jan 2009 18:50:43 +0000 (GMT) Received: from REVMAIL02.RevenueDomain.ie ([25.34.1.72]) by savgw2.revenuedomain.ie (SMSSMTP 4.1.11.41) with SMTP id M2009012018504314453 for ; Tue, 20 Jan 2009 18:50:43 GMT content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Subject: RE: Redirects on HTTP Request Date: Tue, 20 Jan 2009 18:50:43 -0000 Message-ID: <2AB2B3C160BFC14CB0D94D437513C3BA019504D3@revmail02.revenuedomain.ie> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Redirects on HTTP Request Thread-Index: Acl7L/4mZROWHfCDQjKZq6PvE/XPUA== From: "Fitzpatrick, Adrian" To: "JMeter Users List" X-Virus-Checked: Checked by ClamAV on apache.org Hi David, Interesting question! I haven't tried this, but it might be possible to achieve this something like: - Put each HTTP request sampler which can have redirects in a while loop controller, with a boolean flag controlling whether the loop should be execute. Intially set this flag to TRUE - Set the server part of the URL for the sampler to the correct server address, and the path part to a variable - say call it URL_PATH. Initialise URL_PATH to the initial path - "/someapp/servlet" per your example - Add a bean shell post processor (BSPP) to the sampler. The BSPP should check the response from the sample to see if it a redirect. If so, it= should update URL_PATH to the redirect location. If not, the BSPP should set the loop control variable to FALSE I THINK this structure would allow to follow redirects on the same server= to an infinite depth. Its fairly convoluted, so there may well be a much= easier way! However, once you have it working for 1 URL, it should be the same for all others. Let me know how you get on! - Adrian -----Original Message----- From: David Provan [mailto:daveprovan@hotmail.com] Sent: 20 January 2009 17:28 To: JMeter List Subject: RE: Redirects on HTTP Request Hi, I considered this, however the product we're testing against can throw 1 to= n redirects (the largest number I have seen so far is 7 in a row). Otherwise that would work nicely! For example /someapp/servlet redirects to /someapp/another_servlet redirects to /someapp/next_servlet redirects to /someapp/final_servlet Thanks David. > Subject: RE: Redirects on HTTP Request > Date: Tue, 20 Jan 2009 12:24:25 -0500 > From: Steve.Kapinos@tandberg.com > To: jmeter-user@jakarta.apache.org >=20 > Why not follow the redirect manually rather then automatically? Extract > the path from the response header with regex and feed that as your path > into the next sample. How can Jmeter know which server you want to hit? > You need to tell it explicitly. >=20 > -----Original Message----- > From: David Provan [mailto:daveprovan@hotmail.com]=20 > Sent: Tuesday, January 20, 2009 12:17 PM > To: JMeter List > Subject: Redirects on HTTP Request >=20 >=20 > Hi, >=20 > I am using HTTP Request nodes to sample against a site however we have > come accross an issue when redirecting. >=20 > I have multiple HTTP Servers so to ensure I "hit" the correct one I use > the HTTP Header Manager to set a "Host" attribute in the HTTP Request > sample set the IP address to hit >=20 > e.g. http://1.2.3.4/some/servlet >=20 > The code I am hitting then sends a redirect which JMeter will > automatically follow, however the returning redirect contains the host > not the IP address so I no longer can be sure of the web server I am > testing against. >=20 > For example. >=20 > I request http://1.2.3.4/some/servlet (Host: header set to > www.example.com). >=20 > This returns a redirect of http://www.example.com/its/moved/to/here. >=20 > Is it possible in JMeter to replace the returned www.example.com in the > redirect URL with the IP address? >=20 > Thanks in advance for any assistance. >=20 > David Provan >=20 > _________________________________________________________________ > Choose the perfect PC or mobile phone for you > http://clk.atdmt.com/UKM/go/130777504/direct/01/ >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org >=20 _________________________________________________________________ Are you a PC?=A0 Upload your PC story and show the world http://clk.atdmt.com/UKM/go/122465942/direct/01/ ************************ This message has been delivered to the Internet by the Revenue Internet= e-mail service (OP) ************************* --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org