英文:
Percentage for different APIs in a thread group in jmeter
问题
我有一个线程组,其中包含4个API。现在,我想控制这些API的TPS。为此,假设这些API的TPS应该如下:
API#1:10
API#2:20
API#3:30
API#4:40
现在,总请求数为100。因此,这些API的百分比分别为10%、20%、30%和40%。我如何在我的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 ?
答案1
得分: 1
英文:
-
You can use 4 Throughput Controllers and give the desired percentage of executions in them:
-
You can put the requests under different Thread Groups and set number of users and/or iterations according to your test scenario:
-
You can use Weighted Switch Controller and provide the desired "weights" for the API endpoints there:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论