Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add websocket functionallity #142

Conversation

trinatafoya
Copy link

Description

This pull request is a feature that allows the har-to-k6 converter to handle web-socket functionality. It uses the k6 library import ws from 'k6/ws'. These requests were formerly ignored in the original itteration of har-to-k6.

Type of change

  • This version handles the websocket send(...) messages and adds a setTimeout in place of sleep for websockets, this is because k6 websocket callbacks are not made to work with the sleep(...) function.
  • Websocket send messages are the only messages that are handled here
  • Once the file is converted, if you have specific timings or order that needs to be handled you must add that yourself.
  • This is very generic to support many different kinds of websocket testing

@trinatafoya trinatafoya requested a review from a team as a code owner December 27, 2023 20:44
@trinatafoya trinatafoya requested review from going-confetti and EdvinasDaugirdas and removed request for a team December 27, 2023 20:44
@CLAassistant
Copy link

CLAassistant commented Dec 27, 2023

CLA assistant check
All committers have signed the CLA.

@trinatafoya trinatafoya force-pushed the feature/add_websocket_functionallity branch from 29ffe34 to 933a2dd Compare January 9, 2024 20:03
@EdvinasDaugirdas
Copy link
Contributor

Hey @trinatafoya, thank you for your PR submission!

Unfortunately, I can not approve your PR, mainly due to the reason that we're currently overhauling k6 WebSockets APIs. You can find the new experimental module here: https://k6.io/docs/javascript-api/k6-experimental/websockets/.

As the name implies, the module is still experimental and is not fully implemented. Only when the k6 WS APIs become stable and land in k6 we'll be considering adding support to har-to-k6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants