This is part five of our Setup process. Part four can be found here: http://dudewheysmehblog.blogspot.com/2011/08/jmeter-process-setup-04-createpopulate.html
Located in the bin folder are a few files comes with JMeter to tweak it's configuration: httpclient.parameters, jmeter.properties, saveservice.properties, system.properties, upgrade.properties, and user.properties. We will edit the jmeter.properties and create our own properties file: extra.properties (both are included in the bundles here https://docs.google.com/leaf?id=0Byis5NEZXwweMTgyZTc3MDktNzU5Yy00ZDAyLTg2NzktNzgzNTBiZjk2ZWI3&hl=en_US).
Located in the bin folder are a few files comes with JMeter to tweak it's configuration: httpclient.parameters, jmeter.properties, saveservice.properties, system.properties, upgrade.properties, and user.properties. We will edit the jmeter.properties and create our own properties file: extra.properties (both are included in the bundles here https://docs.google.com/leaf?id=0Byis5NEZXwweMTgyZTc3MDktNzU5Yy00ZDAyLTg2NzktNzgzNTBiZjk2ZWI3&hl=en_US).
Note: If you wish, you can replace your default jmeter.properties with the one from the bundle, or you can edit your own. The same thing goes for the extra.properties -- you can create it from scratch or you can use / tweak the one from the bundle.
The Jmeter.properties file
Edit the jmeter.properties file (I prefer to use Notepad++ do do any text editing, because of the color coding and because of the powerful search/replace features).
Anything which has a Hash/Pound sign (#) in front of it is commented out.
With this file you can edit anything from the default file names/extensions, to how the JMeter GUI looks, to your remote hosts, etc..
We are interested in editing a few things here:
- Remote hosts and RMI configuration (~line 117).
- Here is where we will enter the IP addresses of the remote machines which will be executing the load/performance tests. The machine you are currently setting it up on will be the master JMeter (which you will run in normal mode, or command line mode), and the other machines will be running the JMeter server, waiting for instructions from the master JMeter. Right now, we can just use the default setup (remote_hosts=127.0.0.1), but when we are interested in load balancing the test or generating more load, we will edit this file to have the IP addresses of each machine. Note, this also reflects in the GUI mode, so if you enter another machine's IP address, you will see it in the GUI where you can choose to run the test on that machine.
- Also, I like to keep a commented out list of different Machines' IP addresses, so that it is easy edit when needed (without having to go to the machine and do an ipconfig each time).
- Results file configuration (~line 296).
- You can find out more about this section here. I will go into more detail on the JTL file in a future post.
- We want to un-comment the following:
- jmeter.save.saveservice.assertion_results -- change to all
- So that all of the assertions are captured in the JTL file.
- jmeter.save.saveservice.subresults -- change to false
- So that subresults are not captured. I believe subresults are images, js, css, files associated with a page. This makes the JTL a little smaller. If you need to monitor these times as well, you can leave this commented.
- jmeter.save.saveservice.url -- change to true
- The url is saved along with each result in the JTL file.
- jmeter.save.saveservice.filename -- change to true
- The filename of the script which is being run is saved with each result in the JTL file.
- jmeter.save.saveservice.thread_counts -- change to true
- The thread count is displayed for each result in the JTL file.
- jmeter.save.saveservice.sample_count -- change to true
- The sample count is displayed for each result in the JTL file.
- JMeter Proxy recorder configuration (~line 382).
- We want to un-comment the following:
- proxy.pause -- change to 3000
- This changes the pause between recording with the proxy from 1 second to 3 seconds. I find this is helpful because some resources take longer than a minute to load; this usually ends up messing up my organization/folders when recording. 3 seconds (3000 ms) seems to be a good delay time -- after clicking a page, wait for everything to load, then wait 3 seconds before clicking on the next page.
- proxy.number.requests
- This causes the proxy to insert numbers before each request it records, so instead of it showing up as PageName, it will show up as 1 PageName. This is helpful if you come back to the page multiple times, and you want to see each time separately. If you want all of them to be together, you can leave this commented.
- Summariser configuration (mainly applies to non-GUI mode) (~line 509).
- We want to un-comment the following:
- summariser.name
- Having this un-commented will start the summariser in non-GUI mode. This is helpful because it shows how many tests have been run so far, how many threads are running, etc..
- summariser.interval -- change to 15
- This shows the summary every 15 seconds instead of every 180 seconds, which is helpful for short tests. Please note this bloats the log file.
- summariser.log
- Having this un-commented will write messages to the log file. At this moment, I'm not sure which log file it is, but having the information stored is a good thing. I'll update the location when I find out.
- summariser.out
- Having this un-commented will print the summariser output to the console screen as the test is running. The way we have this set up, this information will be stored in the log file which will be mailed after the test is completed. If you want to see how far the test is at a given moment while it is running though, you'll have to navigate to the log file and open it. If you want to refresh it, you'll have to close it, refresh your windows explorer, and re-open the file.
The Extra.properties file
The next file we will need is another properties file which will hold parameters for the tests, variables for our build file, and other configurations needed to get everything to work.
I decided to call it extra.properties, and it will be referenced in our build.xml file.
The file has the following sections:
I decided to call it extra.properties, and it will be referenced in our build.xml file.
The file has the following sections:
- Test Parameters
- This is the section you will probably change the most frequently. It contains variables used in the build file to specify the number of threads JMeter should use to run the test, the rampup time for the test, the number of times the test should run, whether we are using remote machines or not, the name of the PerfMon counter set and the UserName/Password for the local admin on the machine with the counter set.
- Email Settings
- This section you will probably only need to update once. It contains the computer name/IP address of the computer which will be sending the email, along with the From && ReplyTo email addresses.
- Other
- You will probably not need to change this section. It sets which xslFile will be used by default, what the filename extensions are (XSL, JMX, JTL), and the naming convention for results.
- Paths
- If you are following the folder structure so far, you won't have to change this section. This defines which folders are where, along with the base paths (home and main).
Things to note:
- Just like the jmeter.properties file, any thing that has a # at the beginning of the line is commented out.
- Some values are commented out such as threads, rampup, and loops. This is because your JMeter script needs to be setup in a way to incorporate these values. See here for more information.
- For the process to work, you must enter working values of the following:
- counterName
- When we set up PerfMon counters (possibly in Process Setup 09), we will create the counter which needs to be entered in here.
- compU
- This needs to be a user who is able to run the LogMan Performance Counter Update.
- compP
- This needs to be the password for a user who is able to run the LogMan Performance Counter Update.
- mailHost
- Info can be found here. This is the Host name of the SMTP server -- localhost by default.
- mailFrom
- Info can be found here. This is the email address of the sender.
- mailReply
- Info can be found here. This is the Replyto email address.
- Please keep all of this in mind when going through this and the build file.
Please go through the extra.properties file included in the bundle and get a feel for what each item is. You will know whether or not you want to add more after we go through the build file, because this directly feeds into it.
In the next post, we will go through the build file and explain what exactly is going on!
Part Six can be found here: http://dudewheysmehblog.blogspot.com/2011/09/jmeter-process-setup-06-explaining.html
Part Six can be found here: http://dudewheysmehblog.blogspot.com/2011/09/jmeter-process-setup-06-explaining.html
No comments:
Post a Comment