- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Labels:
-
Help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I think we could do something like
uint32_t delay_ms = 1 ; // change this value for testing...
my_api() ;
CyDelay(delay_ms) ;
my_api() ;
But meantime, I suppose that most of APIs should have a way to check if the process of that API is done.
By any chance, can you provide the name of the API you'd like to test?
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @MotooTanaka , thank you for your input. Is there a way to monitor, get back, when each call is actually sent out?
Sorry, this is our proprietary API in a microservice-based application.
Cheers,
RiFa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @RiFa,
Can you provide some details about the API that you are testing? Is it an interrupt driven function which returns before it completes? Or is the application using an OS like FreeRTOS?
Best regards,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Hari ,
thank you for looking into this. To be honest, I'm the PO and I don't have this type of information (other than I call a REST API and get back something).
Generally speaking, I just would like to know how to send out two API calls from Cypress spaced by X ms (X being my (reasonable) choice) and how to verify at what time each call was sent out.
Is that possible?
Thank you in advance,
RiFa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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