Jmeter单线程组中的多个并发用户 [英] Jmeter multiple concurrent users in single thread group

查看:1529
本文介绍了Jmeter单线程组中的多个并发用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有1 thread group,并且用single HttpSampler定义了100 threads1 Iteration.基本上,我正在测试一个GET API.

I have 1 thread group and I have defined 100 threads and 1 Iteration with a single HttpSampler. Basically I am testing a single GET API.

现在,Jmeter应该启动100个线程,然后它们应该向具有API的服务器发出请求.服务器可以同时响应100个请求.因此,基本上在任何时间点我都应该有100个并发.

Now, Jmeter should start 100 threads and then they should fire request to my server which have the API. The server can respond to 100 requests concurrently. So, basically at any point in time I should have 100 concurrency.

但是当我通过Blazemeter检查时,这不是正在发生的事情.我得到的最大用户数为37,总用户数为100,这意味着测试期间的最大并发率为37.

But that is not what is happening when I checked through Blazemeter. I get a max users of 37 and total users as 100 which means max concurrency during the test was 37.

这只有在Jmeter没有并行执行线程的情况下才有可能.那我在哪里错了?

This can be possible only if Jmeter did not executed the threads parallel. So where am I wrong ?

我希望所有线程在创建完所有线程后立即并行执行,并立即触发请求,以便1次迭代的最大并发率为100.

I want all threads to execute parallel after they all are created and fire requests at once so that maximum concurrency is 100 for 1 iteration.

推荐答案

如果您需要更多控制和准确性,请使用

If you need more control and accuracy use Ultimate Thread Group JMeter plugin (instead of regular Thread Group)

将启动线程计数"设置为100,初始延迟为0,启动时间为0,保持时间为正,您的线程将最多容纳100个用户

Set Start Thread Count as 100, with 0 initial delay and 0 Startup Time, with positive Hold time, your thread will hold 100 max users

一般示例:

如果您的计算机无法处理负载,则可能需要分布式测试设置

If your computer can't handle generating load, you may need distributed testing setup

这篇关于Jmeter单线程组中的多个并发用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆