Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

248
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!