Collection runner is falling while it is running more than 600 methods

Hi everyone,

please help me to resolve my issue. In my company we use Postman for integration testing. I run more than 600 http methods from folder runner. However, sometimes execution stops in the begging, sometimes in the middle, and very rare it goes to the end. I have Java Script code (loop, array, if condition, etc.) in my Pre-request script. In my Test Runner I also have JS code that has validation part and two get methods. In fact, it is very complex call.
Basically, each method has a code which iterates 5 different ages, and instead of one call it creates 5 calls. I tried to provide 2000 or 3000 milliseconds in delay time, and sometimes it helps to run more and it passed 300 http methods instead of 600 , but sometimes even delay does not help. Maybe the server is overloaded or something else.
Often I got these messages:
"An error occurred while running test scripts for this request. Check Postman Console for more info." ;
"JSONError: Unexpected token ‘<’ at 1:1 ";
"TypeError: Cannot read property ‘Amount’ of undefined"

I tried to select the same methods which were failed and to run them again and it passed. But, it does not help me because I selected for example only part of methods (10-30). Json Body does not have any syntax errors, JavaScript code is also accurate because it works perfectly for 10-50 methods. Token is also fine.

Do you have any suggestion or idea why it stops in the beginning or in the middle of the execution ?

I will be glad to get any advise from you. Thank you

the error says the json response you got was not exactly a json but an html tag < . It shows that your target API was down and returned some html response than expected json .

Hi @yugursh

I agree with @praveendvd this error message is misleading because it sounds like something is failing or taking a longer than expect amount of time to respond, and the next Request is going through without it and failing because it is missing the required information from the Request with the long wait.

The troubleshooting that I would recommend at this point would be:

  1. Check the server logs and see if the requests are failing or timing out (if you have access to those logs). I have had cases where the service ran out of memory and restarted which disrupted the rest of the tests.
  2. Check the previous responses Status Codes as sometimes they show as passed but display a 404 (or another exception) and look at the ms for each call. If you have the delay set to 3000 ms but each call takes 20000ms, there are going to be problems.
  3. If those all look fine, I would look at outputting the expected data for each of those calls to the console so that you can see what it is using and sending, and then monitor the Console output:

console.log("Amount: " + amount);

Good luck with the troubleshooting !