Closed ajberry closed 4 weeks ago
Hi
I have same problem here, did you fix this already?
BR, Mering
I haven't been able to fix this as of yet
You can still use postman.setNextRequest()
in 5.x. Or you can upgrade to 6.x to use pm.execution.setNextRequest()
.
Yes, I missed I was running v5 of newman and that meant i'd need to use postman. instead. I've updated the tool to v6 and it's working as expected
I am facing same problem in my DevOps CI/CD pipeline. My updated code has pm.execution.setNextRequest() but, getting error as cannot read properties of undefined 0 setNextRequest()
@lblnop - What version of newman is your devops pipeline installing? Make sure it's getting the latest version of newman (and you'll need node greater than version 16)
Istory
Using newman as a CLI on Windows. Newman v5.3.2 and Node v16.20.2
I have a basic collection that is iterating some posts using setNextRequest. The collection works just fine in the Postman Collection Runner, but not in the CLI environment. Eventually, this will be run as part of an Azure DevOps pipeline.
My Pre-Request code:
My Post-Response code:
The issue is that the first request is made successfully, but then it's failing when calling the setNextRequest('CaptureTypes').
This collection runs as expected in the collection runner, it's only when I export the collection/environment and it then doesn't work. Any ideas on what may be causing the issue?
The command i'm running is: newman run ".\LoopTest.postman_collection.json" -e ".\LoopTest.postman_environment.json"
and i'm using an environment file to store CaptureType/CaptureTypes etc and they are empty by default in the env files