Kreya icon indicating copy to clipboard operation
Kreya copied to clipboard

Possibility to set the next request

Open scheroiu opened this issue 1 year ago • 1 comments

We are running into the issue that when I want to retrieve data from a gRPC service the data is not yet available (in the background a job is running). Using a timeout is unreliable.

The possibility to "Loop over a request" or "set Next Request" would somehow solve the problem. Similiar to postman.setNextRequest() https://learning.postman.com/docs/collections/running-collections/building-workflows/

The flow in the test is as follows:

  • We start a job from a gRPC request.
  • We check that the job has started
  • we wait for X seconds (this is the problematic part)
  • We retrieve the data from the service (this is unreliable as sometimes the data is not there, because the job didn't finish)

scheroiu avatar Dec 04 '23 12:12 scheroiu

Thank you for your feature request, we added this to our roadmap.

Maybe the following workaround could work for you?

  1. Create an new operation that checks whether the data is there (in a test via Scripting)
  2. Create a script that continously invokes that operation via the Kreya CLI until the test passes
  3. After that test passes, invoke the operation with the "real test script" that requires said data

CommonGuy avatar Dec 04 '23 13:12 CommonGuy