JMeter and simulating the real users

对着背影说爱祢 提交于 2019-12-11 10:45:42

问题


I am wondering if there is something I could use to create a simulator using JMeter that would pick the users from my "user list" based on some kind of pattern. In fact, even simpler: imagine I have the users from 0 to N. Some of them are active, some of them are not. I would like to have some simulated users that are active during certain period (say, hour), then they go dormant, others become active etc. So, out of total N users I would have something like X unique active users per hour, Y unique active users per day, Z unique active users per week etc.

I think I could write some kind of generator like this but I am wondering if something already exists - as JMeter plugin or just a library/class that I could use.


回答1:


See the following test elements which can help you to implement scenario requested:

  1. Ultimate Thread Group - to control virtual users arrival rate and time to hold the load
  2. Constant Throughput Timer - to control virtual users activity in "requests per minute" which can be converted to "requests per second" or "requests per day" by simple arithmetic calculations
  3. Provide uniqueness of virtual users via:
    • CSV Data Set Config configuration element or __CSVRead() function - for pre-defined users list
    • __Random or __RandomString function for dynamic unique parameters.


来源:https://stackoverflow.com/questions/25274647/jmeter-and-simulating-the-real-users

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!