https://cypress.io logo
Executing requests in parallel
# general-chat
s
I have some automation that I'm running through 1500+ rest API calls to build out some data. I'm wondering how I can go about calling these apis in parallel to speed up run time. Right now it takes about 19min to complete.
g
use
cy.task
to move those calls to the Node layer where you can run API calls in parallel
s
@gray-kilobyte-89541 just want to say I'm a huge fan of your work! Super helpful. Thank you for the tip. You wouldn't happen to have an example of that handy do you?
g
hehe, thank you! I don't have an example handy of exactly what you are looking for. But this is close https://glebbahmutov.com/blog/cypress-env-variable/ and I will probably show an example of what you need in my cypress-plugins course (later)
s
Awesome. Thank you so much!
g
🙂 I have added a quick example of one possible solution using client-side fetch calls in parallel to https://cypress.tips/courses/network-testing
5 Views