0

I am working for a project which has several flows and as such is required api testing automation. However we need the following features when creating request workflows through postman:

  1. reuse the same request in multiple workflows.
  2. pause the postman runner after a given request, waiting for the user input before executing the next one. This is needed because the user needs to accept a notification via a mobile app and the test would fail if the next request would be sent before the approval of the user.

Let's say we have the requests P, D, N, C, R, here are some workflows:

  • P->D(wait for user input)->N->D
  • P->D(wait for user input)->N->D->C->R

For request reuse we could use something like this response: Request reuse in Postman, although I wanted to know if there are some more user-friendly alternatives.

Instead I don't know how and if it is possible to wait for user input before going on with the following requests. I know that I could setup a timer, but it is not correct in my use case, as the user may take a while to approve the request.

Have you any suggestion? Thanks.

  • wait for user input in the server or you want to give something to postman ? – PDHide Jun 04 '21 at 17:18
  • I want postman to wait for the user input before executing the next request, rather than executing them one after the other – Alessandro Jun 07 '21 at 13:49

1 Answers1

0
  1. may already have an answer here https://stackoverflow.com/a/50449577/6254070

  2. To make postman pseudo-async, you may be able to create a looping poll request in the "Test" area that checks if an event has happened every few seconds, then continues when the event has occurred. I don't know of a way to achieve true async by telling the runner to actually wait for something since requests are all going outbound.

If you're ok separating your runs into pieces, you could use collection webhooks

smurtagh
  • 1,187
  • 9
  • 17