- jMeter Tutorial
- jMeter - Home
- jMeter - Overview
- jMeter - Environment
- jMeter - Build Test Plan
- jMeter - Test Plan Elements
- jMeter - Web Test Plan
- jMeter - Database Test Plan
- jMeter - FTP Test Plan
- jMeter - Webservice Test Plan
- jMeter - JMS Test Plan
- jMeter - Monitor Test Plan
- jMeter - Listeners
- jMeter - Functions
- jMeter - Regular Expressions
- jMeter - Best Practices
jMeter - Best Practices
JMeter has some limitations especially when it is run in a distributed environment. Following these guidelines will assist in creating a real and continuous load −
Use multiple instances of JMeter in case, the number of threads are more.
Check the Scoping Rules and design accordingly.
Use naming conventions always for all elements.
Check the default browser Connectivity settings, before executing scripts.
Add Listeners appropriately.
Here are some suggestion to reduce resource requirements −
Use non-GUI mode: jmeter -n -t test.jmx -l test.jtl.
Use as few Listeners as possible; if using the -l flag as above, they can all be deleted or disabled.
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.
Rather than using lots of similar samplers, use the same sampler in a loop, and use variables (CSV Data Set) to vary the sample. Or perhaps use the Access Log Sampler.
Do not use functional mode.
Use CSV output rather than XML.
Only save the data that you need.
Use as few Assertions as possible.
Disable all JMeter graphs as they consume a lot of memory. You can view all of the real time graphs using the JTLs tab in your web interface.
Do not forget to erase the local path from CSV Data Set Config if used.
Clean the Files tab prior to every test run.