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

Update/k6 master #739

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion browser/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
k6modules "go.k6.io/k6/js/modules"
)

const version = "0.7.0"
const version = "0.8.0"

type (
// RootModule is the global module instance that will create module
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.19

require (
github.com/chromedp/cdproto v0.0.0-20221023212508-67ada9507fb2
github.com/dop251/goja v0.0.0-20221229151140-b95230a9dbad
github.com/dop251/goja v0.0.0-20230128084908-78b980256d04
github.com/fatih/color v1.13.0
github.com/gorilla/websocket v1.5.0
github.com/hashicorp/go-multierror v1.1.1
Expand All @@ -13,7 +13,7 @@ require (
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c
github.com/sirupsen/logrus v1.9.0
github.com/stretchr/testify v1.8.0
go.k6.io/k6 v0.42.1-0.20230109152238-8418147fa630
go.k6.io/k6 v0.42.1-0.20230130080633-582ec4d3940c
golang.org/x/exp v0.0.0-20221106115401-f9659909a136
golang.org/x/net v0.1.0
golang.org/x/sync v0.1.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwu
github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo=
github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk=
github.com/dop251/goja v0.0.0-20221229151140-b95230a9dbad h1:EikyYzLzjRNW8lz9VAIUcmrwDAU6PsMRnwblYXb6Ysg=
github.com/dop251/goja v0.0.0-20221229151140-b95230a9dbad/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs=
github.com/dop251/goja v0.0.0-20230128084908-78b980256d04 h1:iQQgQ1wBsFmpu6OjINCY2ekdknKNNpxO/GOzzww2Amk=
github.com/dop251/goja v0.0.0-20230128084908-78b980256d04/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs=
github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y=
github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
Expand Down Expand Up @@ -255,8 +255,8 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.k6.io/k6 v0.42.1-0.20230109152238-8418147fa630 h1:0MtQL0OzBWHA9FHmyUxTE5lUGUROhIAbdhBCLt9IQGA=
go.k6.io/k6 v0.42.1-0.20230109152238-8418147fa630/go.mod h1:0/VY8Sd4WTsIkncZFLDQIv7u8wjBtGlBXF3YPrDxK+E=
go.k6.io/k6 v0.42.1-0.20230130080633-582ec4d3940c h1:3Zl45AJ+2iJmliweb9y+U3H81uwgappYlllwsCB/7jM=
go.k6.io/k6 v0.42.1-0.20230130080633-582ec4d3940c/go.mod h1:0ThS9XqUtlglwwsZ7IxXs+QJTkjkMUZgQ/N1r6Wajm8=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
Expand Down
43 changes: 43 additions & 0 deletions release notes/v0.8.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
xk6-browser v0.8.0 is here! :tada:

This release contains preparation for the upcoming `xk6-browser` and `k6` merge, preparations for the upcoming Async API features, bug fixes, and code refactoring.


## Experimental Module Merge into k6

We've been busy preparing for this big change that will occur very soon :crossed_fingers:. We have [refactored the code](https://github.com/grafana/xk6-browser/issues/683) in preparation for the merge into `k6` (see [the related issue list](https://github.com/grafana/xk6-browser/issues?q=label%3Ak6-core-compatibility+is%3Aclosed)). This will mean that all future releases of `xk6-browser` will also be part of the `k6` releases (as an experimental module). Merging `xk6-browser` into `k6` will allow you to run both the protocol and browser tests using the same `k6` command line tool. This will also increase the reach and visibility of `xk6-browser` and allow us to collect more feedback and guidance from the community to tailor our product to your needs. _It's worth noting that we're not merging the two code bases into a single one. `xk6-browser` will still be in its own repository._

As an experimental module, some of our APIs are likely to change, causing breaking changes in future releases—for example, now that we have `async`/`await` keyword support, we're going to move most of our APIs to `async`. Changes in APIs also means that your Playwright scripts will also start to work in `xk6-browser` with less and less tweaking of your `xk6-browser` test scripts in the upcoming releases—As per our rough compatibility goal with Playwright APIs.

Currently, browser based tests can only be performed within your own test environments, and it won't be available in the [cloud](https://k6.io/cloud/) (yet). Keep your eyes peeled though on future releases, and the blog to hear more on the public launch of browser testing in the cloud.

With this release we are continuing to build and upload the artifacts (binaries) for you to download and work with. In the near future we intend to stop that, and instead we will redirect you to the k6 repo, where you will be able to download the latest binary with browser test functionality. We may also stop releasing the release notes here and move them to the k6 release notes. We will create a blog post outlining these details soon.


## Improvements

- Convert promisified (`.then()`) examples to `async`/`await`. [#703](https://github.com/grafana/xk6-browser/pull/703)

Now all our examples use `async`/`await` instead of the promise `.then()` chains. Please look at the [`examples/`](https://github.com/grafana/xk6-browser/tree/main/examples) folder to see how we use the new feature. We're changing the meaning of this folder and will use it for internal JavaScript tests instead of showing how to use the `xk6-browser` extension.


### Documentation

- We're updating all our docs so that they reflect the merge and the `async`/`await` changes. These updates will be released after the merge and the latest version of `k6` has been released.


### Internal bug fixes and improvements

- Pre-merge: Map k6-browser Async API to Goja. [#683](https://github.com/grafana/xk6-browser/issues/683)

This is the groundwork for abstracting our internals to get ready for the merge and make it straightforward to upgrade our API to async in the upcoming releases. With this work, we're now able to unlock the following features:

- Provide an easy switch to the k6 browser Async API.
- Unlock merging of k6 browser to k6 core: Mapping Async APIs.
- Increase developer productivity by clearly separating the k6 browser code and Goja.
- Fix the race condition in frame management. [#696](https://github.com/grafana/xk6-browser/pull/696)
- Fix dismiss dialog test bug. [#713](https://github.com/grafana/xk6-browser/pull/713)
- Fix frame manager navigate frame bug. [#714](https://github.com/grafana/xk6-browser/pull/714)
- Fix lifecycle tests bug. [#712](https://github.com/grafana/xk6-browser/pull/712)
- Several other refactors and bug fixes to improve maintainability and stability: ([#694](https://github.com/grafana/xk6-browser/pull/694), [#699](https://github.com/grafana/xk6-browser/pull/699), [#700](https://github.com/grafana/xk6-browser/pull/700), [#723](https://github.com/grafana/xk6-browser/pull/723), [#716](https://github.com/grafana/xk6-browser/pull/716), [#734](https://github.com/grafana/xk6-browser/pull/734)).