- The Throughput Controller allows the user to control how often it is executed. There are two modes:
- Percent execution: This causes the controller to stop executing after a certain number of executions have occurred.
- Total executions : This causes the controller to stop executing after a certain number of executions have occurred.
- Like the Once Only Controller, this setting is reset when a parent Loop Controller restarts.
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.
- Next, add Three HTTP Request Samplers Inside the Thread Group as shown below. First I am going to add HTTP Request and entering 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 retirement here 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 the different throughput controller.
- Next, click on the Throughput controller and then select the Percentage Execution and then enter the percentage of the throughput as
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.