Quantcast
Channel: Grafana k6 - Grafana Labs Community Forums
Viewing all articles
Browse latest Browse all 357

Playwright Recording to k6 Script: Is Manual Translation Necessary?

$
0
0

I’m looking into browser-based performance testing and used Playwright to record a user flow. My goal is to use this flow for load testing with k6.
However, I’ve found that the Playwright script doesn’t work directly in k6. When I try to adapt it, I constantly have to change browser interaction methods (await page.getByRole to await page.locator) and element selectors (‘link’, { name: ‘EST-6’ } to #Catalog > table > tbody > tr:nth-child(2) > td:nth-child(1) > a) into k6’s request.
Is this manual process of translating browser actions and selectors into k6 requests the standard and recommended way to use Playwright recordings (or similar browser automation flows) for k6 load testing? Or is there a method to use Playwright scripts with k6 with fewer changes?

Playwright Script:

K6 Script:

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 357

Trending Articles