You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying out newman (version 6.2.1) on my local computer using an exported collection and environment. I am running the test on a single folder in my collection.
The test runs but I get the following error for the two requests: Identifier 'responseBody' has already been declared at test-script.
My post-response test script is defined at the collection folder level. At the top of the script I have: const responseBody = pm.response.json(); and I do not redeclare that variable in the script. I only use that variable to run tests such as pm.expect(responseBody)....
I can run these same tests using the Postman CLI and I do not get this error.
This is my first time using newman. What am I missing?
Thanks.
Details:
Newman Version: 6.2.1
OS details (type, version, and architecture): Windows 11, node 20.10.0
Are you using Newman as a library, or via the CLI? CLI
Did you encounter this recently, or has this bug always been there: Recent
Expected behaviour: tests pass
Command / script used to run Newman: npx newman run my_collection.json --environment my_environment.json --folder "Invalid Calls"
Sample collection, and auxiliary files (minus the sensitive details): N/A
Screenshots (if applicable): See below
Steps to reproduce:
Create local node development environment with node 20.10.0
Install newman: npm install newman
Export collection and environment to local machine.
Run the command: npx newman run my_collection.json --environment my_environment.json --folder "Invalid Calls"
The text was updated successfully, but these errors were encountered:
Cross posting with the Postman forum.
I am trying out newman (version 6.2.1) on my local computer using an exported collection and environment. I am running the test on a single folder in my collection.
The test runs but I get the following error for the two requests:
Identifier 'responseBody' has already been declared at test-script.
My post-response test script is defined at the collection folder level. At the top of the script I have:
const responseBody = pm.response.json();
and I do not redeclare that variable in the script. I only use that variable to run tests such aspm.expect(responseBody)....
I can run these same tests using the Postman CLI and I do not get this error.
This is my first time using newman. What am I missing?
Thanks.
Details:
npx newman run my_collection.json --environment my_environment.json --folder "Invalid Calls"
Steps to reproduce:
npm install newman
npx newman run my_collection.json --environment my_environment.json --folder "Invalid Calls"
The text was updated successfully, but these errors were encountered: