How to use Throughput Controller in JMeter | Advanced JMeter Tutorial
Вставка
- Опубліковано 6 вер 2024
- In this video, you will learn what is throughput controller and how to use it in JMeter.
The Following Example Demonstrates the Throughput Controller:
- Open the JMeter and then add thread Group into your Test Plan and enter the number of Users as 10.
- Add Three HTTP Request Samplers Inside the Thread Group as shown below. First I am going to add HTTP Request and enter the Homepage Address of the New Tours demo site as shown below.
- Add one more HTTP Request and enter the Welcome page address in the Server name as below.
- Add one more HTTP Request and enter the Register page address.
- Add Aggregate Report to the Thread Group as below.
- Now save and run the TestPlan, after the execution, all the requests have been hit by the 10 virtual users.
- But, my requirement here is that I want to distribute virtual users to each request.
- So I want 2 users to hit Home Page,3 Users to hit the Welcome page and 5 users to hit the Register page.
- This can be done by using the Throughput Controller.
- Add three Throughput controller to the Thread Group and then assign each request to a different throughput controller.
- Next, click on the Throughput controller and then select the Percentage Execution and then enter the percentage of the throughput as 20%, 30%, and 50% in each throughput.
- After entering the throughput percentage in each in throughputs, save and execute the Test Plan.
- The Throughput will help us to distribute the virtual users based on a percentage if a Test Plan is having multiple numbers of Thread Groups.
Sir I have one doubt. I need to achieve this scenario. 40 percent users should perform login and perform add to cart and 60 percent users should visit PLP and CMS PAGES..Could you please tell me how to do?
Add login in through put controller with 100% and keep the transactions in other throughput controller with60 % make sure to keep other transactions in another throughput controller with 100
If i pass csv data {parameterization} in the request, throughput controller not working. hardcoded working fine. how can i fix the issue sir?
Could you paste how you are doing parameterization
@@taskincomplete thank you sir , for your immediate response.Issue cleared when i started doing it from scratch.
Thank you Dinesh
Hello Sir, thank you for sharing the informative video. I need your help and support to start 1 project, requirements are given below.
:
1. Total number of business scenarios 17
2. Total number of users (threads) 60K (load)
3. Wants to distribute the load in each scenarios by percentage.
4. All the scenarios should be executed in parallel for the period of 1 hour in steady state.
5. Ramp up users until target load is reached and run full load for 60 minutes duration.
6. Test should be executed 1 cycle.
7. Application should be able to handle 60K virtual user with 381018 transaction per hour
1. Which Thread Group should I use? (Normal or concurrency thread group)
2. What are the Controller should I use to achieve the required output.
3. How to distribute the load in 19 Slave server.
4. How to pass the test data (60K users with id and password)
5. Currently its implemented with If single thread group using controller, but client wants to implement it with multi threading.
I really appreciate your efforts and hard work , please help me to start this project
Please find the answers below
1. Total number of business scenarios 17
A: what are the total number of transactions in each script, total number of transaction
2. Total number of users (threads) 60K (load)
A:you cannot fix 60K users it may increase or decrease based on total transactions and time taken(including think time) to complete 1 iteration.(Jmeter has a limitation of pacing functionality)
3. Wants to distribute the load in each scenarios by percentage.
A: if you've one transaction and equal distribution then
105.84/17= 6.23 per scenario. Assume (RT + pacing + think time) is 10 seconds then you've to keep 63 users per scenario (users = TPS* (RT+thinktime+pacing))
4. All the scenarios should be executed in parallel for the period of 1 hour in steady state.
A: If you use Utlimate threadgrouo or Stepping Thread Group it will be parallel only
5. Ramp up users until target load is reached and run full load for 60 minutes duration.
A: in Jmeter you have different types of thread groups which will help you requirment like ramp up and steady state concept (ultimate thread group)
6. Test should be executed 1 cycle.
A: what you mean 1 cycle ?
7. Application should be able to handle 60K virtual user with 381018 transaction per hour
A: based on the configuration and cpu, memory utilisation of servers you are testing, your performane test will say whether application is able to handle your load or not. if it crashing decrease load and test again repeat this kind of testing until server handles the load. if your server is able to handle the 60K load in 1st attempt try to increase load run it for long duration as stress test and see how many hours your servers are able to sustain with that load
1. Which Thread Group should I use? (Normal or concurrency thread group)
A: you may need to use uitlimate threadgroup which is not convurrenct thread
2. What are the Controller should I use to achieve the required output.
A: unless until you need to execute specific transaction more times
3. How to distribute the load in 19 Slave server.
A: total number of users by 19 means like examples total user load is 38 and you need to use 19 LG's then 38/19 =2 ,so your user count in script should be 2
4. How to pass the test data (60K users with id and password)
A: you need to split the files using user load calculation for script and copy the files into each machine or Best solution is you can use "HTTP SIMPLE TABLE SERVER Plugin to help your test data maangement"
5. Currently its implemented with If single thread group using controller, but client wants to implement it with multi threading
A: Any threaqd group in jmeter can be used as multi threaded by default if you run it with 1 user then it will be single threaded if you run with 2 or more users Jmeter will use multithreaded concept