/ testing

Jmeter Best Practices

1) Do not use the Console to create your load:

You can use the console for debugging purposes or to run a small load from it to make sure the script is running correctly. The GUI consumes a lot of memory under heavy load; therefore the console server by itself cannot sustain a heavy load.

2) Use the remote servers to create the load:

Use the “Remote Start All” or “Remote Start” individual servers.

3) Limit the number of threads per engine to 300:

This means the total number of threads generated by your test plan should be less than 300.

4) Disable the “View Result Tree” listener:

As it consumes a lot of memory and can result in the console freezing or JMeter running out of memory. It is, however, safe to use the “View Result Tree” listener with only “Errors” checked.

http://s29.postimg.org/z1qljmc3b/Jmeter.png

5) Disable all JMeter graphs:

As graphs consume lot of memory,you can view all of the real time graphs using the JTLs tab in your web interface.

6) Monitor the logs.

Any errors in the test plan or the test itself will appear in the log files that are available online under the Logs tab. For example: Out of Memory, disconnections etc.

7) Use non-GUI mode:

Steps to follow:

a) Open Command Prompt

b) Navigate to the Jmeter bin folder

c) Run: jmeter -n -t Test.jmx -l TestResult.jtl. (where ‘test’ is our file name)

http://content.screencast.com/users/sudhir-shetty/folders/Jing/media/bfcc16a5-4e56-4aba-b56b-5089647e575c/2014-03-10_1407.png

http://content.screencast.com/users/sudhir-shetty/folders/Jing/media/625ba29f-b7f1-41f4-9530-c18e0ec16552/CMD.png

http://content.screencast.com/users/sudhir-shetty/folders/Jing/media/85552ced-21e8-4baa-ac82-c1fad4aa7dad/Result.png