Support for Cypress tests?

Hi there

I know that K6 currently has k6-browser extension, but will there also be plans to have integration with Cypress?

Our team currently has a suite of Cypress tests which we want K6 to run, so that it can generate the load and thresholds we set in the K6 profile. Figured it’ll de dupe the effort of writing UI tests again using k6-browser.

Many Thanks!

Ivan

1 Like

Hi @cheuni02beam

My name is Mark - I’m the PM for k6.

I know that K6 currently has k6-browser extension, but will there also be plans to have integration with Cypress?

Not at this time and our opinion at the moment is we probably won’t build an integration like this out. That said, if you are really keen to integrate cypress with k6 in some capacity, you would probably be best off writing some type of xk6 extension to extend k6.

Our team currently has a suite of Cypress tests which we want K6 to run, so that it can generate the load and thresholds we set in the K6 profile. Figured it’ll de dupe the effort of writing UI tests again using k6-browser.

Can you maybe tell us more what you are looking to achieve specifically? Are you looking to trigger a cypress test during a protocol test to evaluate how the browser performs? Or something else?

1 Like

Hi @mark

Thanks for your reply

Can you maybe tell us more what you are looking to achieve specifically? Are you looking to trigger a cypress test during a protocol test to evaluate how the browser performs? Or something else?

So instead of load/stress testing our application through our APIs, we want to achieve a more accurate load/stress test via our application UI, simulating user realtime interactions.

We already have some of our UI test automation written using Cypress, so why not just utilise those and invoke those scripts with K6 so it can run that same code with N users (as load), instead of having to rewrite UI tests using an extension of K6, just seems a duplication of effort that’s all.

Thanks

Ivan

@cheuni02beam What do you stand to gain by emulating browsers to generate the load in it’s entirety. Is it just so you don’t have to rewrite your current cypress tests on the protocol level? Or something else?

As we are building out k6 browser - our opinion is that it(real browsers) should be used to augment protocol tests. That is - generate the load on the protocol level where it’s cheaper/more efficient and launch a small number of real browsers to understand and measure that experience.

This thread is a bit old but I was wondering the same thing recently. What if I wanted to generate load by hitting the APIs, but then run and measure performance of a real browser? the browser workflow is already developed in Cypress (typescript). Can this be done?