JMeter
JMeter
Is for a bunch of people who want to automate the shit out of their load testing. If you don’t have 10,000 friends and/or you just want to kill some time, then this is the software for you.
What is JMeter?
No clue how to say this in technical terms so let’s do it in layman terms.
Disclaimer: I’ve been playing around with JMeter for a grand total of about 23 Jminutes… so I am the best person to ask about it. And considering you’re on this ghetto ass blog I Jmust be right.
JMeter conducts load testing on sites by simulating any number of users hitting specific API endpoints. It can configure your required authentications (such as cookies) and extract variables from payloads so that they can be used in following steps. For example, it can access a home page (GET), create a new user (POST), and immediately access that new user’s profile (GET) by ID. And it can also do 10,000 of that in a split second.
How to JMeter?
Out of the 23 Jminutes I spent playing around with JMeter, about half of it was put to figuring out how to get the software up in the first place. And because I had selective hearing back in school I knew I had to type the command java -jar ApacheJMeter.jar but I missed the part where I had to have Java on my machine.
After approximately 11.5 Jminutes of cursing a Windows laptop, I finally downloaded Java and JMeter and Jmanaged to run the ApacheJMeter.jar file from bin.
Creating Tests:
Once you open a new file, you can then close it and go to Jbed right click on Test Plan option… where you will see more options. Here are some things that you might want to do if this is your first time:
- Right click on Test Plan > Add > Threads (Users) > Thread Groups
- Fill in Thread Properties (No. of Threads / Ramp-up Period / Loop Count)
- Right click on Thread Group > Add > Config Element > HTTP Header Manager
- Right click on Thread Group > Add > Listener > View Results Tree
- Right click on Thread Group > Add > Sampler > HTTP Request
At this point in my blog I haven’t figured out how to annotate the individual points on the numbered list above so I shall just create another list below explaining what each step did.
- This created a group of threads, which can be considered as users, like people.
- We can change the number of users here and decide the window of time for users to start flowing in.
- Any authentication cookies that you may need can be set here as variables.
- All results will be shown here, including the requests and response of each action you have configured. By far the most important step, hence I put it 4th.
- This is the “action” that I have just mentioned in step 4. You set parameters such as Protocol. Server Name/IP, Port, Method, Path, etc.
Maybe in future I will actually put in effort to build this website and I can annotate the steps properly. But for now this would just have to do.
Conclusion
If you’ve read this far congratulations, you now know JMeter. Please hesitate to ask me anything related to JMeter (or not), for I am but a mere opinionated dumbo. Adios amigo!