Site icon Vinsguru

JMeter – Tips & Tricks for beginners

JMeter is my favorite & one of the best tools I have ever used. I am glad that you too would like to learn more about JMeter. If you are a beginner, then the below given information might be useful to you.

When I started learning JMeter first, to become good at it, I used to clarify JMeter related questions in StackOverFlow. While doing so, I noticed that most of the new users have some common questions & do some mistakes. Aim of this post is to share the best practices on using JMeter.

I assume you have JMeter installed, you know how to record, playback, meaning & basic usage of some important elements like Thread Group, HTTP Sampler etc

 

Tip #1: Exclude Static Files

 

Tip #2: Use Transaction/Simple Controller

 

Tip #3: Use HTTP Request Defaults

 

Tip #4:  Add Config Elements

 

Tip #5:  Correlation

[Image courtesy – guru99]

 

Tip #6:  Thread Count Vs Loop Count

 

Tip #7:  Listener

It does not matter if you want to generate a Aggregate Report or Summary Report or Graph Results or any report. JMeter writes a same set of information as result in xml / csv format for all the result files.

Tip #8:  Assertion

First ask yourself – What is wrong with the application in not letting you login when you provide invalid credentials? So why do we expect JMeter should fail the request? Showing error message that credentials are invalid – is functionally right. As long as It is functionally right, JMeter will not show the fail message. JMeter decides success/failure based on the HTTP Response Code.

 

Tip #9:  Running the Test

jmeter -n -t testplan.jmx -l result.jtl

jmeter -n -t testplan.jmx -l result.jtl -Djmeter.save.saveservice.output_format=csv

 

Tip #10:  Tweaking JVM

JVM_ARGS="-Xms512m -Xmx512m" jmeter.bat

 

 

 

Happy Testing 🙂

 

 

 

Share This:

Exit mobile version