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

Transition from Browser.Launch to Browser.Connect when browser WS URL is given by environment #808

Closed
ka3de opened this issue Mar 3, 2023 · 0 comments · Fixed by #819
Closed
Assignees
Labels
enhancement New feature or request evaluate
Milestone

Comments

@ka3de
Copy link
Collaborator

ka3de commented Mar 3, 2023

In some circumstances, when the browser lifecycle is handled externally to xk6-browser extension, we should be able to transition from Browser.Launch to Browser.Connect transparently. This is done to increase compatibility for scripts written to run "locally", where the Browser.Launch method will be called and the browser is started by xk6-browser itself; and for cases on which we want to run the same script, maintaining the launch method usage and minimizing changes in the script, but in an environment where the browser is handled externally.

The initial idea to detect when to perform this translation is through the existence of an specific environment variable. We should consider therefore the deprecation of the current cloud environment variable.

Additionally and as part of this issue we should consider how will the WS URL be handled by the environment. Will it be defined in the environment variable? Or will the environment variable define an endpoint that will possibly trigger the external procedure to start up the browser and then return its WS URL? Similarly we should consider a hook action when closing the browser connection which could be useful for the environment to handle the actual process closing procedure and cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request evaluate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants