postmanlabs / newman

Newman is a command-line collection runner for Postman
https://www.postman.com
Apache License 2.0
6.88k stars 1.16k forks source link

Values in csv with white spaces at the end is trimmed by newman #1317

Closed ghost closed 6 years ago

ghost commented 6 years ago

Version and environment information:

  1. Newman Version (can be found via newman -v): 3.8.3
  2. OS details (type, version, and architecture): macOS Sierra / Ubuntu 16.04
  3. Are you using Newman as a library, or via the CLI? CLI
  4. Did you encounter this recently, or has this bug always been there: Recently and doesn't happens in 3.8.1
  5. Expected behaviour: To use the complete value from csv without trim the last white spaces
  6. Command / script used to run Newman: newman run xxxx.postman_collection.json -e xxxx.postman_environment.json --folder "Test Folder" -d TestData.csv --bail --reporters cli,json --reporter-json-export ./report/result.json
  7. Sample collection, and auxilliary files (minus the sensitive details):

TestData.csv

field1, field2, field3
message for field 1,this message has 20 white spaces at the end and is going to be trimmed                    ,this is message for field 3
  1. Screenshots (if applicable):

Steps to reproduce the problem:

  1. Create a POST call in POSTMAN using the field2 of previous csv in body. Example of body: { "message" : {{field2}} }

  2. Run a test with newman using the previous call

  3. Note that the value of field2 has lost the last 20 white spaces

kunagpal commented 6 years ago

Does this also happen if the value is enclosed in quotes(")?

ghost commented 6 years ago

In that case, it works well