Reading CSV file in Postman
1 min readJun 23, 2020
CSV:
a,b,c
1,2,3
1,5,6
2,4,6
CSV parse output:
Approach 1: store CSV content as an environmental variable
Just copy the CSV file content and create an environmental variable and paste the content inside it
Then in test or pre-requisite step:
console.log(pm.environment.get("data"))
const parse = require('csv-parse/lib/sync')//Environmental variable where we copy-pasted the csv content
const input =pm.environment.get("data");