I would like to achieve transactions per minutes at request level, what would be approach and how the script structure should look like ?
Requirement:
In total i have 67 concurrent users.
I need to achieve transaction per minute at each request level, all under same thread group. As per my requirement, my each HTTP sampler is a transaction. This is for API testing.
6 API requests under 6 simple controller.
My Script structure:
1. Test Plan
2. Thread Group
3. Simple Controller
i. HTTP Sampler
ii. Response Assertion.
iii. Boundary value Extractor
iv. Results Action Set Handler
4. View Results Tree
5. Summary Report
I have tried 2 ways:
Instead of simple controller, i have used throughput controller and used percent Executions.
I also had constant throughput timer.
Requirement:
In total i have 67 concurrent users.
I need to achieve transaction per minute at each request level, all under same thread group.
6 API requests under 6 simple controller.
My Script structure:
1. Test Plan
2. Thread Group
3. Simple Controller
i. HTTP Sampler
ii. Response Assertion.
iii. Boundary value Extractor
iv. Results Action Set Handler
4. View Results Tree
5. Summary Report
Example:
All API requests / http sampler falls under the same thread group and request should execute in the given sequence as correlation is in place.
API request 1 - 152 request per minute. API request 2 - 56 request per minute. API request 3 - 32 request per minute. API request 4 - 12 request per minute. API request 5 - 12 request per minute. API request 6 - 12 request per minute.
Were i need to perform a load test and soak test as well with the above workload model.
You cannot have different throughput levels for different Samplers under the same Thread Group because JMeter executes Samplers upside down and loops over therefore total execution speed will be throttled down to the execution rate of the slowest sampler.
The solution is to put requests which you want to execute at different speeds under different Thread Groups. If you need to pass the values between threads in different Thread Groups you could use:
In its turn you can use one of the following test elements to set the required TPS for Sampler(s) under different Thread Groups: