ptejada / artillery-engine-socketio-v3

Socket.IO v3 engine for Artillery
Mozilla Public License 2.0
22 stars 15 forks source link

Merge changes into Artillery? #1

Open hassy opened 3 years ago

hassy commented 3 years ago

Hi @ptejada, awesome work on upgrading the Socket.io engine. Would you be interested in merging the changes into Artillery itself?

ptejada commented 3 years ago

Hello @hassy,

Upgrading the Socket.IO client to v3 is quite trivial, If I recall correctly is like a drop in place replacement for v2. At least it is the case for how is used in the artillery engine.

Here are the major changes that don't align with the current specs of the version bundled with the artillery package:

  1. Making the emit config accept an array of arguments instead of the fixed params channel and data. This is was personally a requirement for a project I was working on. I think is very limiting to accept only two fixed params and assume what their values should be.
  2. Flatting the config structure. Basically moving all additional configs from the step emit prop to the step root. This more of a side effect of wanting to keep prop emit for the list of arguments.

We can probably can come up with a PR but it will definitely look different since you will probably want to keep backwards compatibility with the socket.io client v2 and not break the current config structure.

hassy commented 3 years ago

Sounds good! Backwards-compatibility is nice but can be broken in the upcoming 2.0 release of Artillery if it makes sense to. Making emit accept an array of arguments is definitely worth it, and is something that has been requested as a feature a few times in the past.