Hello, all. I’m brand new to k6 and working on a POC, and I have a very basic question about running tests in the cloud.
When we run tests in the cloud (from the cli) do they run in vanilla k6 or do they somehow match what we are running locally? So will the test run in the same k6 version and with the same extensions that we are running locally?
Right now I’m wondering about using the xk6-websockets extension in the cloud. But I’m also curious about any custom extensions we may need to create in the future
Extensions are not supported in k6 Cloud out of the box at this time. When you trigger a test run in our infrastructure, we will deploy the latest k6 version to the load generator instances, in other words, we won’t automatically match the local version you are running.
With that being said, depending on your k6 Cloud subscription, we have the ability of deploying a custom k6 build/version to your account, but this is available only for Enterprise/Custom subscriptions at the time of writing this reply.
That unfortunately means that you won’t be able to run with xk6-websockets extension in your k6 Cloud test run.
Is there a particular feature/functionality in the websockets extension you are currently interested in?
While extensions are in general not availabel xk6-websockets is now available as an experimental module since v0.40.0
This means that you will need to import it as k6/experimental/websockets instead of k6/x/websockets.
Also as explained in the release notes this is experimental and we reserve the right to break this import path at any time. In particular when(there is no if here ) this no longer is an experiment we will remove that import path, likely with a version of warning but still.
Also of note is that xk6-websockets might change over time and we will merge this in k6 and deploy it to the cloud asyncrhonously to the actual release cycle of k6. Hopefully none of those changes will be breaking ones - just adding stuff. But this might happen.
I’m using k6/ws now but since ws.connect is a blocking operation I’m not able to emulate my SignalR workflow correctly (e.g. connect, get a connection id, make http calls using the connection id while the websocket is open, close the connection).
I think xk6-websockets will eventually work better for me. However, I tested it this morning and ran into an issue with cookies not being passed and didn’t have a whole lot of luck setting them manually. I see that the cookies issue was already reported (here Support passing CookieJar to WebSocket through Params · Issue #1226 · grafana/k6 · GitHub ) so I’ll sit tight for now