Hello,
I request an first API to post an action.
I make a loop on a second API to know the status of the action.
But this one doesn’t work.
resultat = pm.response.json();
console.log(resultat.status)
if (resultat.status != "IN_PROGRESS") {
// No customer was returned, so don't run the rest of the collection
console.log("Boucle")
pm.collectionVariables.set('status_job', resultat.status);
postman.setNextRequest("Liste_Snapshot");
}
else {
console.log("Relance")
postman.setNextRequest("Detail_Job");
}
I put this code in the tests tab.
When i execute my collection, it’s play the fist API once and repeat the second only one time.
I don’t understand why, i follow some documents.
Anyone can help me?
Kind regards,
Thomas