Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 43766 invoked from network); 3 Dec 2009 00:49:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Dec 2009 00:49:56 -0000 Received: (qmail 87889 invoked by uid 500); 3 Dec 2009 00:49:55 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 87817 invoked by uid 500); 3 Dec 2009 00:49:55 -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 87807 invoked by uid 99); 3 Dec 2009 00:49:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2009 00:49:55 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2009 00:49:52 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NFzsx-0001np-Gv for jmeter-user@jakarta.apache.org; Wed, 02 Dec 2009 16:49:31 -0800 Message-ID: <26619192.post@talk.nabble.com> Date: Wed, 2 Dec 2009 16:49:31 -0800 (PST) From: Harry_ To: jmeter-user@jakarta.apache.org Subject: Re: Accept Terms and Conditions checkbox not working through jMeter In-Reply-To: <4483c26c0912021626x2b9f560cucc514404031a3097@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: harjitworks@gmail.com References: <26612532.post@talk.nabble.com> <4483c26c0912020919sf87ad7fjc0d9fa49472a9d8d@mail.gmail.com> <26616337.post@talk.nabble.com> <4483c26c0912021346tffdd955jf92992eb619151e1@mail.gmail.com> <4483c26c0912021350y566bf3c8o80ee3d8ce705b180@mail.gmail.com> <26618806.post@talk.nabble.com> <4483c26c0912021626x2b9f560cucc514404031a3097@mail.gmail.com> Hi Deepak, I can only read when I am having response of the page. Suppose I am on login page. I make corresponding Http Request Sampler for this. Now if the user has not accepted the conditions then user is taken to Accept Terms and Conditions page. The page address is something like: http://test/acceptterms/userid/[some random combination of alphanumeric characters] and random form id in the page. So how can I get to this page through jmeter when I do not know in advance what will be the random characters in url. If somehow, if jmeter can take me to the page which comes up after login, and tell me its URL and its source. Then I can use Regex Post processor to extract necessary information and hit this url with appropriate values. But I dont know whether jmeter can do this or not. Regards Deepak Shetty wrote: > > Hi >>And how do i extract form ID. > Regex Post processor (or xpath or any of the other post processors that > work) >>I have no information about this page during http request for login. > Yes you do , your application always behaves in the same way right. you > know > that there will be a form which has a dynamic value. You either know the > name or the location where this will be and you can extract and send it. > you > can also have conditionals that check either the url or content (if > controllers) and vary the next request accordingly. > > regards > deepak > > On Wed, Dec 2, 2009 at 4:21 PM, Harry_ wrote: > >> >> Yes I am using Cookie Manager. >> >> I am able to visit pages for logged on users (provided Accept Terms & >> Conditions is already accepted for user). If I dont use cookie manager, i >> get Forbidden errors. >> >> And how do i extract form ID. >> >> Suppose I enter User name and password and click Submit (JMeter HTTP Post >> request with params). Now I get another page which has form with dynamic >> form ID. I have no information about this page during http request for >> login. How can I know the ID of the page. >> >> Is there any way by which I can get this information. Like I click on on >> login by providing credentials and I get information about the resulting >> page source (Accept Terms and Conditions in our case.) So that I can pass >> necessary information to the resulting page. >> >> Regards >> >> >> Deepak Shetty wrote: >> > >> > Also have you added the CookieManager >> > >> > On Wed, Dec 2, 2009 at 1:46 PM, Deepak Shetty >> wrote: >> > >> >> Hi >> >> not sure what you are referring to , but you need to check >> >> a. The request itself seems to be to a dynamically generated url. Are >> you >> >> extracting this out from the previous request correctly? the form >> build >> >> id >> >> parameter too seems to be dynamic, are you extracting this correctly >> (or >> >> are >> >> you just sending out recorded values ) >> >> b. In your previous message you specified that it works for 1 user. >> Does >> >> the test work only for the recorded user or does it work the first >> time? >> >> If >> >> the problem was in cookies you need to see the request after >> set-cookie, >> >> if >> >> jmeter does send the cookies then the problem isn't there. >> >> you need to check what your script is doing. >> >> regards >> >> deepak >> >> >> >> >> >> >> >> On Wed, Dec 2, 2009 at 12:59 PM, Harry_ wrote: >> >> >> >>> >> >>> I checked the headers using "Live HTTP Headers" and in "View Result >> >>> Tree". >> >>> >> >>> The difference is in setting Cookie. Is it something why my test is >> not >> >>> accepting the terms and conditions. If yes how do I set these cookies >> in >> >>> jMeter, if it is not doing by itself. >> >>> >> >>> >> >>> Live HTTP Headers Shows: >> >>> >> >>> http://test/legal_accept/56008/3e787bed9257fd643a45a0f2c25fe1aa >> >>> >> >>> >> >>> >> >>> POST /legal_accept/56008/3e787bed9257fd643a45a0f2c25fe1aa HTTP/1.1 >> >>> >> >>> Host: test >> >>> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.0.15) >> >>> Gecko/2009102815 Ubuntu/9.04 (jaunty) Firefox/3.0.15 >> >>> >> >>> Accept: >> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 >> >>> >> >>> Accept-Language: en-gb,en;q=0.5 >> >>> >> >>> Accept-Encoding: gzip,deflate >> >>> >> >>> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 >> >>> >> >>> Keep-Alive: 300 >> >>> >> >>> Connection: keep-alive >> >>> >> >>> Referer: >> http://test/legal_accept/56008/3e787bed9257fd643a45a0f2c25fe1aa >> >>> >> >>> Cookie: >> __utma=236072452.573991268.1259585934.1259771130.1259784337.4; >> >>> >> >>> >> __utmz=236072452.1259585934.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); >> >>> SESSdaebf48ce4666186eb29a7f5b9e90b00=3pfe3c5cfn5di2dbebivfs4at0; >> >>> __utmv=236072452.authenticated%20user%2Cadministrator%3A%3A%3A%3A%3A; >> >>> has_js=1; __utmc=236072452; _csoot=1259775258852; >> >>> _csuid=4ae6d3624bed3faf; >> >>> __utmb=236072452.53.10.1259784337; DRUPAL_LOGGED_IN=Y >> >>> >> >>> Content-Type: application/x-www-form-urlencoded >> >>> >> >>> Content-Length: 98 >> >>> >> >>> >> >>> >> form_build_id=form-9565758b95b12d94f330804f32f13449&form_id=legal_login&legal_accept=on&op=Confirm >> >>> >> >>> HTTP/1.x 302 Found >> >>> >> >>> Date: Wed, 02 Dec 2009 20:47:31 GMT >> >>> >> >>> Server: Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8e-fips-rhel5 >> >>> PHP/5.2.9 >> >>> >> >>> X-Powered-By: PHP/5.2.9 >> >>> >> >>> Cache-Control: no-store, no-cache, must-revalidate, post-check=0, >> >>> pre-check=0 >> >>> >> >>> Pragma: no-cache >> >>> >> >>> Set-Cookie: DRUPAL_LOGGED_IN=Y; expires=Tue, 01-Dec-2009 20:47:31 >> GMT; >> >>> path=/ >> >>> >> >>> Set-Cookie: ns_remember=deleted; expires=Tue, 02-Dec-2008 20:47:31 >> GMT; >> >>> path=/ >> >>> >> >>> Set-Cookie: DRUPAL_LOGGED_IN=Y; expires=Sat, 26-Dec-2009 00:20:52 >> GMT; >> >>> path=/ >> >>> >> >>> Expires: Sun, 19 Nov 1978 05:00:00 GMT >> >>> >> >>> Last-Modified: Mon, 23 Apr 2010 02:00:32 GMT >> >>> >> >>> Etag: "d41d8cd98f00b204e9800998ecf8427e" >> >>> >> >>> X-Drupal: loggedin >> >>> >> >>> Location: http://test/ >> >>> >> >>> Content-Length: 0 >> >>> >> >>> Connection: close >> >>> >> >>> Content-Type: text/html; charset=utf-8 >> >>> >> >>> >> >>> ---------- >> >>> >> >>> View Result Tree Headers Shows: >> >>> >> >>> Sampler Result Tab >> >>> >> >>> Thread Name: Thread Group 1-1 >> >>> Sample Start: 2009-12-02 20:25:31 GMT >> >>> Load time: 518 >> >>> Latency: 518 >> >>> Size in bytes: 0 >> >>> Sample Count: 1 >> >>> Error Count: 0 >> >>> Response code: 302 >> >>> Response message: Found >> >>> >> >>> Response headers: >> >>> HTTP/1.1 302 Found >> >>> Date: Wed, 02 Dec 2009 20:25:50 GMT >> >>> Server: Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8e-fips-rhel5 >> >>> PHP/5.2.9 >> >>> X-Powered-By: PHP/5.2.9 >> >>> Set-Cookie: >> >>> SESSdaebf48ce4666186eb29a7f5b9e90b00=mpaspit0fcl9rmp5r2nv5agtg0; >> >>> expires=Fri, 25-Dec-2009 23:59:10 GMT; path=/; domain=.test >> >>> Expires: Sun, 19 Nov 1978 05:00:00 GMT >> >>> Last-Modified: Mon, 23 Apr 2010 02:00:32 GMT >> >>> Cache-Control: post-check=0, pre-check=0 >> >>> ETag: "d41d8cd98f00b204e9800998ecf8427e" >> >>> Location: http://test/ >> >>> Content-Length : 0 >> >>> Connection: close >> >>> Content-Type: text/html; charset=utf-8 >> >>> >> >>> >> >>> HTTPSampleResult fields: >> >>> ContentType: text/html; charset=utf-8 >> >>> DataEncoding: utf-8 >> >>> --------------------------------- >> >>> Request Tab >> >>> >> >>> POST http://test/legal_accept/56005/1c54c8bf3308d9138388b77d7b0911bf >> >>> >> >>> POST data: >> >>> >> >>> >> form_build_id=form-3b21145374b980b87ef4fd87e64f625a&form_id=legal_login&legal_accept=on&op=Confirm >> >>> >> >>> [no cookies] >> >>> >> >>> Request Headers: >> >>> Accept-Language: en-gb,en;q=0.5 >> >>> Content-Length: 98 >> >>> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 >> >>> Referer: >> http://test/legal_accept/56005/1c54c8bf3308d9138388b77d7b0911bf >> >>> Accept-Encoding< >> http://test/legal_accept/56005/1c54c8bf3308d9138388b77d7b0911bf%0AAccept-Encoding >> >: >> >>> gzip,deflate >> >>> Keep-Alive: 300 >> >>> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.0.15) >> >>> Gecko/2009102815 Ubuntu/9.04 (jaunty) Firefox/3.0.15 >> >>> Connection: keep-alive >> >>> Content-Type: application/x-www-form-urlencoded >> >>> Accept: >> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 >> >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> >>> Deepak Shetty wrote: >> >>> > >> >>> > All of these class of problems are covered by 'Why does Jmeter not >> >>> behave >> >>> > like my browser' covered in >> >>> > http://wiki.apache.org/jakarta-jmeter/DifferentBehaviour. And all >> need >> >>> you >> >>> > to understand how your application behaves(any browser tool like >> >>> > fiddler/livehttpheaders) v/s what Jmeter is sending(view results >> >>> tree). >> >>> > >> >>> > If i have to guess, your application probably stores the acceptance >> as >> >>> a >> >>> > cookie, and the second iteration (for the different user) probably >> >>> does >> >>> > something wrong. perhaps you clear the cookies and dont set it, >> >>> perhaps >> >>> > you >> >>> > get the earlier cookie, you need to .This is a guess , we dont >> know, >> >>> check >> >>> > your application against what you have specified in jmeter >> >>> > regards >> >>> > deepak >> >>> > >> >>> > On Wed, Dec 2, 2009 at 9:07 AM, Harry_ >> wrote: >> >>> > >> >>> >> >> >>> >> Hi, >> >>> >> >> >>> >> I have created a test plan using HTTP Proxy Server recording the >> >>> >> following >> >>> >> sequence. >> >>> >> >> >>> >> 1. New User Login to System with valid user name and Password. >> >>> >> 2. Accepts the terms and conditions (This sends post information >> to >> >>> >> server >> >>> >> that user is accepting terms and conditions. This happens only >> once.) >> >>> >> 3. Now user can navigate various pages of the site which are >> >>> accessible >> >>> >> to >> >>> >> login user. >> >>> >> >> >>> >> Now when I re-run this test with different new user with different >> >>> >> username/password from csv file, i get the following error for >> pages >> >>> of >> >>> >> third step. >> >>> >> >> >>> >> Response code: 403 >> >>> >> Response message: Forbidden >> >>> >> >> >>> >> First two steps shows success and I have checked that jMeter >> during >> >>> the >> >>> >> run >> >>> >> sends terms and condition accept params to the server of step2. >> >>> >> >> >>> >> But the terms and conditions are still not accepted that is why we >> >>> get >> >>> >> the >> >>> >> error on pages of step 3. >> >>> >> >> >>> >> Now can anyone point me where could be the problem. Why Post >> params >> >>> sent >> >>> >> through jMeter for checkboxes is not accepted by the server. >> >>> >> >> >>> >> The problem seems to be with check boxes only. Because if I had >> >>> already >> >>> >> accepted the terms and conditions, jmeter works fine for every >> >>> request. >> >>> >> >> >>> >> If this a defect can anyone suggest me a workaround. I have to >> work >> >>> with >> >>> >> checkboxes quite often, so I am facing this problem everywhere. >> >>> >> >> >>> >> Thanks and Regards >> >>> >> -- >> >>> >> View this message in context: >> >>> >> >> >>> >> http://old.nabble.com/Accept-Terms-and-Conditions-checkbox-not-working-through-jMeter-tp26612532p26612532.html >> >>> >> Sent from the JMeter - User mailing list archive at Nabble.com. >> >>> >> >> >>> >> >> >>> >> >> --------------------------------------------------------------------- >> >>> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org >> >>> >> For additional commands, e-mail: >> jmeter-user-help@jakarta.apache.org >> >>> >> >> >>> >> >> >>> > >> >>> > >> >>> >> >>> -- >> >>> View this message in context: >> >>> >> http://old.nabble.com/Accept-Terms-and-Conditions-checkbox-not-working-through-jMeter-tp26612532p26616337.html >> >>> Sent from the JMeter - User mailing list archive at Nabble.com. >> >>> >> >>> >> >>> --------------------------------------------------------------------- >> >>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org >> >>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org >> >>> >> >>> >> >> >> > >> > >> >> -- >> View this message in context: >> http://old.nabble.com/Accept-Terms-and-Conditions-checkbox-not-working-through-jMeter-tp26612532p26618806.html >> Sent from the JMeter - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org >> >> > > -- View this message in context: http://old.nabble.com/Accept-Terms-and-Conditions-checkbox-not-working-through-jMeter-tp26612532p26619192.html Sent from the JMeter - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org