SvenskaSpel / locust-plugins

A set of useful plugins/extensions for Locust
Apache License 2.0
526 stars 136 forks source link

SocketIOUser send method supports specific subscribe request #2616 #175

Closed Kareppa321 closed 1 month ago

Kareppa321 commented 4 months ago

Prerequisites I am using the latest version of Locust I am suggesting a new feature, not asking a question Description I am using the SocketIOUser class from locust_plugins from locust_plugins.users.socketio import SocketIOUser

I defined the send function which calls self.send(query). But when checked the socketio.py file from the packages, the function searches for a regex pattern as follows:

hoping this is a subscribe type message, try to detect name

m = re.search(r'(\d)["([a-z])"', body)

Is there any way to use the socketio to test the websockets that use custom send message methods?

cyberw commented 4 months ago

Hi! You'll most likely need to override that method in your specific User. It is not very user friendly and kind of specific to our use case at Svenska Spel I guess, but I haven't had time to make it more generally useable... PRs welcome.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] commented 1 month ago

This issue was closed because it has been stalled for 10 days with no activity. This does not necessarily mean that the issue is bad, but it most likely means that nobody is willing to take the time to fix it. If you have found Locust useful, then consider contributing a fix yourself!