Integration with Playwright

Hi everyone,

I’m a student doing a research about performance testing platforms for a company. One of the requirements is the use of the UI for generating load. Some things were unclear in the documentation of k6 browser.

I understand that with k6 browser, you can use the UI of an application to generate load but can it integrate with Playwright or is the syntax alike but it’s still the k6 framework? The company uses Playwright for their end-to-end testing and I was wondering if I could reuse these test scripts to generate load with k6.

I was also wondering if this k6 browser could be implemented on Electron (software framework that lets web developers make desktop applications). It could be useful if the HTTP recorder can be used in Electron (like codegen in Playwright).

Last thing, can k6 browser generate at least 10 000 VUs? The company I work with has its own IT infrastructure and wants to generate the load on its own servers (some products that have to be tested are secret), how can this be achieved?

Thanks in advance!

Kind regards,
Kilian

1 Like

Hi @kilianb,

For now k6 browser indeed just supports Playwright alike syntax, but it’s still just the k6 framework, no Playwright is used (as far as I understand).

I’ve just set up a repository where you can both run Playwright and xk6-browser tests using the same code though (allowing you to re-use code between the two) , because I had similar requirements.

https://github.com/ticup/xk6-browser-template-typescript-playwright

Cheers,
Tim.

3 Likes