-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The NULL values captured from previous URLs in Newman is not passing properly in next subsequent URL. #1339
Comments
@anilsbs In the request body for Also, you should update the Newman version to 3.9.1. |
@prakharjoshi , will verify it in Newman version to 3.9.1 as soon as possible. |
@prakharjoshi , In the latest version we are getting the error as it is trying to convert the null to string. Please find the attached screenshot for details. But the same URL is working from PostMan with same payload. |
@anilsbs Apologies for the delay in reply, For debugging this can you log the value of Actually, the variables values should be stored as strings as mentioned here. So please check what is the value that you are getting while fetching |
@anilsbs Closing issue due to inactivity, feel free to revert if you're facing difficulties 😄 |
Hi Team,
we are executed REST URL's using postman. The multiple REST URL's are collected and executed as part of a postman collection. All REST URL's are executed properly without any issue from postman collection console. The postman collection scripts ran from command console using Newman command and some of the REST URLs ran from command console using Newman are getting 400 HTTP error code (BAD REQUEST). The reason for this issue is NULL values captured from previous URLs response are captured in postman environment variables and Newman is not properly passing in next subsequent REST URL's. Kindly guide me on the same how to resolve it.
The Newman version is 3.8.2 and the node version is v6.11.3.
Please find the collection and environment files as attached by removed all sensitive details it.
The command/script used to run Newman is "newman run C:\hudson\NEW.postman_collection.json --delay-request 2000 -e C:\hudson\Test.postman_environment.json --export-environment C:\hudson\Test.postman_environment.json"
The issue here is
The value is captured in environment variable "paramater_B" is NULL value from REST URL 1 server response and this value should be passed to REST URL 2 payload data. In POSTMAN, the NULL value is passed properly and server will responded properly with 200 HTTP status code for REST URL 2. whereas the same collection ran from NEWMAN will return with 400 HTTP status code for REST URL 2.
So, if you hardcode the NULL value directly in payload of REST URL 2, will receive proper server response with HTTP status code 200 from NEWMAN.
Hence NULL values captured in environment variable is not passed properly in NEWMAN. Could you kindly guide us how to debug how the values are sent to server by NEWMAN.
Please let me know if you required more details to share.
PostMan scripts.zip
The text was updated successfully, but these errors were encountered: