Write Responses To File fails in Runner (get's stuck)

I used this Write Responses to File collection and modified it for my use. I need to run this 500-2000 times.

The process and tests work completely fine when manually running the collection, the issue is when using runner it get’s stuck on “sending request”. I can see the GET request is working and the pm.sendRequest is also working (the file is saved locally). This is where runner gets stuck on “sending request” even though it has already received a 200. I did up the max response size to 100mb per other help requests.

I did try postman web but then the local pm.sendRequest doesn’t execute as “localhost request not supported”.

Update I assume this has something to do with the connection being kept alive but I cannot figure out what is wrong as the above collection has been recommend for use with runner before.

setTimeout(() => {
    pm.sendRequest({
        url: 'http://localhost:3000/write',
        method: 'POST',
        header: 'Content-Type:application/json',
        body: {
            mode: 'raw',
            raw: JSON.stringify(opts)
        }
    }, function (err, res) {
        console.log(res);
    });
}, 5000);```

type or paste code here

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.