Search code examples
javaspring-bootperformancejmeterperformance-testing

Percentage for different APIs in a thread group in jmeter


I have a thread group in which there are 4 APIs. Now, I want to control the TPS of these APIs. For that, lets say these should be the TPS of these APIs:

API#1: 10
API#2: 20
API#3: 30
API#4: 40

Now, for this total number of requests is 100. hence the percentage of these APIs are 10%, 20%, 30% and 40%. How, can I enable this in my jmeter test plan ?


Solution

    1. You can use 4 Throughput Controllers and give the desired percentage of executions in them:

      enter image description here

    2. You can put the requests under different Thread Groups and set number of users and/or iterations according to your test scenario:

      enter image description here

    3. You can use Weighted Switch Controller and provide the desired "weights" for the API endpoints there:

      enter image description here