View on GitHub

Simple 5 users test using jmeter HTTP sampler

managing a number of threads

Download this project as a .zip file Download this project as a tar.gz file

‹ back to table of content

Here you've got lessons' files.

HTTP request

After this lesson you will be able to prepare simple test of http response. Always be careful when you run tests. It's easy to kill a server! This is why we only use 5 threads in this test. I'm currently working on vagrant box for you, then you will be able to kill your VM, but not your whole workstation. Secondly, never run all your threads in one second. You should specify "your ramp-up time" (red color on following screen). It'll usually kill your enviroument but it doesn't mean that your application works bad. It's sth like DDoS. Add "result tree" (blue color on following screen) element when you work on your scenario. It'll be easier to know how your test works.

jMeter number of threads

On following screen you can see how to add HTTP sampler element. This is one way to add all samplers to your test. So this is first and last time when I commit the screen;) Next time I'll give you only a sampler name. If you use http request defaults form 00 lesson, you only have to specify your path in the test. In my app I have lorem ipsum page on address /. This is why my path is emtpy.

how to add sampler in jmeter

Response Assertion

The most important think is to be sure about server response(following screen). If application is writen in realy bad way, it's possible that you see empty response with 200 response code. Always write simple assertion for your test. Your tests will be reliable. In the example response must contain header with "Lorem ipsum dolor sit amet" text.

response assertion in jmeter

Next screen shows you results tree element. You can find this in add > listener > add result tree. Violet color shows you really good fixture. You can render response as html page. It's more comfortable. You don't have to work only with HTML code. But remember, jMeter is not a browser. The app only download resource from your path. jMeter doesn't dowload resources like CSS, JS. You can specify that you would like to always download resource like those.

jmeter result tree

‹ back to table of content

comments powered by Disqus