RE: [Grinder-use] Can Grinder be made to Imitate the browser beha viour
Distributed load testing framework - Java, Jython, or Clojure scripts.
Brought to you by:
philipa
|
From: Fitzgerald, C. <Cal...@Th...> - 2006-04-25 14:38:57
|
When recording a script it is important to ensure that your browser cache= is empty because uptodate version of browsers won't make the GET request to = the server as the file is already in cache. With IE you can enable the settin= g to get content on every visit the the page which should effectively bypas= s the cache (I personally use this feature). If you know that there are elements still missing then you can add them manually to the script, assuming there aren't too many. Cheers Calum -----Original Message----- From: joh...@st... [mailto:joh...@st...]=20 Sent: Tuesday April 2006 15:14 To: joh...@st...; gri...@li....n= et; Philip Aston Subject: RE: [Grinder-use] Can Grinder be made to Imitate the browser behaviour I did a test with the IE 6.028: I surfed on google.de. entering the page = the first time the google images (req102-105) have been loaded by page1.=20 After that I surfed to the image-search (GET imghp) and than again back t= o the web-search (GET webhp) and so on. My intension was that the Images shoud not be retrieved again, because th= ey have been cached. The script below shows that they have no more beend requested. Is this because the IE Browser itsself decided to do no GET Request to the server for the images? And therefor the recorder did NOT record a second time the request of the images (hp0.gif,hp1.gif,hp2.gif,hp3.gif)?=20 I thought I would find the 304 response from the server, when I do a test like that. Where could I get that one? jo The script recorded by the http proxy looks like (only a part): def page1(self): """GET / (requests 101-105).""" result =3D request101.GET('/') grinder.sleep(60) request102.GET('/images/hp0.gif') request103.GET('/images/hp1.gif') grinder.sleep(30) request104.GET('/images/hp2.gif') request105.GET('/images/hp3.gif') return result def page2(self): """GET imghp (requests 201-202).""" self.token_hl =3D \ 'de' self.token_tab =3D \ 'wi' self.token_q =3D \ '' result =3D request201.GET('/imghp' + '?hl=3D' + self.token_hl + '&tab=3D' + self.token_tab + '&q=3D' + self.token_q) grinder.sleep(20) request202.GET('/intl/de_ALL/images/images_hp.gif') return result def page3(self): """GET webhp (request 301).""" self.token_tab =3D \ 'iw' result =3D request301.GET('/webhp' + '?hl=3D' + self.token_hl + '&tab=3D' + self.token_tab + '&q=3D' + self.token_q) return result def page4(self): """GET imghp (request 401).""" self.token_tab =3D \ 'wi' result =3D request401.GET('/imghp' + '?hl=3D' + self.token_hl + '&tab=3D' + self.token_tab + '&q=3D' + self.token_q) return result def page5(self): """GET webhp (request 501).""" self.token_tab =3D \ 'iw' result =3D request501.GET('/webhp' + '?hl=3D' + self.token_hl + '&tab=3D' + self.token_tab + '&q=3D' + self.token_q) return result ---------- Original Message ---------------------------------- From: "Philip Aston" <pa...@be...> Date: Tue, 25 Apr 2006 14:06:21 +0100 >In the out file, you'll see the cached hit responses return a 304 status code instead of a 200. You could also look at the data file, where you'll see the body length being small. >=20 >- Phil > > -----Original Message-----=20 > From: gri...@li... on behalf of joh...@st...=20 > Sent: Tue 25/04/2006 13:14=20 > To: gri...@li...=20 > Cc:=20 > Subject: RE: [Grinder-use] Can Grinder be made to Imitate the browser=20 >behaviour >=09 >=09 > > > thx for your quick repsonse! >=09 > 2. How could I check if the caching simulation works well. Could i see that in the recorded script or in the out.log file? >=09 > regards > jo >=09 > >---------- Original Message ---------------------------------- > >From: "Philip Aston" <pa...@be...> > >Date: Tue, 25 Apr 2006 10:51:36 =C3=B1=C2=A9=E2=82=AC=E2=80=9D > > > >>1. Yes. > >>2. Yes - the "If-Modified-Since" header is sent through to the server, so it will return "not modified" responses if appropriate. > >>3. Correct. BEA WLS web apps will typically be set up to be balanced (either with a WLS proxy plug in, or a h/w load balancer) across= a cluster and made sticky based on the user HTTP session; not the IP addres= s. (However, a few customers do chose to balance using the IP address). > >> > >> -----Original Message----- > >> From: joh...@st... [mailto:joh...@st...] > >> Sent: Tue 25/04/2006 10:13 > >> To: Philip Aston > >> Cc: > >> Subject: RE: [Grinder-use] Can Grinder be made to Imitate the browser behaviour > >> =20 > >> =20 > >> > >> Regarding simulating a browser... (and my work about the grinder). > >> =20 > >> 1.) Is it correct tha JS files are "only" downloaded and not executed. > >> =20 > >> 2.) Is it correct that caching is simulated by not downloading Get requests, which are marked as cached during the TCPProxy recording? > >> =20 > >> 3.) I think the grinder does currently not support IP Spoofing (Making each simulated sessions look like it's coming from a different IP address) How does this affect the load test of a BEA webapplication server and it's applications runnin on it? ( I believe the= re will not be any load balancing between the server nodes, for request comi= ng from the same agent. Is that correct? Are there any other influences?) > >> =20 > >> thx > >> Jo > >> =20 > >> =20 > >> =20 > >> =20 > >> =20 > >> =20 > >> =20 > >> ---------- Original Message ---------------------------------- > >> From: "Philip Aston" <pa...@be...> > >> Date: Tue, 25 Apr 2006 07:43:22 =C3=83=C2=B1=C3=82=C2=A9=C3=A2= =E2=80=9A=C2=AC=C3=A2=E2=82=AC=C2=9D > >> =20 > >> >(For those who want the background: > >> >http://grinder.sourceforge.net/faq.html#browserVsgrinder) > >> > > >> >I doubt The Grinder will ever be precisely like a browser. There's a > >> >possibility in that in the future there may be some secondary threads > >> >associated with each worker thread that would pull images etc. down > >> >through one of several connections; this would let the times be closer. > >> >The trick would be to do that without making the script horrendously > >> >complex. > >> > > >> >- Phil > >> > > >> > > >> > _____ > >> > > >> >From: gri...@li... > >> >[mailto:gri...@li...] On Behalf Of dhinakar k > >> >Sent: 25 April 2006 06:30 > >> >To: gri...@li... > >> >Subject: [Grinder-use] Can Grinder be made to Imitate the browser > >> >behaviour > >> > > >> > > >> >All, > >> > > >> >I am using Grinder for purposes like > >> >1.Blind Load Generation without caring for response times, > >> >2.For finding out pagewise response times, > >> >3.For Soak testing (Keep loading the server for long hours), > >> >4.Stress Testing (To keep increasing the concurrent users count until > >> >the application breaks down) > >> > > >> >But when I used for '2.', I initially did not know that Grinder did not > >> >create the "number of threads per page" like the browser does. I > >> >understand that it is always going to be a variant. But before using > >> >Grinder, if I use tools like IBM Page detailer and understand the > >> >browser and webserver behaviour for 1 user, can I do something in > >> >Grinder (like modifying the *.py script) so that Grinder creates thread > >> >like the browser does for each page? > >> > > >> >Currently I cannot take the page wise response times shown by the > >> >Grinder Results as they are incorrect. > >> > > >> >I usually create a load of xx concurrent users and then manually open > >> >the browser and go through the scenario and note down the page wise > >> >response times. But that also is not fully correct because the response > >> >times will differ when there is peak load, during idle/sleep times etc. > >> >So I need to take many samples when the load is acting on the server and > >> >take an average of them to get some what exact page wise response times. > >> > > >> > > >> >Anyone have similar kind of issues? or have got some easy ways to get > >> >somewhat accurate (say, +/- 1 or 2 secs tolerance) pagewise response > >> >times? > >> > > >> >Thanks in advance, > >> > > >> >Dhinakar > >> >_______________________________________________________________________ > >> >Notice: This email message, together with any attachments, may contain > >> >information of BEA Systems, Inc., its subsidiaries and affiliated > >> >entities, that may be confidential, proprietary, copyrighted and/or > >> >legally privileged, and is intended solely for the use of the individual > >> >or entity named in this message. If you are not the intended recipient, > >> >and have received this message in error, please immediately return this > >> >by email and then delete it. > >> > > >> > > >> =20 > >> =20 > >> =20 > >> =20 > >> =20 > >> =20 > >> > >>_______________________________________________________________________ > >>Notice: This email message, together with any attachments, may contain > >>information of BEA Systems, Inc., its subsidiaries and affiliated > >>entities, that may be confidential, proprietary, copyrighted and/or > >>legally privileged, and is intended solely for the use of the individual > >>or entity named in this message. If you are not the intended recipient, > >>and have received this message in error, please immediately return this > >>by email and then delete it. > >> > > > > > > > > > > > > > > =20 > > > > >=09 >=09 >=09 >=09 > =20 >=09 >=09 >=09 > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=120709&bid&3057&dat=121642 > _______________________________________________ > Grinder-use mailing list > Gri...@li... > https://lists.sourceforge.net/lists/listinfo/grinder-use >=09 > >_______________________________________________________________________ >Notice: This email message, together with any attachments, may contain=20 >information of BEA Systems, Inc., its subsidiaries and affiliated=20 >entities, that may be confidential, proprietary, copyrighted and/or=20 >legally privileged, and is intended solely for the use of the=20 >individual or entity named in this message. If you are not the intended=20 >recipient, and have received this message in error, please immediately=20 >return this by email and then delete it. >R=C3=88=C2=A7=E2=82=AC=19=C3=AB@=0E=C5=92'=E2=80=93=E2=80=A0=C2=9D=E2=80= =A0=C3=9Bi=1A=C2=B8=C2=A7u=C3=AA=C3=80=1A=C2=B8=C2=A7u=C3=AA=C3=80=E2=80=A0= =C3=9Bi=C2=B0 =20 =20 =20 ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 _______________________________________________ Grinder-use mailing list Gri...@li... https://lists.sourceforge.net/lists/listinfo/grinder-use |