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

Use /json/version to retrieve ws url #801

Open
ankur22 opened this issue Mar 1, 2023 · 2 comments
Open

Use /json/version to retrieve ws url #801

ankur22 opened this issue Mar 1, 2023 · 2 comments

Comments

@ankur22
Copy link
Collaborator

ankur22 commented Mar 1, 2023

Could we use <ip>:<port>/json/version to retrieve the websocket url instead of relying on parsing stdout to retrieve the websocket url? The trouble with using the json endpoint is that we will need to pick and assign the port when launching the browser instance instead of allowing the browser to find an open port, which is an extra moving part in xk6-browser.

@tmc
Copy link
Contributor

tmc commented May 17, 2023

This would be nice to support with connect() as well -> allow it to auto-discover.

@inancgumus
Copy link
Member

Which IP and port can we connect to without knowing the WebSocket URL firsthand?

I looked into this, and we can use the --remote-debugging-address and --remote-debugging-port flags. However, once we set these to constant values, users won't be able to test with multiple k6 processes, hence the single address and port.

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

No branches or pull requests

3 participants