Runs all good in local but when merged to azure and collection json fails and following error displayed
Hey @kiranpati1234
Welcome to the Postman Community
Whatâs the script that you have in the post response section that references that function?
What version of Newman is the pipeline using?
Thanks Danny.
This is setup in postman which runs the collection in postman but when i export and run in azure its fails
This the collectionJson screenshot
newman verison
Thatâs not the Newman version, thatâs the version of something else that internally using a version of the Newman package.
Has this worked previously? How are you referencing the Collection in the run command?
Sorry got the vesrion ânewmanâ: â^5.3.2â,
yes we are running the collection.json in azure cli and its working but now we added setNextRequest and moved data setup at one place and all collections having Pre-Requisite Data Run folder .
When i run collection in postman its calls Pre-Requisite Data Run folder and than in last TC i have called it back to RequestName setup in TC-01 âŚ
running flow in postman:
Tc-01
1.1
(Pre-Requist Data Setfolder is started) A
B.
⌠After G i have set return to RequestName setup in 1.1 so
1.2 is executed⌠and than goes to TC-02
but when i run in in Azure CLI it goes
1.1 and gives error (Cannot read properties of undefined (reading âsetNextRequestâ)
1.2
1.3âŚ
When it says cannot read the properties of undefined like that, the problem isnât usually with that function (in this case setNextRequest) but the method just before it. So the issue is that is doesnât like pm.exectution.
pm.execution is a new method so its possible that you are using an older version of Newman that used the âpostman.setNextRequestâ method instead.
The first recommendation would be to ensure you are running the last version of Newman (which you arenât, the latest version is 6.1.3).
Make sure the version of node you use in the pipline is also up-to-date.
Thanks @michaelderekjones and @danny-dainton After updating my local dependencies with npx npm-check-updates -u and merged the code back it worked as expected
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.