在jmeter中维护http请求一定时间 [英] Maintaining http request in jmeter for certain amount of time

查看:278
本文介绍了在jmeter中维护http请求一定时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想激发说1000多个用户登录/执行东西/等并停留在系统中,例如说5分钟,然后退出/执行其他操作.在剩下这1000多个用户的同时,我将遍历整个循环,以便发送额外的1000多个用户,依此类推-就像试图将尽可能多的用户塞入服务器,并在塞满更多用户的同时将其保留在服务器上.

I want to stimulate say 1000+ users logging in/do stuff/etc and staying in the system, for say 5 minute before logging out/doing something else. While these 1000+ are staying, I will loop it through so additional 1000+ users are sent in and so on - sort of like trying to cram as many users onto the server as possible and keeping them there while cramming more.

是否可以做这样的事情?

Is it possible to do something like this?

我环顾四周,并且在jmeter中有一个keepalive选项,但这能持续多久?没有输入我想要多长时间的选项.另外,对于时间延迟(例如恒定计时器),我认为这对我想做的事情不起作用吗?因为那只是延迟了下一个开始的时间,而没有使第一个开始存活(或者我误解了它的用途?)

I did some looking around, and there is a keepalive option in jmeter, but how long does this last? There is no option to input how long I want it. Also, for the time delay (e.g constant timer), I don't think that'll work for what I'm trying to do right? Since that just delays when the next one starts, without keeping the first alive (or am I misunderstanding it's use?)

推荐答案

我会开始说一个用户=一个线程". 在设计开始时,此假设有助于简化操作(您可以在以后更改,因为您有大量的用户). 因此,您的需求变成我想添加尽可能多的线程". 您可以使用加速时间(标准线程控制器"或Jmeter-plugins- 我发现这些最后一个非常有用.

I would start saying that "one user = one thread". At the beginning of the design, this assumption help simplify things (you can change later, is you have a very high amount of users). So, your requirement turns into "I want to add as many threads as possible". You can do that using rampup time (standard threads controller", or using some controller from Jmeter-plugins- I found these last ones very useful.

关于保持活动"选项,AFAIK仅适用于低级别的http会话控制. 我认为您需要让每个用户多次迭代脚本(这意味着每个用户都多次登录),或者您可以在脚本中插入一些循环,保留一些经常执行的操作,或者可以使用计时器,使每个线程的播放速度更慢. 最后,这很大程度上取决于您的要求,而这又取决于Application&用户行为.

About keep alive option, AFAIK this is only for http sessions control, at low level. I think you need to make each user iterate the script multiple times, (this means each user does login multiple times), OR you can insert some loop inside the script, holding some operation that is done often, OR you can play with timers, making each thread play more slowly. In the end, it depends very much on your requirement, that in turn depends on Application & user behviour.

这篇关于在jmeter中维护http请求一定时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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