cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.79k stars 3.17k forks source link

Stress / load testing #1510

Open EirikBirkeland opened 6 years ago

EirikBirkeland commented 6 years ago

Desired behavior:

I'd like a --stress-test parameter which lets me re-run tests for a set number of hours, with a final report to indicate which tests are flaky and which are sturdy.

As an alternative, it'd be fine if your dashboard service would aggregate fails over time, allowing me to see which tests need more attention.

This feature is going to grow in importance to me personally as my test suite grows in size.

Edit by @jennifer-shehane: Moved Dashboard feedback to https://portal.productboard.com/cypress-io/1-cypress-dashboard

jianentrinsik commented 6 years ago

I also wish to have this feature included in cypress. Similar features I saw elsewhere is: https://github.com/loadimpact/k6

cameronc56 commented 6 years ago

This is a great idea. +1

jennifer-shehane commented 5 years ago

Related to test retries https://github.com/cypress-io/cypress/issues/1313

jennifer-shehane commented 4 years ago

In terms of the 'Test Count Aggregation' idea for the Dashboard - You can express interest and see progress for this feature on our Roadmap from our Dashboard's product board here: https://portal.productboard.com/cypress-io/1-cypress-dashboard

This issue will now be tracking all work related to 'Load Testing' - as this is a feature that would involve the Cypress Test Runner.

sturlath commented 4 years ago

@jennifer-shehane what issue on the dashboard would that be? I'm extremely interested knowing how I can use the tests to load test my app. I Would like to know more about what you are thinking

davidjeddy commented 4 years ago

I would like to also suggest parallel execution during --load-test. Typically I use Gatling for load testing; but Cypress and Gatling do basically the same thing: load the UI, interact, confirm.

Being able to leverage Cypress to execute a series of user actions with (for example) 10 simulated users, would cover the need for Gatling.

Stretch goal: record and display TTFB, average page load time, load bytes, HTTP code responses and counts (200,404,500,etc).

djangofan commented 4 years ago

Has anyone tried wiring up a Cypress test with Gatling? I am guessing that when Gatling forks threads, it wont be compatible with the reporting? I am thinking about it. Or did anyone have some other solution to performance test?

nadia1993 commented 3 years ago

Has anyone tried wiring up a Cypress test with Gatling? I am guessing that when Gatling forks threads, it wont be compatible with the reporting? I am thinking about it. Or did anyone have some other solution to performance test?

can someone answer this? it will be very helpful

sneko commented 3 years ago

I would be also interested to know if it would make sense to use Cypress tests to "load test" "all the infrastructure"?

Meaning:

Indeed being able to parallelize multiple users would help making this concrete.

Did any of you try that?

gitressa commented 10 months ago

This would, be great. Until it's ready, could https://github.com/trentrand/cypress-utils work as an alternative?