1/30/2024 0 Comments Apache jmeter performance testingStep 4 : Now you are ready to for request to server but sometimes you need to check the response and other thing so for that click on the thread group then add -> listner -> view result treeįinal Step : To execute the request, click on the greeen button from the top bar. Right click on the thread group then add-> config element- > http header manage as like attach image. for that you need to create another option HTTP header manager to create that option. Step 3 : Sometimes you need to pass some header information for example content type. As it is post request so My server side request some body data so i have attached that as json format so click on the body data.slash will automatically added by JMeter. So, the total number of requests is (5 users) x (2 requests) x (repeat 2 times) 20 HTTP requests. Also, you will tell the users to run their tests twice. You will create five users that send requests to two pages on the JMeter Web site. please note that do not add forward slash before that. In this section, you will learn how to create a basic Test Plan to test a Web site. Path field just use the path after the ip address or domain name or localhost in my case it was order/create-order.In the http request field use your desired http method in my case i will post some data so i am using POST method so that i have selected post method. ![]() In the port number field i am using 9003 that's why I have given 9003.Don't use http or port number before or after the ip address or domain name If you use just remote server then use Ip address or domain name. In the server name i have set it to localhost because i am using local machine.In protocol filed i am going to http request so for that i have given http in the box.In the name filed just give a name as like whats you want.In my case it was Order Service http request Step 2 : right click on the thread group Add -> Sampler -> http request as like attach image. Number of thread means how many requests you want to perform and loop count means how many time you want to execute After Create thread group you will see three part. ![]() Please note that i have attached images for each step In general it is not recommended to run the application under test and the load generator on the same physical or virtual machine as the load generator (JMeter in your case) may consume immense amount of resources like CPU and RAM and it may interfere your application health (unless you're using completely isolated containers), so I would recommend use separate hosts for application and the load generator. Again, use View Results Tree listener to inspect request and response details. Description of screenshot of your HTTP Request samplerĪs an alternative option you can try recording your scenario using JMeter Chrome Extension and see if you're able to replay recorded scenario without errors. In order to be able to help we need to know the following:Ĥ. JMeter doesn't care whether application under test is local or remote, if you cannot hit local URL with JMeter - something is wrong with your HTTP Request Sampler configuration, most likely "Port" value is wrong.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |