Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

241
Visualizações
Collection Monitor unable to recognize setTimeout between Requests (Postman)

I can't seem to understand why a POSTMAN Monitor is unable to obey by the setTimeout() rule I have inputted in one of the Requests in the Collection.

I have 3 Requests in a Collection (below). Once the first Request is made, the Second one, Retrieve Request is delayed 25000 ms.

Create Request
Retrieve Request <- setTimeout() Pre-Request Script
Delete Request 

The setTimeout() is located in the Pre-Request Script like so:

setTimeout(() => {}, 25000)

The Collections works fine as expected (& passes) if I manually run it. However, if the collection runs in the Monitor, it does not compute it and it all fails.

You can easily see this in the Monitored Console log which shows the Collection run times through in milliseconds and without adhering to the setTimeout():

enter image description here

Also, on Postman's Learning Center it reads that adding delays should definitely work in the Monitor if placed in the Pre-Request or Test Script sections:

enter image description here

Not sure what I'm missing here - help is appreciated.


Update:

Adjusted some settings in the Monitor itself. However, after setting both 'Set Request Timeout' & 'Set delay between Requests' at 25000 ms a piece, running the Collection again in the Monitor, the Console Log still shows that the collection is running Straight through in about a second....

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

enter image description here

It works as expected just try printing console.log(Date()) in test script of all requests. You can see the time difference is 25 second

Note that settimeout is asynchronous. It doesnt stop the code flow within the test script it resolves after 25 second and within that time all other code wil get executed and waits for settimeout function call tobe completed before exiting the test script

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda