newman -v): 4.5.5I can do a collection run with no issues in the collection runner, however when doing the same collection run in newman, an error message will be thrown. The issue appears to be a difference in the way the csv file is parsed in newman vs in the collection runner. The csv file contains multi line values, as well as values that contain double quote characters.
It seems that the collection runner correctly escapes the commas before running while newman does not. Here is an example showing the preview data window in the collection runner:

Here is a look at the raw text of the same csv file:

Steps to reproduce
@JDiazZenergy We are aware of this disparity in Newman's CSV parser and it's planned to be fixed in Newman v5 (no ETA just yet).
For now, you can replace """ with \" to unblock this issue.
@codenirvana I'm getting a similar error: error: Invalid opening quote at line 2
The csv datafile that I'm using looks like this:

It only has one double quote (in comparison to """ like the problem above)
I can't figure out how to work around this problem (untill v5 is released).
How do I escape the quotes for it to work?
@JDiazZenergy We are aware of this disparity in Newman's CSV parser and it's planned to be fixed in Newman v5 (no ETA just yet).
For now, you can replace
"""with\"to unblock this issue.
I have verified "for now" solution doesn't work with Newman 4.5.5 . My newman runner is located here,
https://github.com/iheartdaikaiju/postman_tools/blob/master/Runner.js
although I am happy to prepare a bare newman call with nothing else in the nodejs file as well if you are having difficulties reproducing.
Try using this test document
Blank,\"Field 1\",\"Field 2\",
,{\"ExampleArgument\": \"hello\", \"Another\":\"world\"},3,
Or this one
\"Blank\",\"Field 1\",\"Field 2\",
,"{\"\"ExampleArgument\"\": \"\"hello\"\", \"\"Another\"\":\"world\"\"}\",3,
@SimonVHB I was able to verify if you do
"[""5dd...427""]"
That will work in the Collection Runner in Postman, which I feel should be the recommended alternative, rather than \" which is not part of RFC 4180
Hi, Can anyone help me on how to pass the csv file containing the testcase to newman run,
I have created a collection in postman , there I have only one request, and I am passing the csv file in the collection runner and it gets executed successfully , I want to do the same in newman , So I installled newman, and when I tried to run , using newman run
Hello @harishshet222
As per the above discussion you have two options
1, you can avoid using quotes in your data. Note that Postman as of now treats One Two,Three, Four Five as "One Two","Three"," Four Five"
2, you can use the collection runner as follows :
All the other options you can send to Newman, can be sent to the Collection Runner.
For now, Newman is best suited for CSV files that do not contain quotes within records, and the Collection Runner for CSV files that contain quotes.
As a personal work-around, I have added Pre-Request scripts that turn unused symbols (I like using 谩 or 驴) into quotation marks, to my collection, whenever I need command line automation. These won't help input parsing, but it does enable you full control over how data is handled once you are in the test environment. Any variable {{likethis}} will have to be split across multiple lines, but any variable "[""like"", ""this""]" can be parsed 谩[谩谩like谩谩,谩谩this谩谩]谩 and then turned into what you need in your own scripts with a simple character replace.
i would like to work on this feature. Thanks
cc @codenirvana and @shamasis
This is fixed in Newman v5.
Most helpful comment
@codenirvana I'm getting a similar error:
error: Invalid opening quote at line 2The csv datafile that I'm using looks like this:

It only has one double quote (in comparison to
"""like the problem above)I can't figure out how to work around this problem (untill v5 is released).
How do I escape the quotes for it to work?