I have seen examples of csv and this example works well with csv files. But I have a situation where i have huge json file, so i am zipping and trying to unzip the same to apply as feeder and get the object count as well. But this seems to be consistently failing.
I have researched on google, stackoverflow and other forums and even on this doc https://gatling.io/docs/gatling/reference/current/core/session/feeder/ , it doesn’t mention if unzip can be applied to json.
Has anyone come across this or do gatling contributors have suggestion?
val jsonObj0 = jsonFile("supplyEvents0.json.zip").unzip
val size0 = jsonObj0.readRecords.size
Also note there is not issue with this json file… its absolutely working fine when not zipped. The only reason I am zipping is because of its size as it causes failure while running from frontline enterprise tool.
I am using mac to run local development.
First i used right click to zip it. And it gave the error.
Then I tried with zip abc.json.zip abc.json and this way also failed.
Now i am thinking to find a way to zip it keep that utf encoding in mind… but still researching
Try jar cf file.json.zip file.json (don’t remember the actual way to use jar to zip unzip files, been a long time). Usually this way helps if all fails with Java.
In my opinion there is a missing implementation of unzip for jsonFile - I make some tests for that, for CSV zipped in the same way everything is working.
So feeder try to parse unzipped file so is getting parse error. @sbrevet or @slandelle can you confirm ?
Thanks Stéphane for such a quick turn around time. Since I don’t have eyes on the timeline view of your builds and releases, can you please share a tentative date when you thinking to release 3.8.3? It will help me plan with my team.