0

I am trying to deploy cloud VM’s using Postman and below is the workflow that I am trying accomplish.

1.) Send request to deploy VM image. (it may take few minutes for the vm to be successfully deployed). 2.) Send another request to check the status of VM deployment , check response for completion. 3.) If response is not completed , send another health check request after 10 seconds, until response contains completed. 4.) If response for above health is successful , execute next request in collection.

Thanks

Mir
  • 37
  • 1
  • 7

1 Answers1

0

Add the below logic as test script for the request to check the status of VM deployment.

  1. Send a request to check for the deploy status.
  2. If deploy is not complete, add a wait time of 10 seconds.

setTimeout(function(){}, 10000);

  1. Set the next request as check status

postman.setNextRequest("request name of check deploy status")

  1. If the deploy is complete, using postman.setNextRequest() continue with the next request in collection
  2. If deploy is not complete, repeat with a delay and using postman.setNextRequest(), run the check status request again.
Jeeva
  • 438
  • 4
  • 12