Access log sampler Step-by-step This is a short tutorial on Jmeter’s access log sampler. The purpose of the access log sampler is to provide an easy way to simulate production trafic. There are several benefits to using access logs. 1 . rather than guess What users are doing, the test plan is using real traffic data 2. as the traffic pattern changes, the access log provides a record of individual changes and general shifts in usage 3. access logs contain a lot of useful data, which may provide some insight 4. ccess logs can be ln or’ users Sni* to View 5. access logs can ca The down side of usi onfigure the webserver to fferent types of formation ans isyou have to output the request information. This may not be appropriate where security is an issue. For example, if the webserver dumps the post data from each request to the access logs, users login and password would be stored in plain text. Here are some general cases where access logs might be inappropriate. 1 . ecurity sensitive applications where the data is encrypted 2. the application does not allow fine grain control of which request parameters are written to the access logs 3. the webserver cannot be configured to append the post data to he access log 4. the webserver is hosting multiple applications, but doesn’t a way to log the requests of one application to a separate file To take advantage of access logs, the first thing is the webserver needs to be configured to use extended log format.
Links for configuring the popular containers are provided below. BEA Weblogic – http://e•docs. bea. com/wls/docs70/adminguide /web server. html#113868 Tomcat – http://jakarta. apache. org/tomcat/tomcat-5. O-doc/config /valve. html Websphere – http://e-docs. bea. com/wIs/docs61/adminguide/web server. html#113868 Resn – http://MW/. caucho. com/resin-3. O/config/log. xtp#access -log ln some cases, it may be desirable to Write custom logging, so that sensitive information is not written to the access logs.
This article does not cover the techniques for writing custom logging. Step-by-Step 1. Start Jmeter 2. select « test plan » 3. right click add ->thread group 4. select thread group 5. right click add -> sampler -> access log sampler 6. right click on « thread group » add -> listener -> aggregate report 7. select the access log sampler 8. enter the ip address or hostname 9. enter the port 10. if you want to download the ima es, set « Parse images » to true.