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

Docs: Migration guide for k6 browser v1.0.0 API #1259

Closed
ka3de opened this issue Jul 19, 2023 · 1 comment · Fixed by #1292
Closed

Docs: Migration guide for k6 browser v1.0.0 API #1259

ka3de opened this issue Jul 19, 2023 · 1 comment · Fixed by #1292
Assignees
Labels
Area: browser The browser module

Comments

@ka3de
Copy link
Contributor

ka3de commented Jul 19, 2023

After the recent changes made to k6 browser API, including the scenario browser options (grafana/xk6-browser#876), the abstraction of the browser lifecycle (grafana/xk6-browser#910), and the enforcing of a single browserContext per iteration (grafana/xk6-browser#929), current k6 browser scripts API have a few considerable differences from previous versions.

It would probably be helpful for current users to have a migration guide on how to adapt their "old" k6 browser test scripts to the new version.

Note: Final released version might be v.1.0.0 instead of v0.11.0.

@ka3de ka3de added the Area: browser The browser module label Jul 19, 2023
@inancgumus inancgumus self-assigned this Jul 25, 2023
@inancgumus inancgumus changed the title Provide a migration guide for k6 browser JS API in v0.11.0 Provide a migration guide for k6 browser v1.0.0 API Aug 7, 2023
@inancgumus
Copy link
Member

inancgumus commented Aug 7, 2023

Here's the current outline:

  • Executor and scenario options.
  • Changes in configuring the browser: scenario options.
  • Execution model changes: One browser one browser context.
  • A single scenario can only run contexts in a sequence, not concurrently.
    • Retrieving the browserContext if newPage is used, and how we only retrieve the one live browser context.
    • browser.close is no longer needed.
    • Explain how we now handle the browser lifecycle.
    • Imports have changed: There is no more chromium browser type etc, but browser.
  • Environment variable changes.
    • No more K6_BROWSER_ENABLED flag.
  • Some of the cmd flags don't work, e.g.: -u-v and -d.

@inancgumus inancgumus linked a pull request Aug 11, 2023 that will close this issue
@inancgumus inancgumus changed the title Provide a migration guide for k6 browser v1.0.0 API Docs: Migration guide for k6 browser v1.0.0 API Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: browser The browser module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants