My question: I am trying to read the value of Date from the variable, it’s working fine in Postman, when I am executing it from CLI with newman, it’s reading as blank, like this (', ‘’ OR ', undefined)
I am keeping the Date value in the Collection variable, and also keeping it in the environment variable since Newman is unable to read Date data from the collection variables, but I am not getting success in either case.
I am keeping Date in Collection and Env variable as below
When I am trying to execute via Newman with the help of the below command, Newman able to read all the collection and env data apart from Date
Newman run Collection.json -e Environment.json -r cli
this is what, I am getting garbage data via Newman, see the below snap-shot, I want the actual Date value should get via Newman from Collection OR Env variable
Hello @danny-dainton, did u get a chance to have a look at the previous message, I am unable to get the Date from Collection’s variable, using the below way to get the Date (2023-04-15) data, looks like this is an issue in Newman, please check and confirm.
I am able to resolve this with the help of > pm.variables.get() function, able to retrieve data from the environment OR collection variable.
Want to understand more about >pm.collectionVariables.get() function, since I am keeping Date value in checkin collection variable able to retrieve data in postman client which is not happening in Newman
Good news, this issue has been fixed automatically, don’t know how?, did Postman push any update for this? same function able to fetch the data (especially Date format data)
Earlier I was getting garbage data via Newman for the below function while reading data from Collection and env, now newman able to fetch Date format data correctly