testing timing issues of my API

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RiFa
Level 1
Level 1
First reply posted First question asked Welcome!

Hello,

I know that the API I'm testing with Cypress has a problem when two calls are sent that are too close (in time) to each other.

I would like to write a flow in Cypress where  the same call can be made within X milliseconds and the two results are shown.

I would like to play with interval X to see when the API breaks and whether our fix works.

Could someone let me know if there is a way to do this?

Thanks,

R

0 Likes
1 Solution
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @RiFa 

 

The simplest way to achieve this would be with the help of a delay. This would make it a blocking operation and in case you need it to be non-blocking, you can use a timer as well. But in both the cases, only one function would be active at a time. 

 

Best regards, 
Hari

View solution in original post

0 Likes
5 Replies