Simulating multiple independent user web behaviour
See original GitHub issueHi
I am studying the Locust package to see whether it would support the simulation of multiple independent user web usage (visiting sites, file upload/download/streaming) in an office IT environment enabled via managed cloud servers.
The idea is we have different types of user profiles which represent different usage patterns - some users might just browse multiple sites in a session, without much in the way of direct data transfer, some might do a lot of streaming or downloading, some browsing randomly but uploading periodically, and other user profiles a mixture of these. I would like to use Locust to model these different types of user and the maximum number of users I have in mind is 300 or even 500.
At the moment it appears as if each Locust
object gets a host
attribute, which is fixed for all the tasks that this locust might define via the TaskSet
class. But for a typical user I am considering they will, in a given session, use multiple sites simultaneously or in a sequence for browsing and/or file downloading/uploading/streaming. So it seems as if I need to have a TaskSet
for a user which contains multiple tasks, each task needing a separate host for the duration of the task.
How would I go about doing this?
Thanks, Sandeep
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
I was missing the extra part of the full path, so
http://example.com/test
does show up as/test
on the stats UI.I think it would better if the full path name was displayed in the stats and maybe even the task method, as extra information. Would this be possible via a PR?
I tried that but it doesn’t seem to work. Here is
locustfile.py
which I am testing on a local machine:As you can see all except one of the tasks in
UserBehavior
make requests against the hosthttp://httpbin.org
, which is set as host inAUser
, but one of the tasksexample
makes a specific request tohttp://example.com
. However the request stats from the UI don’t show any requests tohttp://example.com
(screenshot attached).