Executing Cucumber/gherkin tests with K6 directly?

Hey folks, been searching and not coming up with anything positive and found this, so figured I would ask here.

My team has some legacy UI automation written using Cucumber (with feature files) on TS with Playwright.

I can transpile the TS to JS easily enough, and changing from Playwright to K6 browser is simple enough, but I haven’t found a way to launch the automation using K6 for UI performance testing.

So my questions are:

  1. Is it a supported configuration?
  2. If it is, what’s the magic sauce to connect the pieces?

I’ve searched online, and the only answers I’ve found are negative (and that includes StackOverflow).

I’m currently porting the automation away from Cucumber, but it would be really great if I didn’t have to.

Thanks!

Hi @roadatlas,

Welcome to the community forum! :tada:

I’m sorry, but as far as I know, there’s no officially supported way to run Cucumber (feature files) from k6, but you should migrate them to be k6 scripts instead.

Apologies! :bowing_man:

Thank you for the quick response, I figured this would be the case, so I’ve been working on migrating over to javascript to get it working in K6.

Hopefully some day it may be a supported scenario with minor tweaks instead of a major rewrite.

Hopefully some day it may be a supported scenario with minor tweaks instead of a major rewrite.

Contributions are more than welcome.

If k6 codebase sounds like a scary proposal, perhaps as an extension?

We could help, if you lead the work.