For some reason Newman doesn’t call a number of requests that are available in the Postman pre-request, but only the beginning and the last request. I start Run in postman - all requests in the pre-request are called, but Newman does not see them.
It all started about a month ago, before that, all pre-request requests to Newman were called - OK
npm -version
7.20
newman -version
5.2.4
nodejs -version
16.5.0
My sendRequest block in Postman pre-request
// Request #3
pm.sendRequest({
url: pm.environment.get("url") + "/reset/password",
method: "POST",
header: {
"content-type": "application/json",
"Authorization": "Bearer " + pm.environment.get("access_token")
},
body: {
mode: "raw",
raw: JSON.stringify({
"new_password": pm.environment.get("r.srting")
})
},
}, function (json, response) {
console.log("access_token_2 is ", response.json().access_token);
pm.environment.set("access_token", response.json().access_token);